Coder Social home page Coder Social logo

faulkner / hacker-top Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pkrumins/hacker-top

2.0 2.0 0.0 198 KB

A top-like program for monitoring hacker news from the console

Home Page: http://www.catonmat.net/blog/follow-hacker-news-from-the-console/

Python 100.00%

hacker-top's Introduction

This is the Hacker Top program. It's a top-like program for monitoring stories
on hacker news (news.ycombinator.com) from the console.

It was written by Peteris Krumins ([email protected]).
His blog is at http://www.catonmat.net  --  good coders code, great reuse.

The code is licensed under the GNU GPL license.

The code was written as a part of the article "Follow Hacker News from the
Console" on my website. The whole article can be read at:

    http://www.catonmat.net/blog/follow-hacker-news-from-the-console/

I explained some parts of the code in this program in another article "How
Reddit Top and Hacker Top Programs Were Made". It can be read here:

http://www.catonmat.net/blog/how-reddit-top-and-hacker-top-programs-were-made/

------------------------------------------------------------------------------

Table of contents:

    [1] The Hacker Top program.
    [2] Program's usage.
    [3] Keyboard shortcuts.
    [4] Future TODO improvements.


[1]-The-Hacker-Top-program----------------------------------------------------

This program monitors the Hacker News website ( http://news.ycombinator.com )
for hacker stories and displays them in the console via ncurses.

The program is written in Python programming language and is supposed to
be run on Unix type operating systems, such as Linux.

It uses one external Python module - BeautifulSoup - for parsing HTML.
BeautifulSoup can be downloaded from http://crummy.com/software/BeautifulSoup
or via `easy_install beautifulsoup` 

See my original article for a screenshot:

    http://www.catonmat.net/blog/follow-hacker-news-from-the-console/


[2]-Hacker-Top-usage----------------------------------------------------------

Usage: ./hacker_top.py [-h|--help] - displays help message

Usage: ./hacker_top.py [-i|--interval interval]
          [-u|--utf8 <on|off>] [-n|--new]

    -i or --interval specifies refresh interval.
    The default refresh interval is 3 minutes. Here are a few
    examples:  10s (10 seconds), 12m (12 minutes), 2h (2 hours). 

    -u or --utf8 turns on utf8 output mode.
    Default: off. Use this if you know for sure that your
    terminal supports it, otherwise your terminal might turn into garbage.

    -n or --new follows only the newest hacker stories.
    Default: follow front page stories.


[3]-Keyboard-shortcuts--------------------------------------------------------

q - quits the program.
u - forces an update of the stories.
m - changes the display mode.
up/down arrows (or j/k) - scrolls the news list up or down.

Beta shortcuts:
o - open the topmost URL in the default webbrowser
t - open the topmost URL in a new tab in the default webbrowser
c - open the topmost URL's comments in the default webbrowser

[4]-Future-TODO-improvements--------------------------------------------------

* Fix it to work on Windows. (Perhaps try the Console module)

* Merge it with "Reddit Top" program (see below) and create "Social Top"
  program. Then write plugins for Digg, and other websites.

  Reddit Top is here (currently broken, will fix on Sunday 2009.11.29):
  http://www.catonmat.net/blog/follow-reddit-from-the-console/

* Add ability to login and vote for the favorite stories.


------------------------------------------------------------------------------


Have fun using it!


Sincerely,
Peteris Krumins
http://www.catonmat.net

hacker-top's People

Contributors

bfrank avatar faulkner avatar pkrumins avatar randalldegges-okta-2 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.