Feature request: direct terminal rendering of bold and italic attributes.

-nobs By default, html2text renders underlined letters with sequences like "underscore-back‐ space-character" and boldface letters like "character-backspace-character", which works fine when the output is piped into more(1), less(1), or similar. For other applications, or when redirecting the output into a file, it may be desirable not to render character attributes with such backspace sequences, which can be accomplished with this command line option.

From this I take it that html2text should be rendering things with bold and italics/underline. Bold doesn't show bold if it is rendered directly to the terminal* nor |more (although bold does show up with less). I haven't seen anything in italics or underscore.

If I do something like:

jq -r .description metadata.json |html2text -utf8 | sed -E 's/(.)\x08\1/\x1b[1m\1\x1b[0m/g; s/_\x08(.)/\x1b[4m\1\x1b[0m/g; s,/([^/]+)/,\x1b[3m\1\x1b[0m,g'

it is showing the bold but not italics when rendered to the terminal directly.* When I look at the output |cat -A it doesn't seem to show anything for italics (e.g., text).

As a feature request, please consider adding something so that a flag causes these attributes to be displayed when rendering directly to the terminal* (and preferably without requiring the sed substitutions) when using an appropriate emulation, e.g, xterm-256color.

* directly to the terminal: without having to use e.g., less or more

Edited by iconoclast hero