#html2text (the Python tool, https://alir3z4.github.io/html2text, in Debian as python3-html2text which then provides a "html2markdown" binary) converts HTML into Markdown and (with the right CLI options) does a pretty good job, too.

From there, you can use a good Markdown renderer like lowdown to get an awesome experience β€“ _if_ your terminal supports OSC 8 hyperlinks.

Like, look at this. It still has a few quirks, but for an HTML email in the terminal? It's fucking beautiful.

But no OSC 8 in #NeoMutt. πŸ˜”

#ELinks with `-dump-color-mode 2 -colors 1` has colors and numbered links

#links2 with `-html-numbered-links 1` is monochrome, but has numbered links

#Lynx too, but its output looks more messy to me.

#w3m doesn't highlight links and doesn't output link URLs at all.

#Pandoc can't handle table layouts, which unfortunately are still very common in commercial emails.

#HTML2Text (the C++ tool, https://gitlab.com/grobian/html2text) does a decent job and supports bold & underline in `less` and NeoMutt's pager.

Fabian Groffen / html2text Β· GitLab

HTML to text rendering aimed for E-mail

GitLab

Last week I deployed a change to how I generate plain text versions of content on my website. This week I changed it again. And updated additional post types to use Markdown as their editing and storage format.

https://orangegnome.com/posts/3622/changelog-updated-plain-text-format-and-added-additional-markdown-support

#Html #WebDevelopment #Indieweb #Markdown #BeautifulSoup #Changelog #Microformats #Mistune #Html2Text

Changelog: Updated Plain Text Format and Added Additional Markdown Support | Brent Lineberry

Orange Gnome
GitHub - oksiquatzel/googler: :mag: Google from the terminal

:mag: Google from the terminal. Contribute to oksiquatzel/googler development by creating an account on GitHub.

GitHub

I've just published #html2text 0.11.0. Mainly a few bugfixes, but I've also had to bump the MSRV to 1.63 due to some dependencies. That's the version on Debian stable, so that seems like a reasonable point.

https://crates.io/crates/html2text

I have given up on running the tests in CI on the minimum supported rust version, though - it didn't seem worth adding workarounds to pin dependencies of dev-dependencies to old versions supporting 1.63.

crates.io: Rust Package Registry

@vic Use some of his code https://github.com/aaronsw (I was maintaining #html2text for some time after his death).

#AaronSwartz

aaronsw - Overview

aaronsw has 27 repositories available. Follow their code on GitHub.

GitHub
...quickly followed by #html2text 0.10.1 to fix another bug.
I just released #html2text 0.10.0 (my #RustLang crate to convert HTML into plain (or not) text suitable for display in a terminal.
This release adds some more CSS support including background-color and inline style attributes, and fixes some annoying duplicated empty lines, mostly when there are nested and mostly empty tables.
Things will slow down again for a bit now!

That's better. I've released #html2text 0.7.1, adding a bit of extra CSS support, notably:
* recognise display: none
* Config::add_css(), which allows adding new CSS rules to apply.

My aoc-cli PR now uses `.add_css(".lavafall: { display: none }")` to work around the bad output.

Well that's annoying. Having added CSS colours to #html2text just so that the #AdventOfCode calendar looks good, it's changed so that it doesn't look so good anymore...