Monday, May 4, 2009

Atom

Blog authors usually put a lot of effort into the look of their blogs. And then their readers, ungrateful ingrates that they are, go ahead and just use a feed reader to scrape posts off the blog, thereby making the author's efforts an exercise in futility.

Ok, nevermind that. My point here is that Atom and RSS have really changed the world we use the web. Instead of periodically visiting hundreds of sites regularly, we just import their feeds into our favourite feed-reader, and sit back and enjoy the periodic updates, never understanding the true marvels that feeds are.

For me, till five minutes back, a feed was just this magical thing that pulled new stuff from my favourite site(s) and showed it to me at one central location. I had only a vague idea as to how feeds work, and as long as they worked as intended, I didn't really care how they managed to do what they do.

That is, until I set about creating my own Atom feed.

Our college compres are going on right now, and, as usually happens during a series of tests, I felt the urge to try out something cool and new. So I went over to Google sites, and spent the past three hours making my own site. And then I discovered that I can create a mini-blog there, and post updates and stuff. So I created a page that would allow me to post updates on my progress on my GSoC project, and I looked for the familiar radio symbol that appears in the right corner of Firefox's URL bar to indicate that the current page has a feed, and found that none existed.

So... I set about creating my own.

I always thought that feeds work by some internal logic by which they automatically update themselves whenever the page that they are monitoring changes (yes, I know that sounds ridiculous, live with it). As it turns out, however, feeds are simply XML files that the feed reader parses and extracts data from. So, everytime something new is added to the site, the feed has to be manually (as in manually, not by hand. A script can be written to take care of this) updated to reflect the changes.

And, thanks to a very helpful guide found here, I have created my first Atom feed!

(I picked Atom over RSS because RSS is old, and Atom is supposedly newer, better and shinier)

Next, I'll write a simple Python script that'll scrape my website and update my local feed xml file, which I will then have to manually (yes, by hand here) upload to the site.

Now, however, it's time to study a bit more of OR and then sleep..

4 comments:

Vineet Pandey said...

Neat shit. Btw, I was peeking on your resume :P For all the content you have you should really try and make it look more attractive.

Needless to mention, IMHO.

Amey said...

Geez, and I thought that it looked attractive :(

Tips? :P

Vineet Pandey said...

http://microsoftjobsblog.com/blog/what-resume-advice-do-you-want-to-hear/

Amateur Poet said...

I just hope soon both RSS and Atom stop using XML and move to JSON. With browsers getting native and secure JSON parsers, metadata will be much easier to handle.