
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@gardenapple/readability-cli
Advanced tools
Firefox Reader Mode in your terminal - get useful text from a web page using Mozilla's Readability library
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.
So much useless stuff that the main article does not even fit on the screen!
Ah, much better.
readability-cli can be installed on any system with Node.js:
npm install -g @gardenapple/readability-cli
Arch Linux users may use the readability-cli AUR package instead.
readable [SOURCE] [options]
readable [options] -- [SOURCE]
where SOURCE
is a file, an http(s) URL, or '-' for standard input
See readable --help
for more information.
Read HTML from a file and output the result to the console:
readable index.html
Fetch a random Wikipedia article, get its title and an excerpt:
readable https://en.wikipedia.org/wiki/Special:Random -p title,excerpt
Fetch a web page and read it in W3M:
readable https://www.nytimes.com/2020/01/18/technology/clearview-privacy-facial-recognition.html | w3m -T text/html
Download a web page using cURL, parse it and save it into a file:
curl https://github.com/mozilla/readability | readable --base=https://github.com/mozilla/readability > example.html
It's a good idea to supply the --base parameter when piping input, otherwise readable
won't know the document's URL, and things like relative links won't work.
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.
FAQs
Firefox Reader Mode in your terminal - get useful text from a web page using Mozilla's Readability library
We found that @gardenapple/readability-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.