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 08533d2562
deno lint
2 years ago
locales Dual Node/Deno package! 2 years ago
.gitignore gitignore: Add *.css 3 years ago
LICENSE.md Add GPL-3.0 license 4 years ago
README.md Slightly change wording in README and man page 2 years ago
common.mjs deno lint 2 years ago
deno.json deno lint 2 years ago
index.js deno lint 2 years ago
package-lock.json Dual Node/Deno package! 2 years ago
package.json Dual Node/Deno package! 2 years ago
readability-cli.1 v2.3.5 release 2 years ago
readability-cli.1.md Dual Node/Deno package! 2 years ago
readable.ts deno lint 2 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

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