DEV Community

Stephen Solka
Stephen Solka

Posted on

đź“° Bypass paywalls; read your news on the terminal

Last night I built a new go tool to let me read websites on the command line. Readcli

readcli https://medium.com/compass-true-north/go-unit-testing-at-compass-3a7cb85ab54a
Enter fullscreen mode Exit fullscreen mode

Install (on mac)

brew install trashhalo/homebrew-brews/readcli
Enter fullscreen mode Exit fullscreen mode

Website Content

Due to the way I am scraping website content not every url will work. I've tested it with medium.com and nytimes.com.

The algorithm is as follows:

  1. Use go-readbility to download a stripped down version of the website.
  2. Use html-to-markdown to convert the clean html to markdown.
  3. Use glamour to render the markdown content.

Bubbletea

The cli interaction is controlled by an elm inspired go library bubbletea. Its be a absolute dream to work with.

Oldest comments (1)

Collapse
 
crimsonmed profile image
Médéric Burlet

Great initiative! Love the idea~~~