Giter Site home page Giter Site logo

hn-cli's Introduction

HackerNews Command-Line Inteface - hn-cli

Because real hackers access HackerNews from their terminal.

hn-cli is a command-line interface for HackerNews. It essentially allows you to view the front page of HackerNews from your favorite terminal and then open up the links in your favorite browser.

Installation

For now, simply put hn in a directory that is on your system's path. For instance, you can just throw it in /usr/local/bin which is probably on your path. If you're not sure, type echo $PATH.

Usage

hn - grabs and displays the 30 items from the HackerNews homepage.

hn [open|view] [num] - finds the cached link corresponding to the given num and opens it.

hn update - updates your cached HackerNews items and then displays them (same as hn).

hn list [num] - grabs the first num items (or all items) from the cached list and displays them.

hn help - displays the usage info, but if you are reading this, then I guess you don't really need it.

Requirements

The following is a list of non-standard python libraries needed to run this script:

FIXMEs

  • Some unicode characters appear funky in the output, find out what to do about this.
  • Need more graceful failure for various errors (e.g. when server cannot be reached).

TODOs

  • Consider incorporating Baker to make it easier to implement the command-line interface
  • Create an animated GIF to embed in this readme that demonstrates how hn works
  • Add a comments option (either hn view 1 comments hn view -c 1 or hn comments 1
  • In preparation for some fancier features, switch from .hn file to .hn directory
  • Allow for multiple articles to be opened at once (e.g. hn open 2 5 14)
  • Add a history command that allows you to see the last n items that you accessed
  • Fancy up the formatting a little
  • Try playing with color for the different elements of the HN item. Try using Curses for this.
  • Favorite words and favorite URLs list that will highlight HN items based on your preferences
  • Add a summ or summary command that gives some idea of what the article is about.
  • Add a ran, -r, or random command that will open a random article

Related

License

Copyright © 2013 Josh Branchaud under the MIT License. See LICENSE for details.

hn-cli's People

Contributors

jbranchaud avatar

Stargazers

 avatar Preston Badeer avatar Dan Wiechert avatar Nick Croll avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

hn-cli's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.