All Projects â†’ schollz â†’ readable

schollz / readable

Licence: MIT license
Making web pages readable in a browser and in the command line 🔗 📖

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to readable

terminal-columns
Render readable & responsive tables in the terminal
Stars: ✭ 27 (-28.95%)
Mutual labels:  readable
readable-web-to-node-stream
Converts a Web-API readable-stream into a Node readable-stream.
Stars: ✭ 33 (-13.16%)
Mutual labels:  readable
SmartReader
SmartReader is a library to extract the main content of a web page, based on a port of the Readability library by Mozilla
Stars: ✭ 88 (+131.58%)
Mutual labels:  readable
xbytes
Parse bytes to human readable sizes (4747) → ('4.75 KB') and vice versa.
Stars: ✭ 17 (-55.26%)
Mutual labels:  readable

Readable

Making web pages readable in a browser and in the command line 🔗 📖.

This is like a self-hosted version of Pocket, or Firefox Reader View, or any other extension that helps you read an article on the web when using a Desktop browser. But, instead of a browser extension that you have to install, its just a bookmark you can keep on your toolbar or a single line of bash you can run at the terminal.

Websites are parsed with either the free Mercury Web Parser API or a self-hosted version of Mozilla's readability package. The readability package was trasnformed into a Docker image that automatically performs some UTF-8 conversions and tidying.

Demo

Try it out at readable.schollz.com.

Readable example

Quickstart

First download the latest release of readable for your OS. Alternatively, if you have Go installed you can do go get github.com/schollz/readable.

You can run readable with or without Docker.

with Docker

$ docker pull schollz/readable
$ ./readable

without Docker

Get YOUR_API_KEY Mercury Web Parser API Key from here (its free).

$ readable -key YOUR_API_KEY

Advanced usage

The Docker image in this repo allows you to manipulate websites into readable ones. You can do some neat things like the following:

Read articles from the command line

You can use the Docker image to directly read articles from the command line:

$ URL=http://www.cnn.com/2017/10/03/world/nobel-physics-prize-2017/index.html
$ docker run --rm -t schollz/readable $URL | more

----------------------------------------------------------
Nobel Prize in Physics goes to 'black hole telescope' trio
----------------------------------------------------------

Story highlights

-   The development proves Einstein's prediction of gravitational waves
-   More than 1,000 people worked on the technology over four decades

(CNN)The 2017 Nobel Prize in Physics has been awarded to Rainer Weiss,
Barry C. Barish and Kip S. Thorne for their detection of gravitational
waves, a development scientists believe could give vital clues to the
origins of the universe.
...

Download readable data to computer

You can use the Docker image to download the parsed contents into a json file:

$ URL=http://www.cnn.com/2017/10/03/world/nobel-physics-prize-2017/index.html
$ docker run --rm -v `pwd`:/data -t schollz/readable $URL data.json
$ cat data.json | jq .title
"Nobel Prize in Physics goes to 'black hole telescope' trio"

where URL is the URL of some article that you want to read. This will result in a file data.json which contains the results.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].