Friday, March 22, 2013

Google+ upload script

I'm a happy user of Geeqie Image Viewer - it's fast and does all I want from an image viewer. Except for publishing photos to Google+ (Picasa). To address this I wrote this very simple script. The script utilizes GoogleCL for the actual upload and Zenity for displaying GTK+ dialog boxes.

1) Install GoogleCL using your distribution package system or compile from source. If you already have GoogleCL installed make sure you have at least version 0.9.13

Ubuntu:
$ sudo apt-get install googlecl

2) Configure GoogleCL  

$ google picasa list-albums

You have to put in your Google username and you'll be redirected to web browser to allow access in your Google account. The webpage works in ELinks too if your're without X display.

3) Download gplus.sh script and put it in /usr/local/bin (if you want to adhere to FHS) or your favorite location (for example: $HOME/scripts). Make the script executable.


4) Enable script in Geeqie - go to Edit > Preferences > Configure Editors. Add a new entry with following content:

[Desktop Entry]
Version=1.0
Type=Application
Name=Google+ Photo Uploader
Exec=/usr/local/bin/gplus.sh %F
Icon=
Terminal=true
Type=Application
Categories=X-Geeqie;


Don't forget to update the Exec path to point to correct location of gplus.sh script. Save settings and you're ready to go! Select photos you want to upload, right-click > Edit > Google+ Photo Uploader. You can also set a keyboard shortcut in Geeqie Preferences > Keyboard.

 Any comments or suggestions for improvement are welcome!