Sunday, October 05, 2008

Picasa Web Album Command Line Upload

I wrote this code some time ago before Picasa Web Albums had a good uploading solution for Linux users. This code uses the the Google Data APIs. While there is a better upload solution for Linux now (Picasa for Linux) some of you, like me, might prefer a command line driven upload method. This allows you to upload a batch of photos by issuing a command like this:



So, for example, you might issue a command like this:



This would initiate an upload of all the jpg files in the current directory to my Picasa Web Albums under an album name of Honolulu with a throttling delay of 3 seconds. The picasa script, which calls my java code, is a simple script as follows:



And finally, the java code that does all the magic, note that you will need to compile / run against some Google Data API jar files as indicated in the comments: