Markline converts HTML to Markdown and supports transformation methods borrowed from data engineering concepts. The goal of this project is to provide a simple API that renders HTML to Markdown for note management applications such as Logseq.
Markline is available on PyPI:
python -m pip install markline
Markdown rendering is performed with Pandoc so the pandoc
command-line tool needs to be available in your environment. You may follow the official installation instructions
which are OS-dependent, or if you are a conda user, with the following command:
conda install -c conda-forge pandoc
Beautiful Soup supports the HTML parser included in Python's standard library, but it also supports a number of third-party Python parsers. One is the lxml parser which provides a good balance between performance and accuracy. More information about the parsers can be found in the Beautiful Soup documentation.
For conda users, you can install the lxml package with the following command:
conda install -c conda-forge lxml