boisgera / pandoc

Pandoc (Python Library)
https://boisgera.github.io/pandoc/
MIT License
135 stars 16 forks source link

Example: html string to plain text #45

Closed sowinski closed 2 years ago

sowinski commented 2 years ago

Hi,

can someone help me to write some code to transform a html string into a plain text string?

import pandoc
html = "<p>This is a test</p>"
text = pandoc.magic(html)
print(text)
>>This is a test

Would be nice to see more examples in the docs