difro / hnreader

Open programming news with your favorite browser using command line

Home Page:https://bunchhieng.github.io/hnreader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hnreader

Stay up to date with the latest news in technology from your favourite programming sites, all aggregated into one feed.

hnreader (Hackernews Reader) allows you to open tech news feeds in your favorite browser from the command line.

Go Report Card Build Status Maintainability GitHub

Installation

  • Download the binary from the hndreader GitHub Release Page

    For example: To download and install version 1.1 for linux, you may run the following.

    $ sudo curl -L https://github.com/FrontSide/hnreader/releases/download/v1.1/hnreader-v1.1.linux.x86_64 > /usr/local/bin/hnreader && chmod +x /usr/local/bin/hnreader
    
  • or install the Go package

    $ go get -u github.com/Bunchhieng/hnreader
    

    Note that this option requires you to have golang already installed. You can install go with your operation system's package manager or download it from golang.org/dl/.

    Don't forget to set your GOPATH and PATH environment variables:

    $ export GOPATH=/path/to/your/go/workspace
    $ export PATH=$GOPATH/bin:$PATH
    

Usage

To use hnreader with its default options (Opens 10 news sites with chrome), simply run:

$ hnreader r

To see all available flags for each command:

$ hnreader help r

OR

$ hnreader help rr

There are a number of customization options:

--tabs value, -t value Specify value of tabs (default: 10)
--browser value, -b value Specify browser
--source value, -s value Specify news source (one of "hn", "reddit", "lobsters") (default: "hn")

Examples with options:

$ hnreader r -t 31 -b "firefox"
$ hnreader r -b "brave" -s "reddit"
$ hnreader r -b "firefox" -s "reddit" -t 20

To use hnreader with a randomized source of news, run:

$ hnreader rr

The following options are available:

--tabs value, -t value Specify value of tabs (default: 10)
--browser value, -b value Specify browser

Tip: Create a bash alias (for linux and macOS), if you are going to run the same command every morning. You can do so by adding the following line (with your preferred options) to the end of your ~/.bashrc file:

alias hnr='hnreader r -b "firefox" -s "reddit" -t 30' >> ~/.bashrc

Contribution

Please see the CONTRIBUTING.md

Credits

License

The MIT License (MIT)

About

Open programming news with your favorite browser using command line

https://bunchhieng.github.io/hnreader/

License:MIT License


Languages

Language:Go 100.0%