You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
gardenapple 0e14bf4f8f
Make --help shorter thanks to man page; remove 'no-op'
3 years ago
locales Make --help shorter thanks to man page; remove 'no-op' 3 years ago
.gitignore gitignore: Add *.css 3 years ago
LICENSE.md Add GPL-3.0 license 4 years ago
README.md Slightly improve man formatting 3 years ago
index.js Make --help shorter thanks to man page; remove 'no-op' 3 years ago
package-lock.json Update DOMPurify, update package-lock.json 3 years ago
package.json Add man page, sourced from Markdown 3 years ago
readable.1 Slightly improve man formatting 3 years ago
readable.1.md Slightly improve man formatting 3 years ago

README.md

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

An article from The Guardian in W3M

So much useless stuff that the main article does not even fit on the screen!

readability-cli + W3M

An article from The Guardian in W3M using readability-cli

Ah, much better.

Installation

readability-cli can be installed on any system with Node.js:

npm install -g readability-cli

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 readable(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.