Categories
World Wide Web

My weekend hack – Twitter Trending Topics

I got this idea of building an application which pulls all the pages mentioned in the trending topics on Twitter. Why would that be useful? Well, it’s the simplest replacement for Google News, but more real time and no tweet noise.



Here are the steps I followed to build this application:

  1. The first step was to use IPython and use the Twitter Search API to get the latest tweets.
  2. I then wrote the code to parse these tweets looking for URL’s in them.
  3. The next step was to get the content from these URL’s, and get the title of the pages.
  4. Next, I had to persist it in the store.
  5. Slap a front-end and allow navigation. At this point, the obvious choice for me was Google AppEngine, since it is the cheapest hosting alternative available. I had to make some changes to the application to accommodate it to Google AppEngine’s requirements, but they were mostly trivial.
  6. Build the styles, the icons, the pretty URL’s and you are done!

The initial setup of the application was done in less than 2 hours time!

You can access the application here: Twitter Trending Topics.

There are a few known bugs, but the overall results are impressive.

Categories
World Wide Web

Experiment with Delicious and Python

Once in a while, I look at my Delicious bookmarks to get an idea of what I have been upto in recent time. The ‘Current Interests‘ tool was written with exactly that in mind.

I began to wonder if my bookmarks can give me an idea of trends in technology and my interest in them. So I quickly wrote a Python script to give me the top tags in each year and here are the results.

Categories
Technology

Associating files with URLs on Ubuntu (Gnome) – a quick hack

You just downloaded a file from the Internet, for ex, a PDF, a word document from Google Docs, or a video from TED or a talk from Google Videos. You downloaded this file some days back and now, when you viewed it and wanted to know what the world is talking about it, you don’t remember where you downloaded it from and end up searching for the filename or something related to it in Google.

How many times has this happened to you? How nice would it be if it was possible to associate the file with the URL from where you downloaded it or the page associated with it?

I felt the need for this when I downloaded a lot of TED videos recently and wanted a way to go to the TED page describing the video.

I started searching for the quickest way to do it and I found out a quick way to create context menus in Gnome using Nautilus Actions. So all I had to do was to create 2 commands – one for associating the URL and the other to launch the URL. Did you know it is very simple to create contextual commands in Ubuntu Gnome?