Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/chronick/node-hn

hackernews reader for the command line, intended primarily for use in GeekTool
https://github.com/chronick/node-hn

Last synced: 16 days ago
JSON representation

hackernews reader for the command line, intended primarily for use in GeekTool

Lists

README

        

# Node HackerNews #
*A command-line HackerNews lister and opener*

This is a simple script for pulling down the HN homepage articles, as well as opening the article links in a browser via the command line. I designed this primarily for use in GeekTool, with the idea being that it would always be on my desktop, and any time an article looks interesting to me I just type ```hn ``` and be on my merry way.

To use out of the box (in the ```bin``` directory):

$ node hn [-ca]

I did this to make my life easier:

$ ln -s /path/to/node-hn/bin/hn ~/bin/hn

Run without arguments:

$ hn

Produces:

HackerNews

0 Want to Block Common Passwords? Sorry, That is Patented

1 Solar panels could destroy U.S. utilities, according to U.S. utilities

2 Show HN: Hospice.io €“ Vagrant configurations generator

3 Single page apps in depth

4 Exposed Webcam Viewer

5 Canada's Guide to patents

So now all I have to do when I see an interesing article on my desktop is:

$ hn

And the article opens in the nearest browser window! Pretty neat!

If I want to see the comments page instead:

$ hn -c

Or if I want to open both the article and the comments:

$ hn -a

If I want to specify how many articles are displayed (very useful for geektool):

$ hn -n

Have fun!