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:

7 comments:

  1. Would you mind if I ported this to a different language and released that under an Open Source license?

    ReplyDelete
  2. This sounds like EXACTLY what I need, but I don't know where to begin to get this to work. Are there more detailed installation instructions somewhere?

    ReplyDelete
  3. Sure - email me direct if you don't know how to set this up with Java - I'll help you out.

    ReplyDelete
  4. inspired by your post I've tried to implement the same in Python (I feel it is more suitable for writing command line scripts than Java) and it works nice. There are also nice Getting Started guides for google-data bindings.

    It is such a joy compared to the last attempt to build command line uploader for facebook.

    ReplyDelete
  5. I want to do it under windows, but I don't know how to do it. Do you have this code compiled?
    it's possible to have all the necessary into one only .jar?

    Thanks!!!

    Juan

    ReplyDelete
  6. I've taken a broadly similar approach in Python which (should be) cross platform compatible. It certainly works on Linux

    https://github.com/leocrawford/picasawebsync

    The upload works fairly well, and the download and sync are well on their way

    ReplyDelete