What it does
html2text converts HTML into Markdown-formatted text through a Python CLI or library. It provides options for link omission, reference links, escaping, and code-block handling.
Give the CLI an HTML filename and optional encoding, or pass HTML to the Python function/configurable HTML2Text object. The result is Markdown-formatted text for reading or analysis. Links can remain inline, become references or be omitted; optional code markers identify preformatted sections. Escaping every special character avoids formatting corner cases but reduces readability. The GPLv3 project is the Aaron Swartz-origin Python implementation, which matters when choosing among unrelated tools with the same name.
Strengths
- Exposes useful choices for links and Markdown escaping.
Watch out for
- Escaping every special character reduces output readability.
Best for
- Turning HTML documents into reusable Markdown text