Coder Social home page Coder Social logo

schollz / readable Goto Github PK

View Code? Open in Web Editor NEW
44.0 4.0 4.0 1.58 MB

Making web pages readable in a browser and in the command line :link: :book:

Home Page: https://readable.schollz.com

License: MIT License

Go 79.36% Shell 11.54% Makefile 9.10%
docker docker-image web-parser readable

readable's Introduction

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

readable's People

Contributors

schollz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

readable's Issues

using puppeteer

Hi, I am interested in working for the project on Creating a self-contained, browser-based page HTML for Gsoc 2021, I have gone throught the development tasks which are needed to be completed and I have a query regarding creating a chromeless browser, after going through some research I came across puppeteer which could be helpful in creating a headless chrome. I need you to guide me so that I can start contributing as soon as possible and I would know whether I am on the right path towards achieving the goals needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.