Skip to content

A Golang CLI to browser news from HackerNews and Reddit

License

Notifications You must be signed in to change notification settings

drgarcia1986/gonews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gonews

Build Status Go Report Card codecov

A Golang CLI to browser news from Hacker News and Reddit
Also is a Golang implementation of the awesome pynews-cli.

Installing

Get this project and install via go get -u.

$ go get -u github.com/drgarcia1986/gonews

Or you can download a binary on releases.

Usage example

To get the last 10 new stories just call gonews on command line and press Enter on the news wanted.

You can determine the number max of news to return with parameter --limit and you can also choose between new or top stories with parameter --type.

$ gonews --limit 20 --type top

By default gonews use hackernews as provider, but you can change the provider with parameter --provider, e.g:

$ gonews --provider reddit-golang --type new --limit 10

For more information about usage, use command gonews --help

$ gonews --help
  -limit int
        Number of Stories to get (default 10)
  -provider string
        Stories Provider (hackernews, reddit, reddit-<subreddit>) (default "hackernews")
  -type string
        Stories Type ('new' or 'top') (default "top")

Observation

This is a toy project to help me to pratice Golang, if you can help me with this, getting in touch 😄.