Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drgarcia1986/gonews
A Golang CLI to browser news from HackerNews and Reddit
https://github.com/drgarcia1986/gonews
go hackernews reddit
Last synced: about 1 month ago
JSON representation
A Golang CLI to browser news from HackerNews and Reddit
- Host: GitHub
- URL: https://github.com/drgarcia1986/gonews
- Owner: drgarcia1986
- License: mit
- Created: 2016-12-17T03:01:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T18:42:42.000Z (almost 8 years ago)
- Last Synced: 2024-07-30T10:19:20.053Z (5 months ago)
- Topics: go, hackernews, reddit
- Language: Go
- Homepage:
- Size: 194 KB
- Stars: 42
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gonews
[![Build Status](https://travis-ci.org/drgarcia1986/gonews.svg)](https://travis-ci.org/drgarcia1986/gonews)
[![Go Report Card](https://goreportcard.com/badge/drgarcia1986/gonews)](https://goreportcard.com/report/drgarcia1986/gonews)
[![codecov](https://codecov.io/gh/drgarcia1986/gonews/branch/master/graph/badge.svg)](https://codecov.io/gh/drgarcia1986/gonews)A Golang CLI to browser news from [Hacker News](https://news.ycombinator.com/) and [Reddit](https://www.reddit.com)
Also is a Golang implementation of the awesome [pynews-cli](https://github.com/mazulo/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-) (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 :smile:.