Xml Feed from the London Underground Real-time status

I’ve written a script to parse the London Underground real-time tube status page and convert it into an Xml feed. It caches the output from TfL for 1 minute. If their page structure changes i’ll endeavour to update my parser.

You can get the feed as Xml or HTML. I’ve also started the ball rolling with a Mac OS X Widget (15kb) (download, unzip and install), and a Google Gadget (add http://www.socialanimal.com/tube/status.php?format=google as a custom URL in iGoogle.

Enjoy and let me know if you find any problems with the feed.

UPDATE 13/May/08: TfL are now offering a selection of iGoogle gadgets. At the moment I can’t find an Xml feed, and the XHTML gadget just states ‘loading’ though which is a shame.

UPDATE 8/June/08: I’ve released the source code for this under GPL license so you can use it in your programs. Please read the GPL license to ensure your usage complies. I didn’t write the output caching files i’ve included and I can’t find the original author to check licensing terms.

UPDATE 24/Dec/08: I was notified recently that the feed had broken since TfL updated their site to add their Travel Tools selection, but still no Xml feed! Anyway, i’ve updated my parser code so it’s all working again. I’ve also added another last updated time attribute to the Xml version, it’s expressed in seconds since 1970 (ala Unix).

UPDATE 2/Feb/09: I’ve added an RSS feed format to the status feed. Not sure how useful it’ll be, let me know.

Screengrab a website in Firefox

I’ve had a few occasions to print out a website exactly as the browser is displaying it. Usually it involves a screen grab, scroll down, screen grab, scroll down etc. and then stitching the images back together. I’ve now found a much simpler solution – ScreenGrab:

Screengrab! is an extension for Firefox that makes it easy to save a web-page as an image. With it, you can save anything that you can see in a browser window – from a small selection, to a complete page.