DEV Community

Stephen Solka
Stephen Solka

Posted on

4 2

đź“° 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.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (1)

Collapse
 
crimsonmed profile image
Médéric Burlet •

Great initiative! Love the idea~~~

đź‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay