💠Alir3z4/html2text: Convert HTML to Markdown-formatted text.
=============================================================
!https://github.com/Alir3z4/html2text
Date: May 1, 2024
GitHub - Alir3z4/html2text: Convert HTML to Markdown-formatted text.
Convert HTML to Markdown-formatted text. Contribute to Alir3z4/html2text development by creating an account on GitHub.
GitHub · github.com [1]
Super neat tool to convert html to markdown
``` python
>>> import html2text
>>>
>>> print(html2text.html2text("Zed's dead baby, Zed's dead.
"))
**Zed's** dead baby, _Zed's_ dead.
```
It even plays nicely with rich.
``` python
from rich.markdown import Markdown
from rich.console import Console
import html2text
console = Console()
md = Markdown(html2text.html2text("Zed's dead baby, Zed's dead.
"))
console.print(md)
```
!!! note
This post is a thought [2]. It's a short note that I make
about someone else's content online #thoughts [3]
References:
[1]: https://github.com/Alir3z4/html2text
[2]: /thoughts/
[3]: /tags/thoughts/