Roznoshchik / Lurnby

A tool for active reading and personal knowledge management
https://www.lurnby.com
BSD 3-Clause "New" or "Revised" License
673 stars 17 forks source link

Export should offer html or plaintext options #25

Closed Roznoshchik closed 1 year ago

Roznoshchik commented 1 year ago

Since switching over the highlights and most text inputs to support html, the actual content now being exported is html. This means that it's a bit limiting what you can use the content for if you export it from lurnby.

As a user I would want to specify when choosing my export if highlights and notes should be exported as html content or parsed for their plaintext versions.

Roznoshchik commented 1 year ago

started making custom export functions in the api work and found that it;s enough to just use bs4 to generate the plaintext versions. Need to create some unittests that ensure that this works as expected for various kinds of content.

BeautifulSoup(html, parser="html5lib").text

html would be any html text such as article note, highlight text, etc.