hnreader

command module
v0.0.0-...-5fba462 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2018 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

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)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址