Connecting Google Reader and podget

For some time, I’ve had a Perl script that runs regularly, backing up my Google Reader subscriptions using the standard OPML format:

# Usage:
#  backup-google-reader-opml file-to-write-to.opml google-password

use strict;
use warnings;

use WWW::Mechanize;

my $mech = WWW::Mechanize->new();

    or die "Cannot reach Google Reader Homepage";

    form_number => 1,
    fields =>
        Email => $ARGV[1],
        Passwd => $ARGV[2]
    or die "Cannot submit form";


However, I recently wrote another script (this time Python) that then takes this OPML, parses out all the URLs that are tagged with ‘podcast’, and outputs a serverlist file for podget (an automated console-based podcast downloader). This enables me to subscribe to a podcast in Google Reader, and have the podcast automatically added to the download list. The script looks like this:

# Pass in the OPML file as the first command-line parameter. Will output the
# podget serverlist on stdout.

import re
import sys
import xml.dom.minidom

doc = xml.dom.minidom.parse(sys.argv[1])

body = doc.getElementsByTagName("body")[0]

p = re.compile('^\W+')

for outline in doc.getElementsByTagName("outline"):
    if outline.getAttribute("text") == "podcast":
        for subOutlines in outline.getElementsByTagName("outline"):
            title = subOutlines.getAttribute("title")
            title = p.sub("", title)
            print subOutlines.getAttribute("xmlUrl") + " NoCategory " + title

Feel free to use and adapt to your needs.

Fixing up TripIt and Dopplr Integration

I’ve had my TripIt Personal Calendar Feed specified as an iCal feed into Dopplr for some time, to keep the two in sync by adding every trip in TripIt into Dopplr automatically (I’d give up on Dopplr entirely, as it seems a bit overdesigned and buggy - but it is a bit shinier than TripIt and produces nicer stats, so I’m hanging on to using it against my better judgement). But unfortunately the folks at TripIt broke this integration recently by adding exact geographic locations to the feed. This caused Dopplr to be over-zealous and make the destinations too specific (regions of Madrid and Paris, for example - rather than the whole city).

So I wrote a Yahoo Pipe that fixes up the stream - by removing the exact geographic locations and any items that describe activities and not the trip. Feel free to use it if it’s helpful - the single parameter for the pipe is the URL of your TripIt Personal Calendar Feed, and you’ll want to grab the URL of the pipe as an iCal feed to specify in your Dopplr account.

Burn After Reading

Went to see Burn After Reading with plv last night. It’s a bit of a slow starter, but when it gets going, there are some real solid comedic moments. It’s not laugh-a-minute, and is a little disjointed, but it’s sure entertaining as the plot gets more and more mashed up, and could almost be classed as a farce if it were a little clearer. Indeed, as the CIA boss says at one point:

Report back to me when ... I dunno ... when it makes sense.

It’s definitely worth the price of admission, and is a Coen brothers pic I actually like (they vary a lot). Brad Pitt and George Clooney both do a good job of playing bozos (Brad’s attempt to blackmail John Malkovich is hilarious), and J.K. Simmons as the aforementioned CIA officer is also very funny.

Threadless's Customer Service

  • Ordered a t-shirt from Threadless.

  • It never turned up.

  • They offered to refund me in full, no complaints needed.

  • They also gave me a $5 voucher for future orders, bringing the whole deal even further into the red for them.

This is pretty excellent customer service. I struggle to see this happening in the UK.

NBA @ O2

I went to the see the NBA game at the O2 Arena on Sunday evening on a last minute whim - Chris had a ticket spare.

The game was certainly entertaining (everything the Telegraph says about attention deficit disorder is true), even though I know little about basketball. It gave me a chance to try out my (new to me) telephoto lens. I was a little disappointed with the results once I pulled them off the camera - I had trouble sucking in enough light whilst getting stable shots - but I still ended up with one or two reasonable ones, although mostly not of the game itself.

subscribe via RSS