reddit top

Last week I published the Hacker Top program and promised to explain how it was made. Before I do that, let me publish another similar program for Reddit. It's the Reddit Top program.

As I mentioned in the Hacker Top post, Reddit is my favorite source for news because of the great programmer community it has. I actually unsubscribed from all the default subreddits (politics, pics, etc.) and subscribed to some 20 - 30 programming subreddits (like python, erlang, compsci and many others).

Reddit Top was actually derived from Hacker Top. Hacker Top was made in such a manner that it required me just to write a new parser for Reddit to create the new program. The program is written in Python programming language and uses ncurses interface for displaying the stories.

reddit top, follow reddit from console/shell
Try the 'm' keyboard shortcut to switch to other display modes

Download

Download link: reddit top program
Downloaded: 4061 times

I'll describe the process of creating the program in one of the next posts.
If you want to read about that, I suggest you subscribe to my rss feed.

Note - this program is released under GNU GPL.

How to run the program?

1) Make sure you are running a Unix type operating system.

2) Make sure you have Python installed. Any recent version will do.

3) Download and unpack the hacker top program archive.

$ wget 'http://www.catonmat.net/download/reddit-top.tgz'
$ tar -xvzf reddit-top.tgz

4) Change to 'reddit-top' directory which was created by unpacking the archive.

$ cd reddit-top

5) Give the 'reddit_top.py' program execute permissions.

$ chmod u+x reddit_top.py

6) Run the reddit_top.py program.

$ ./reddit_top.py

(If that does not work out, try running 'python ./reddit_top.py')

Make sure that your terminal is at least 80 columns wide, otherwise the program won't be able to display the results nicely.

Command Line Options

If you run the program with '--help' argument, it will display the possible command line options:

Usage: ./reddit_top.py [-h|--help] - displays this
Usage: ./reddit_top.py [-s|--subreddit subreddit]
          [-i|--interval interval] [-n|--new]
          [-u|--utf8 <on|off>]

As the help message suggests, the four main options are:

  • -s or --subreddit, which specifies the subreddit to monitor.

    The default is reddit's front page (http://www.reddit.com).

    At the moment it is not possible to specify multiple subreddits. I'll add the feature in the future. Here are a few examples of valid subreddits - 'programming', 'wtf', 'python', 'politics', and others.
  • -i or --interval, which specifies refresh interval.

    The default refresh interval is 1 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 you might get gibberish.
  • -n or --new, which follows only the newest reddit stories on a given subreddit or front page.

    Default: follow front page stories.

Keyboard Shortcuts

There are several keyboard shortcuts which you should know about when using the Reddit Top program:

  • q - quits the program.
  • u - forces an update of the news.
  • up arrow/down arrow (or alternatively j/k keys) - scrolls the news list up or down.
  • m - changes the display mode. There are 5 different display modes for your taste.

Enjoy the program! I'll write some details how I created it in one of the next posts. Stay tuned - subscribe to my rss feed! :)

Download Reddit Top Program

Download link: reddit top program
Downloaded: 4061 times

The program is released under GNU General Public License.

Comments

Chris Brannon Permalink
July 15, 2008, 00:18

This looks interesting.
At the moment, I view reddit using Gnus under Emacs. Gnus has the nnrss
backend for reading RSS feeds.

August 04, 2014, 19:11

I really love your blog.I wanted to thank you for this great read!! I definitely enjoying each and every little bit of the article and I have you bookmarked your site to check out new stuff you post.

independence day wallpapers
independence day images|
independence day quotes||
independence day sms|
independence day wishes|
independence day poems|
independence day message|
independence day |
Happy independence day images|
Happy independence day quotes|
independence day speech|
independence day greetings|

August 12, 2014, 14:48

I really love your blog.I wanted to thank you for this great read!! I definitely enjoying each and every little bit of the article and I have you bookmarked your site to check out new stuff you post.

independence day images
happy independence day images.

FIBA Permalink
August 22, 2014, 13:22

I really love your blog.I wanted to thank you for this great read!! I definitely enjoying each and every little bit of the article and I have you bookmarked your site to check out new stuff you post.

fiba 2014
fiba world cup
fiba world cup 2014
Basketball world cup 2014
fiba world cup schedule
fiba world cup 2014 teams
fiba world cup 2014 groups
fiba live streaming,

Meemo Garza Permalink
July 15, 2008, 02:36

How about enabling a method to pass the links to an external application.

July 15, 2008, 05:33

Works like gold on Debian Stable. :-) But yeah, adding a way to click on news-item would be great! :)

Zack Permalink
July 15, 2008, 15:48

Maybe have it open in links or lynx?

July 15, 2008, 17:48

This is really cool!
Now we just need the equivalent for Twitter...

July 18, 2008, 16:22

Geeky :)

July 18, 2008, 23:45

How about if reddit produced a popup java console version for viewing their site in a more work-friendly way?

awh Permalink
July 29, 2008, 04:11

Hey, nice script! I have one concern, though. When looking at "pyredditstories.py", I noticed that you set the user-agent as this:

request.add_header('User-Agent', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)')

First, I don't really see the use in this, why would it matter to reddit what your user-agent is? Second, I find that it's much more honest to use a useful user-agent. It lets a website/server owner contact you if they are having huge problems with your app, and there might be a design flaw.

Just thought I'd give a heads up!

patrick jury Permalink
November 18, 2012, 15:57

The reddit api requires you to specify a user-agent to build the client object.

July 31, 2009, 08:56

Looks great. However, on invocation, I get the following error:

Error!
Reddit might have redesigned:
lengths of score, title, tagline and comment lists do not match

December 24, 2009, 02:59

It's should Installing simplejson package.

December 24, 2009, 03:06

Maybe should open it in links or lynx?

July 12, 2013, 21:11

EZ Flow 2nd Launch Gel Polish, Rich Cherry, 0.5 Fluid Ounce Preferential:70% By:
http://www.408400.net/tools-and-accessories/nail-polish/ez-flow-2nd-launch-gel-polish-rich-cherry-0-5-fluid-ounce-preferential70-by.html

June 04, 2014, 10:54

nice information , you are providing

faheen Permalink
June 22, 2014, 04:32

Ramadan Wallpaper
Ramadan Wallpaper HD Download
Ramadan Wallpaper 2014
Ramadan Wallpaper 2014 Download
Ramadan Wallpaper 2014 HD Images
Ramadan Wallpaper 2014 Images
Ramadan Wallpaper quotes
Ramadan wallpaper greetings
Ramadan wallpaper 2014 greetings
Ramadan Wallpaper 2014 quotes
Ramadan Kareem 2014 images
Ramadan Kareem Mubarak Images
Ramadan Kareem Mubarak 2014 images
Ramadan Screen Saver 2014 download
Ramadan Mubarak images
Ramadan images 2014
Ramadan Mubarak greetings
Wish you happy Ramadan 2014
Happy Ramadan Wallpaper 2014
Ramadan wallpaper 2014
Wish you happy Ramadan 2014
ramadan Hd wallpaper 2014
Wish you happy Ramadan wallpaper 2014
Ramadan 2014 images
Ramadan 2014 pictures
wish you happy Ramadan 2014 images
Wish you happy Ramadan 2014 pictures
Happy ramadan 2014 wallpaper
Ramadan Kareem 2014 Wallpaper
Ramadan Mubarak 2014 wallpaper
Wallpaper Ramadan 2014
Ramadan HD wallpaper
Ramadan 2014 HD wallpaper
wish you Ramadan 2014 HD wallpaper
Happy Ramadan HD wallpaper
Happy Ramadan 2014 HD wallpaper
Wish you Ramadan HD wallpaper Download 2014
Ramadan HD wallpaper Download 2014
Ramadan HD wallpaper 2014 Download
Ramadan HD wallpaper 1080p
Ramadan 2014 HD wallpaper 1080p
Best Ramadan 2014 HD wallpaper
Top 10 Ramadan 2014 HD wallpaper
Best Collections Of Ramadan 2014 HD wallpaper
Ramadan 2014 HD wallpaper For Android
Ramadan 2014 best Screensaver download
Ramadan 2014 Screensaver download
screensaver download for mobile Ramadan 2014
Ramadan 2014 HD Screensaver Download
Ramadan 2014 download best screen saver
Screensaver for 2014 ramadan
Ramadan mubarak screensaver download
Ramadan mubarak 2014 best screen saver
Ramadan Kareem Mubarak 2014 best screen saver
Ramadan mubarak 2014 best screen saver
screen saver 2014 download free for android
Ramadan Kareem Mubarak Greetings 2014
Best Collections of Ramadan 2014 Greetings
Best Collections of Ramadan 2014 Greetings
Top Collections of Ramadan 2014 Greetings
Ramadan 2014 Greetings
Ramadan 2014 Greetings Free
Ramadan 2014 Greetings Kareem best
Best Collections of Ramadan 2014 Kareem Greetings
Best Collections of Ramadan 2014 Kareem Greetings
Best Collections of Ramadan 2014 kareem greetings
Top Ramadan 2014 wallpapers
Top Ramadan 2014 pictures
Top ramadan 2014 pictures for pc
Top ramadan 2014 Wallpaper for Android
Ramadan 2014 best softwares
Ramadan 2014 Best Images of Desktop
Ramadan 2014 best pictures for desktop
ramadan 2014 collection of Hd wallpaper
Ramadan 2014 Best collections
Ramadan 2014 top Hd wallpaper
Ramadan 2014 in uk
When Ramadan 2014 in Uk
ramadan 2014 in United Kingdom
When Ramadan 2014 in United States
When ramadan 2014 in America
Ramadan date in uk
Ramadan date in uk
Ramadan facts in united kingdom
Ramadan date in France
Ramadan 2014 in france
Ramadan 2014 date in france
Ramadan 2014 date in Frace country
Happy Ramadan 2014 best wallpaper
Ramadan Wallpaper best collections
Ramadan Kareem Wallpaper collections
wish you happy Ramadan wallpaper 2014
happy Ramadan wallpaper 2014
wish you happy Ramadan Hd wallpaper
Happy Ramadan 2014 HD wallpaper
Hd Ramadan wallpaper 2014
Wallpaper 2014 Hd in Ramadan
Ramadan wallpaper 2014 for Desktop Background
Best Islamic Ramadan wallpaper 2014
Wallpaper 2014 for facebook Cover
Best Wallpaper 2014 Download
Ramadan HD wallpaper 2014 Download
When ramadan in India 2014
Ramadan in India 2014
Ramadan in India 2014
Ramadan Kareem Greetings
Ramadan kareem Mubarak Greetings
Ramadan kareeem 2014 Greetings
Ramadan 2014 kareem Greetings
Ramadan 2014 kareem greetings
Ramadan Kareem Mubarak 2014
Ramadan kareem Mubarak 2014
Ramadan kareem Mubarak 2014
Ramadan Kareem greetings 2014
Ramadan Kareem greetings 2014
Ramadan Kareem greetings 2014
Ramadan Kareem greetings 2014
Ramadan Kareem greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Ramadan Mubarak Greetings 2014
Inspirational pictures of ramadan 2014
Inspirational pictures of ramadan 2014
Inspirational pictures of ramadan 2014
Inspirational pictures of ramadan 2014
Inspirational pictures of ramadan 2014
Inspirational pictures of ramadan 2014
Inspirational pictures of ramadan 2014
Inspirational pictures of ramadan 2014
Inspirational pictures of ramadan 2014
Inspirational pictures of ramadan 2014
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Ramadan 2014 Wallpaper and Mubarak pics
Awesome Post Ramadan Wallpaper Ramadan Wallpaper HD Download Ramadan Wallpaper 2014 Ramadan Wallpaper 2014 Download Ramadan Wallpaper 2014 HD Images Ramadan Wallpaper 2014 Images Ramadan Wallpaper quotes Ramadan wallpaper greetings Ramadan wallpaper 2014 greetings Ramadan Wallpaper 2014 quotes Ramadan Kareem 2014 images Ramadan Kareem Mubarak Images Ramadan Kareem Mubarak 2014 images Ramadan Screen Saver 2014 download Ramadan Mubarak images Ramadan images 2014 Ramadan Mubarak greetings Wish you happy Ramadan 2014 Happy Ramadan Wallpaper 2014 Ramadan wallpaper 2014 Wish you happy Ramadan 2014 ramadan Hd wallpaper 2014 Wish you happy Ramadan wallpaper 2014 Ramadan 2014 images Ramadan 2014 pictures wish you happy Ramadan 2014 images Wish you happy Ramadan 2014 pictures Happy ramadan 2014 wallpaper Ramadan Kareem 2014 Wallpaper Ramadan Mubarak 2014 wallpaper Wallpaper Ramadan 2014 Ramadan HD wallpaper Ramadan 2014 HD wallpaper wish you Ramadan 2014 HD wallpaper Happy Ramadan HD wallpaper Happy Ramadan 2014 HD wallpaper Wish you Ramadan HD wallpaper Download 2014 Ramadan HD wallpaper Download 2014 Ramadan HD wallpaper 2014 Download Ramadan HD wallpaper 1080p Ramadan 2014 HD wallpaper 1080p Best Ramadan 2014 HD wallpaper Top 10 Ramadan 2014 HD wallpaper Best Collections Of Ramadan 2014 HD wallpaper Ramadan 2014 HD wallpaper For Android Ramadan 2014 best Screensaver download Ramadan 2014 Screensaver download screensaver download for mobile Ramadan 2014 Ramadan 2014 HD Screensaver Download Ramadan 2014 download best screen saver Screensaver for 2014 ramadan Ramadan mubarak screensaver download Ramadan mubarak 2014 best screen saver Ramadan Kareem Mubarak 2014 best screen saver Ramadan mubarak 2014 best screen saver screen saver 2014 download free for android Ramadan Kareem Mubarak Greetings 2014 Best Collections of Ramadan 2014 Greetings Best Collections of Ramadan 2014 Greetings Top Collections of Ramadan 2014 Greetings Ramadan 2014 Greetings Ramadan 2014 Greetings Free Ramadan 2014 Greetings Kareem best Best Collections of Ramadan 2014 Kareem Greetings Best Collections of Ramadan 2014 Kareem Greetings Best Collections of Ramadan 2014 kareem greetings Top Ramadan 2014 wallpapers Top Ramadan 2014 pictures Top ramadan 2014 pictures for pc Top ramadan 2014 Wallpaper for Android Ramadan 2014 best softwares Ramadan 2014 Best Images of Desktop Ramadan 2014 best pictures for desktop ramadan 2014 collection of Hd wallpaper Ramadan 2014 Best collections Ramadan 2014 top Hd wallpaper Ramadan 2014 in uk When Ramadan 2014 in Uk ramadan 2014 in United Kingdom When Ramadan 2014 in United States When ramadan 2014 in America Ramadan date in uk Ramadan date in uk Ramadan facts in united kingdom Ramadan date in France Ramadan 2014 in france Ramadan 2014 date in france Ramadan 2014 date in Frace country Happy Ramadan 2014 best wallpaper Ramadan Wallpaper best collections Ramadan Kareem Wallpaper collections wish you happy Ramadan wallpaper 2014 happy Ramadan wallpaper 2014 wish you happy Ramadan Hd wallpaper Happy Ramadan 2014 HD wallpaper Hd Ramadan wallpaper 2014 Wallpaper 2014 Hd in Ramadan Ramadan wallpaper 2014 for Desktop Background Best Islamic Ramadan wallpaper 2014 Wallpaper 2014 for facebook Cover Best Wallpaper 2014 Download Ramadan HD wallpaper 2014 Download When ramadan in India 2014 Ramadan in India 2014 Ramadan in India 2014 Ramadan Kareem Greetings Ramadan kareem Mubarak Greetings Ramadan kareeem 2014 Greetings Ramadan 2014 kareem Greetings Ramadan 2014 kareem greetings Ramadan Kareem Mubarak 2014 Ramadan kareem Mubarak 2014 Ramadan kareem Mubarak 2014 Ramadan Kareem greetings 2014 Ramadan Kareem greetings 2014 Ramadan Kareem greetings 2014 Ramadan Kareem greetings 2014 Ramadan Kareem greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Ramadan Mubarak Greetings 2014 Inspirational pictures of ramadan 2014 Inspirational pictures of ramadan 2014 Inspirational pictures of ramadan 2014 Inspirational pictures of ramadan 2014 Inspirational pictures of ramadan 2014 Inspirational pictures of ramadan 2014 Inspirational pictures of ramadan 2014 Inspirational pictures of ramadan 2014 Inspirational pictures of ramadan 2014 Inspirational pictures of ramadan 2014 Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics Ramadan 2014 Wallpaper and Mubarak pics oHack Anna University Paper Valuation Anna University result 2014 Thanks for sharing

yeshwanth Permalink
July 10, 2014, 06:48
yeshwanth Permalink
July 10, 2014, 06:48
July 12, 2014, 09:17

Actually this post is about my personal interest and the mid of the post is truly informative and I love and elaboration quality of writer. I always try to find this type of info regarding this topic now here I got this thanks Happy Friendship Day SMSFriendship Day SMS independence day of india happy independence day images independence day wallpapers happy independence day sms again thanks for this great blog.

sanchit Permalink
July 25, 2014, 21:38

Hey its great post really enjoyed this one i found this on google ,i think there are still websmasters who provide quality contents to the reader and hope to come back soon and by the way Eid Mubarak Wishes
Eid Mubarak Sms in Hindi
Eid Mubarak sms In English
Eid Mubarak sms in Urdu
Eid Mubarak Wallpapers
Eid Mubarak Greetings
Eid Mubarak cardsto all of you also you can check Happy eid Mubarak 2014
really a great stuff

sanchit Permalink
July 25, 2014, 21:38

Hey its great post really enjoyed this one i found this on google ,i think there are still websmasters who provide quality contents to the reader and hope to come back soon and by the way Eid Mubarak Wishes
Eid Mubarak Sms in Hindi
Eid Mubarak sms In English
Eid Mubarak sms in Urdu
Eid Mubarak Wallpapers
Eid Mubarak Greetings
Eid Mubarak cardsto all of you also you can check Happy eid Mubarak 2014
really a great stuff

Hey its great post really enjoyed this one i found this on google ,i think there are still websmasters who provide quality contents to the reader and hope to come back soon and by the way

Happy Friendship Day 2014 Wallpapers free download

Happy Friendship Day 2014 wishes free download

Happy Friendship Day 2014 Gifts free download

Happy Friendship Day 2014 Gift Ideas free download

Happy Friendship Day 2014 Pictures For Facebook free download

Thanks for sharing

sanchit Permalink
August 13, 2014, 12:08

I am very happy to visit this site and hope to visit here again and again. I have bookmarked your site due to the interesting and relevant stuff found here. Also I have recommended the same to my other friends.
Independence day india
Happy Independence day India
Desh Bhakti songs
Patriotic songs
Whatsapp Status
Fb status
Independence Day Speech in English

Independence Day Quotes

Modi Speech on Independece Day 2014
PM Modi LIVE Speech on Independece Day 2014

This is my site, you can visit it and leave your valuable feedback.

August 21, 2014, 13:51
Rosy Permalink
August 30, 2014, 10:44

This article is quite helpful and informative too. I enjoyed a lot. Thanks for sharing such a great article.

Amazon Promotional Code 2014
Amazon Promotional Code
Amazon Promotional Code for August 2014

Thanks for sharing such a great article

hana Permalink
September 09, 2014, 06:43

Until now I did not notice these things. I'm glad you've mentioned. I understand what you mean. I must thank you for this article
دستگاه حضور و غیاب - خرید ملک در ترکیه - قیمت خودرو - سنگ کورین - خرید و فروش خودرو - otomatik kapı
.

Leave a new comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.

Advertisements