3 ms·
Semi related, but are there any good options for terminal rendering of HTML? I would be fairly accommodating of a best-effort dump of human visible body content
by fbdab103 4y ago
Semi related, but are there any good options for terminal rendering of HTML? I would be fairly accommodating of a best-effort dump of human visible body content.
- dharmab 4y agoThere's a few terminal browsers like w3m, browsh and links that should work for many basic HTML pages.
- fbdab103 4y agoA full terminal web browser is a bit more than I was looking for, but this is definitely an option. Was thinking more something I could pipe text into to get an extraction and/or a simpler pager interface. The browsh repo front page is just insanely impressive[0]. `links` is impossible to query the web for the project, so if you had more guidance on that one, it would be appreciated. [0] https://github.com/browsh-org/browsh https://github.com/browsh-org/browsh Edit: Noted I was querying for something more feature anemic, plus Browsh link
- dharmab 4y agohttp://links.twibright.com http://links.twibright.com is the website, but the easiest way to try it is probably to search your preferred package manager.
- jethro_tell 4y agoElinks -dump google.com
- JdeBP 4y agoWell if you don't find anything, I wonder how easy it would be to adapt my DocBook XML reader to do HTML (sans any sort of script, dynamic content, or remote content). It's pretty much as you describe, little more than a pager for stuff that one can pipe into it, or files named on the command line. I pretty much aimed at just under pg(1) for DocBook XML. * http://jdebp.info/Softwares/nosh/guide/commands/console-docbook-xml-viewer.xml http://jdebp.info/Softwares/nosh/guide/commands/console-docb...
- PhilipRoman 4y agoI've found elinks to be really good. It preserves colors and has really nice navigation controls for interactive use (you can press dot to toggle numbered links). Here is a screenshot of this page: https://i.imgur.com/mP1T0H3.png https://i.imgur.com/mP1T0H3.png If you're just looking to format a page, it has a -dump option. If you want to preserve colors as well, use -dump-color-mode 4