Thursday, December 25, 2008

Picasa Download Script

First of all, this is a mess. It uses a bunch of junk in 'daveperl', which is like my personal collection of perl idioms. Stuff like cat_file() that I use all the time and hate re-coding. I need to extricate this script from that stuff before it can really be useful to other people.

It used to use some Google Picasa perl library, but I grew really impatient with it. It's coded up in some really weird ways that do things like dynamically create perl objects and functions out of the XML that gets spit back from the Picasa API. It is pretty arcane stuff that I never did get working right mostly because it is a deal project.

The current stuff (I think) depends on the CPAN Picasa library and not the Google stuff any longer. But, there may be a dependency on the Google stuff in a place or two.

http://sr71.net/projects/picasa/

It basically goes and finds all the Picasa pictures, then sees if it has local copies. If not, it downloads them and sticks them in a directory. It caches things like the album modification time so it can speed things up not having to download the contents of *each* album during every execution. It uses filenames and exif timestamps to determine uniqueness. I don't do checksums because those change with picture rotation. If anyone finds this compelling or useful, let me know. I'll start trying to clean it up a bit so others might get some more use out of it.

Friday, December 19, 2008

Freestanding Server

People have asked a few times if there is a freestanding server or some other program to which the Eye-Fi card can upload. No, not really.

Here's how the Eye-Fi card and service work, at least in the way that I have them set up. This differs for the Eye-Fi "Home" card, or if you don't have the "upload to Internet" (or whatever it is really called) enabled.
  1. You take a picture, and dump it on your card
  2. Your card notices the picture gets on the network and looks for your PC. If it can't find your PC, it uploads directly to api.eye.fi (an Eye-Fi managed server on the internet)
  3. If it can find your PC running the Eye-Fi Manager, it uploads to your PC and lets the PC upload to Eye-Fi. The PC keeps a copy if you asked it to.
  4. The Eye-Fi server looks at your preferences and uploads pictures to Picasa, Flickr or whatever you want.
"Gallery" which I think is a collection of CGI script to manager photo uploads is an option as a destination to which Eye-Fi can upload. So, you can have Eye-Fi upload to a server that you run, but your pictures pass through their servers on the way. I haven't bothered doing this. When I first went and looked at Gallery, it had some big scary security holes in it that scared me away.

There were a few people working on a server to replace the Eye-Fi Manager. I have not heard about that effort in a while. There are some security mechisms built into the card to keep it from uploading to unauthorized software which make this hard to do. I don't think this is Eye-Fi being nasty or hating Linux or anything. It's a genuine security feature to keep the "bad guys" from tricking your card into sending all its pictures to the evil hackers. I would love to write a open replacement for this part of the Eye-Fi Manager, but I'm not sure how feasible that would be and still ensure that the "bad guys" don't do the same. I'd be more than willing to give it a shot if I had some idea how the card authentication worked.

What I do personally is that I trust Eye-Fi with my pictures. I let them go to Eye-Fi, then get uploaded to Picasa. I paid the $20/year or whatever it was to get 10GB of extra storage at Google. Then, I use the official Picasa API and some perl to download the pictures from Picasa back to my web server where I stick them in my own photo album. The downside to this is that I have to trust Google and Eye-Fi with my pictures along the way. The upside is that when I take a picture, it automatically gets backed up in three different places.

Thursday, December 18, 2008

Eye-Fi Config Release 006

Someone asked for this, so here you go!

This basically just adds WEP support. It only handles the WEP-128 keys specified as hex. This was not hard to add since the EyeFi card has most of the smarts to do the network type selection internally.

http://sr71.net/projects/eyefi/eyefi-config-006.tar.gz

I still need to figure out how to get the firmware updated without going into Windows. There' some experimental code in here, but it does not work.