{"repo":"elliotgao2/tomd","free":true,"listed":false,"github":"https://github.com/elliotgao2/tomd","clone":"git clone https://github.com/elliotgao2/tomd.git","description":"Convert HTML to Markdown.","language":"Python","stars":531,"topics":["python","html","markdown"],"license":"MIT","category":"ai-agents","readme_excerpt":"tomd Convert real-world HTML to clean Markdown. tomd is a small, fast Python library that turns an HTML string into Markdown — handy for archiving articles, normalising scraped content, piping rendered pages into LLM context, or anywhere you'd rather work with plain text than a DOM. It walks the parsed tree with lxml , so it handles nested lists, formatted table cells, fenced code blocks with language hints, HTML entities, hard line breaks, and the messy markup you actually find in the wild. Install Requires Python 3.10+. Quickstart Or via the class: What it converts Markdown HTML ---------------------- ------------------------------------------------- Headings – Bold / italic , , , Strikethrough , , Inline code , , Links incl. relative, mailto: , title Images Lists (nested, mixed) , , Blockquotes (incl. nested, multi-paragraph) Horizontal rule Fenced code blocks Tables with or without / Hard line breaks → \\n Definition lists / / , , , , and friends are stripped. HTML entities ( &amp; , &#8212; , &lt; ) are decoded. Unknown tags fall through to their text content. Example python print(\"hi\") Development Install the pre-commit hooks: Contributing Pull requests are welcome. For non-trivial changes, please open an issue first. Make sure uv run pytest , uv run ruff check . , and uv run ruff format --check . all pass before submitting. License MIT © Elliot Gao","default_branch":null,"files":null,"tree":[],"storefront":"/r/elliotgao2","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/elliotgao2/tomd/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}