Flickr, EXIF, Machine Tags

Comments

Good job Paul, that's quite similar to what I had in mind for my Flickr EXIF Explorer - shame that I never had enough time to get a proper public version out. Oh and thanks for the mention in the Flickr Dev blog :)
Hey blech,

I found your script and got started using it.
$ ./flickr_exif_machinetag.pl
Initialised
Got page 1 (of 7) of photos
Got page 2 (of 7) of photos
Got page 3 (of 7) of photos
Got page 4 (of 7) of photos
Got page 5 (of 7) of photos
Got page 6 (of 7) of photos
Got page 7 (of 7) of photos
I have 3106 to process
Can't locate object method "size" via package "f/4.5" (perhaps you forgot to load "f/4.5"?) at ./flickr_exif_machinetag.pl line 115.


I'm guessing f/4.5 is the aperture?

Any tips?

Thanks.

-D
Hi. I think some patches I recieved work on certain cameras but not others. If you're comfortable editing the file, then comment out the four lines from 113 to 116:

# if ($data->size() > 1) {
# $data = $data->shift();
# }
# $data = $data->to_literal();

Probably this really needs to be made more robust, by checking to see if size() is callable on $data in the first place, then doing so if necessary, but for now, that should fix it.
[this is good]
Nice.. I was searching for flickr api examples using perl so I could write a script to ... do exactly this. Bonus.

I've run into a slight snag, though. My script is dying midway through with this error:

I have 2579 to process
:5: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xB0 0x40 0x3C 0x2F

I tried adding this after it pulls the content:

Er, your script, that is..
Uh, okay, i guess there's a length-limit on comments:

I tried adding this after it pulls the content:

$content = encode('utf-8', $content);

but that yields:
Got 1 exif tags for 1210014874.
Error calling flickr.photos.addTags: Invalid signature

I assume changing the encoding mucks up the signature somehow.. ideas?

Hi. Sorry if the delay's been a bit slow in coming.

I've never had XML issues with my photos, so I'm a bit at a loss as to what your exact issue is. I am aware that sometimes Flickr ends up storing invalid Unicode sequences, and that you can't arbitrarily mess with the content that you're going to send back, because (as you've found) the signature needs to be correct.

If I was to redo this now I'd use JSON rather than XML (I have a patch against Flickr::API that enables this), but in the meantime I'd suggest catching the error and skipping that photo.

Good luck.

Post a comment

Already a Vox member? Sign in

About Me

Paul Mison
United Kingdom
del.icio.us:
blech
Dopplr:
blech
FFFFOUND!:
blech
Flickr:
blech
Last.fm:
blech
Other:
http://notes.husk.org/
Twitter:
blech
Upcoming:
blech

Neighborhood

Explore friends, family, friends & family, or entire neighborhood.

Archives

  • Powered by Vox