Wednesday, 12 March 2008

flickr -> photobox transfer

SWMBO asked me if I could help transfer some of our flickr photos to photobox so that she can create and print an album. A quick Google seemed to find a few links for doing it the other way around, so it seemed like time to get knitting some perl!

Flickr has an API and photobox lets you use ftp to upload, so I thought I'd use the perl API to download the 4 sets that my wife had arranged on flickr. Anyway, here's the code with keys etc obscured. Sorry it's pretty rough and my perl is not too hot, but at least it works.

use Flickr::API;
use Data::Dumper;

my $api = new Flickr::API({'key' => 'your_flickr_api_key',
'secret' => 'your flickr_secret'});

my $frob = $api->execute_method('flickr.auth.getFrob', {
'api_key' => 'your_flickr_api_key',
my $f = $frob->{tree}->{children}[1]->{children}[0]->{content};

my $url = $api->request_auth_url("read", $f);
my $cmd = "C:/Progra~1/Mozill~1/firefox.exe \"$url\"";

my $token = $api->execute_method('flickr.auth.getToken', {
'api_key' => 'your_flickr_api_key',
'frob' => $f,

my $t = $token->{tree}->{children}[1]->{children}[1]->{children}[0]->{content};

my $response = $api->execute_method('flickr.photosets.getPhotos', {
'photoset_id' => '72157601397952579',
'auth_token' => $t,

my $ids = $response->{tree}->{children}[1]->{children};

for my $id (@$ids) {
if ($id->{attributes}) {
my $photo_id = $id->{attributes}->{id};
print "$photo_id\n";
my $sizes = $api->execute_method('', {
'api_key' => 'your_flickr_api_key',
'photo_id' => $photo_id,
'auth_token' => $t,

my $s = $sizes->{tree}->{children}[1]->{children};
for my $size (@$s) {
if ($size->{attributes}) {
if ($size->{attributes}->{label} eq "Original") {
my $url = $size->{attributes}->{source};
print "$url\n";
my $c = "wget $url";

Sunday, 9 March 2008

Central heating problems - from bad to worse

I've been working on a bathroom re-fit for the last few weekends. Last weekend, I removed a radiator and replaced it with a heated towel rail. This involved draining the system down. Sad to report that it's never been the same since.

The boiler started making a right old racket, thumping, banging and occasionally venting into the expansion tank. A phone call to a trusty plumber friend, and I'm pretty convinced that there is now some air in the system. Looking back I think this might have been caused by trying not too lose all the water in the system by turning off as many radiators as I could at both ends before draining down.

So this Saturday, I started to investigate.

The boiler is situated in a sort of utility room that links the house with the garage, and in the garage loft above there is a sort of pressure relief valve that I had trouble with last year when it started leaking. I wondered if this was adjusted down too tightly and was not allowing any air to escape, so up I went for a fiddle. DISASTER. The rubber o-ring is perished and, before I know it, the system is pissing out and dripping down into the wall mounted boiler below. A quick panic has me draining down the system again, and rushing off to B&Q to get a new o-ring. Once refitted, all seemed OK, until a couple of hours later I notice that the boiler is not firing at all, the whole system is off and the fuse has blown. To cut a further chapter short, the water from the leak has dripped down into the top of the pump that is sited under the boiler and cause the pump electronics to blow...... pump now f**ked. Another trip to Wickes this time for a new pump. Manged to fit that, but now one of the pump valves has a tiny leak from the screw that turns to isolate the pump. A common problem apparently.

Next weekend I'll be draining the system again to fit new pump valves.

The only good point about this is that the system does seems a lot quieter now.

I'm sure it's on borrowed time as the boiler is over 20 years old. Although I've replaced a boiler in the past, I wont be doing it again, so maybe this summer we ought to get it looked at?

Ubuntu upgrade to 7.10 problems!

I don't use my dual boot Ubuntu that often except that it's wireless network seems far more performant and reliable than that on XP running on the same machine using the same USB wireless adaptor. Irony follows....

I boot into Ubuntu, and like nearly always, it prompts me to do some software upgrades, this time asking me to upgrade the whole OS. Like a fool I accept. About an hour later, it's all done, but no network! Woe is me.

Resort to trusty google, and this pops up! Lug the desktop down to the router to get a network connection, and it all worked fine.

Not good marks for Ubuntu though.

Monday, 3 March 2008

Michael Clayton

Last night I watched "Micheal Clayton", one of 2007s most well received and awarded movies. A couple of things about this made me think.

Firstly, I downloaded the film using BitTorrent, naughty me! However, is there a difference between doing this and watching the film once, and just borrowing the
DVD from a friend, and doing the same. Are both illegal?

Secondly, more directly related to the film, what was all the fuss about? OK, it was a reasonable film, but how does Tilda Swinton get awarded an Oscar
for best supporting actress? It seemed to me she was only on the screen for about 5 minutes in total.