2.0 KiB
readability-cli
Firefox Reader View in your terminal!
readability-cli takes any HTML page and strips out unnecessary bloat by using Mozilla's Readability library. As a result, you get a web page which contains only the core content and nothing more. The resulting HTML is suitable for terminal browsers, text readers, and other uses.
Here is a before-and-after comparison, using an article from The Guardian as a test subject.
Standard view in W3M
So much useless stuff that the main article does not even fit on the screen!
readability-cli + W3M
Ah, much better.
Installation
readability-cli can be installed on any system with Node.js:
npm install -g readability-cli
Note to package maintainers: it might be a good idea to provide a symlink, so the man page can be accessed either as readability-cli(1)
or as readable(1)
.
Arch Linux
Arch Linux users may use the readability-cli AUR package instead.
Usage
readable [SOURCE] [options]
readable [options] -- [SOURCE]
where SOURCE
is a file, an http(s) URL, or '-' for standard input
See readability-cli(1) for more information, and usage examples.
Localization
See locales.
Why Node.js? It's so slow!
I know that it's slow, but JavaScript is the most sensible option for this, since Mozilla's Readabilty library is written in JavaScript. There have been ports of the Readability algorithm to other languages, but Mozilla's version is the only one that's actively maintained as of 2020.