NAME Net::Flickr::Backup - OOP for backing up your Flickr photos locally SYNOPSIS use Net::Flickr::Backup; use Log::Dispatch::Screen; my $flickr = Net::Flickr::Backup->new("/path/to/backup.cfg"); my $feedback = Log::Dispatch::Screen->new('name' => 'info', 'min_level' => 'info'); $flickr->log()->add($feedback); $flickr->backup(); DESCRIPTION OOP for backing up your Flickr photos locally. OPTIONS Options are passed to Net::Flickr::Backup using a Config::Simple object or a valid Config::Simple config file. Options are grouped by "block". flick * api_key String. *required* A valid Flickr API key. * api_secret String. *required* A valid Flickr Auth API secret key. * auth_token String. *required* A valid Flickr Auth API token. backup * photos_root String. *required* The root folder where you want photographs to be stored. Individual files are named using the following pattern : B/B/B/B
/B-B-B_B.jpg Where the various components are : * YYYYMMDD photo[@id=123]/dates/@taken * photo_id photo/@id * clean_title photo[@id=123]/title Unicode characters translated in to ASCII (using Text::Unidecode) and the entire string is stripped anything that is not an alphanumeric, underbar, dash or a square bracket. * size Net::Flickr::Backup will attempt to fetch not only the original file uploaded to Flickr but also, depending on your config options, the medium and square versions. Filenames will be modified as follows : * original The original photo you uploaded to the Flickr servers. No extension is added. * medium These photos are scaled to 500 pixels at the longest dimension. A _m extension is added. * square These photos are to cropped to 75 x 75 pixels at the center. A _s extension is added. * fetch_medium Boolean. Retrieve the "medium" version of a photo from the Flickr servers; these photos have been scaled to 500 pixels at the longest dimension. Default is false. * fetch_square Boolean. Retrieve the "square" version of a photo from the Flickr servers; these photos have been cropped to 75 x 75 pixels at the center. Default is false. * scrub_backups Boolean. If true then, for each Flickr photo ID backed up, the library will check backup.photos_root for images (and metadata files) with a matching ID but a different name. Matches will be deleted. * force Boolean. Force a photograph to be backed up even if it has not changed. Default is false. rdf * do_dump Boolean. Generate an RDF description for each photograph. Descriptions are written to disk in separate files. Default is false. * rdfdump_root String. The path where RDF data dumps for a photo should be written. The default is the same path as backup.photos_root. File names are generated with the same pattern used to name photographs. * photos_alias String. If defined this string is applied as regular expression substitution to backup.photos_root. Default is to append the file:/ URI protocol to a path. search Any valid parameter that can be passed to the *flickr.photos.search* method except 'user_id' which is pre-filled with the user_id that corresponds to the flickr.auth_token token. PACKAGE METHODS __PACKAGE__->new($cfg) Returns a *Net::Flickr::Backup* object. $obj->log() Returns a *Log::Dispatch* object. $obj->backup() Returns true or false. RDF This is an example of an RDF dump for a photograph backed up from Flickr : 1250 336/100 960 4.5 mm visbility sRGB 2005:08:02 18:12:19 All rights reserved. 4321/1000 0.05 sec (263/5260) 2005-08-02T18:12:19-0700 2005-08-02T18:16:20-0700 High gain up 32 100/100 1280 2005:08:02 18:12:19 20050802(007).jpg f/3.2 public 468 141 22 26 *sigh* 357 193 81 28 eww! 4f6f211958d5217ef0d10f7f5cd9a69cd66f217e Karl Dubost karlcow 326 181 97 25 Did you see that this shirt makes me a beautiful breast? 9 205 145 55 Do you want my opinion? There's a love affair going on here… Anyway. Talking non sense. We all know Heather is committed to Flickr. She even only dresses at FlickrApparel. Did they say "No Logo". Doh Dude. 216d56f03517c68e527c5b970552a181980c4389 George Oates George 355 31 103 95 (Yes… I love you heather, you are my dream star) 184 164 50 50 Baaaaarp! 433 103 50 50 (fuck… fuck…) asc 960 1280 2005-08-03T20:47:50-0700 62bf10c8d5b56623226689b7be924c64dee5e94a heather powazek champ heather san francisco sanfrancisco 202 224 50 50 dude! who did this? cameraphone cameraphone asc 375 500 2005-08-03T20:47:47-0700 asc 75 100 2005-08-03T20:47:47-0700 342 197 28 33 Is that just one big boob, or...? a4d1b5e38db5e2ed4f847f9f09fd51cf59bc0d3f Aaron straup VERSION 1.2 DATE $Date: 2005/09/01 22:41:33 $ AUTHOR Aaron Straup Cope TO DO Support for the Flickr API photos.getAllContexts method to record the groups, sets, etc. to which a photo belongs. SEE ALSO Flickr::API Config::Simple http://www.flickr.com/services/api/misc.userauth.html BUGS Please report all bugs via http://rt.cpan.org LICENSE Copyright (c) 2005 Aaron Straup Cope. All Rights Reserved. This is free software. You may redistribute it and/or modify it under the same terms as Perl itself.