Thanks to the CPAN Perl community, you can get all your Flickr pics as RDF-if you have linux, its just a few steps away.
The relevant documentation:
- http://www.aaronland.info/perl/net/flickr/backup/ – docu of Aaron Straup Cope’s flickr backup tool
- http://www.flickr.com/services/api/auth.howto.web.html – how to get a flickr key
Perl documentation is excellent. I have seldomly seen such a clean
documentation as Aarons tool and the other tools used. It is minimal, it is simple, it doesn’t miss one point.
He has example RDF output and example documentation, how to tie everything together was easy to find out using CPAN.org.
You will need a flickr API key and secret.
At this point, you need also the auth_token of the key, this is trickier to do.
I moved sidewards to get the token, as I coded with flickr before,
I had a PHP application running that I used to get the auth_token.
The php-flickr API was Dan Coulter’s phpFlickr Class 2.1.0,
and it has this getToken.php file that you can tweak to do the right thing.
I am sure you can get the same with Perl. Once you got the key, secret, and auth_token, install the libs:
get Perl (well, a typical linux distro depends heavily on Perl, so you probably have it already).
get the CPAN module for Net::Flickr::Backup, I used the perl cpan shell for this (sudo is needed because it installs the perl modules in the shared libs):
in the perl shell, install the backup module:
Now, it asks you many questions. In my case, pressing return most of the time did a good job.
Once you have it installed (perl will say if it doesn’t), you can run the Backup by writing a script.
I created two files, one for the config, one for the perl that runs:
flickrbackup.config: (note: the aaaaaa are used to hide my secret keys)
my $cfg = new Config::Simple(filename=>”flickrbackup.config”);
my $flickr = Net::Flickr::Backup->new($cfg);
my $feedback = Log::Dispatch::Screen->new(‘name’ => ‘info’,
‘min_level’ => ‘info’);
Now run the scripts:
Lean back and watch the photos + RDF manifest in your filesystem magically. In this case, RDF as a file format is helpful becaue it allowed Aaron to mix different aspects of the metadata.
You may get an error because some XML library misses, my error message contained
“Can’t locate XML/LibXML.pm in @INC”
Luckily, this mailinglist post tells you what to do:
This may fail with some weird message, I ignored this and run my backup script again.