Tags
Note
This post is a thought. It's a short note that I make about someone else's content online. Learn more about the process thoughts
Here's my thought on π Alir3z4/html2text: Convert HTML to Markdown-formatted text.
Super neat tool to convert html to markdown
>>> import html2text >>> >>> print(html2text.html2text("<p><strong>Zed's</strong> dead baby, <em>Zed's</em> dead.</p>")) **Zed's** dead baby, _Zed's_ dead.
It even plays nicely with rich.
from rich.markdown import Markdown from rich.console import Console import html2text console = Console() md = Markdown(html2text.html2text("<p><strong>Zed's</strong> dead baby, <em>Zed's</em> dead.</p>")) console.print(md)
This post was a thought by Waylon Walker see all my thoughts at https://waylonwalker.com/thoughts