example improvements
- fix(examples/html2term): more (vim-alike) keybinds
-
fix(examples/html2text): use
yansiinstead oftermionfor colouring- adds support for hyperlinks
- more intuitive IMO
- supports windows
[!NOTE] one test doesn't pass, as I've removed the unicode character strikethrough thing
should I revert it and use the old method, or use the new one (yansi .strike()) which IMO looks better, but only applies in the html2text example, not elsewhere, and delete the test?
I've got the following question: is there a fairly easy way of turning markdown-like decorations in the scope of examples/html2text? I find it quite annoying, that *bold text looks like this* and would prefer bold text to look like this without the *-s
Hi. About the strikeout, I think it should at least be an option, since terminal escape sequences aren't always available.
I've got the following question: is there a fairly easy way of turning markdown-like decorations in the scope of examples/html2text? I find it quite annoying, that bold text looks like this and would prefer bold text to look like this without the *-s
There are a couple of options:
- Use
--literal(under the hood usesTrivialDecorator) - Use
--colour(possibly with--cssand thecssfeature enabled), which uses internally uses the "Rich" output which adds metadata annotations instead of textual decoration, and adds some terminal colouring.
neither the --css --colour --trivial or any combination of these solve my "issue":
I'd like to use this tool to render html into the terminal. Without paging, with styles, colours and hyperlinks.
| html | currenly rendered as | preferred rendering |
|---|---|---|
<strong>I'm bold</strong> |
*I'm bold* | I'm bold |
conclusion
I find the '*'-s annoying and would like to see eg bold text without them
like #91
Hi, Thanks for the clear description which has finally got through my skull. :) Makes a lot of sense.
I think #195 achieves that - it adds a --no-decorate option to the html2text example which (with --colour) removes the '*' etc. (Headings and bullets etc. are still there) How does that look?
A higher-level option to avoid having to specify --colour --no-decorate would probably be a good idea if nothing else.
anyways, I've found chawan, which is basically a TUI web browser, and so does an impressively good job at rendering html.
I'm closing this now out-of-date spaghetti PR ;)