Wednesday, April 16, 2008

Nautilus Google Docs Uploader

Right click, upload to Google.

I have been slightly interested in python for a while, but just never got around to actually writing anything. Not that I am enough of a programmer to be particularly swayed by one language over another - but the path of least resistance for writing plugins and such for the Linux desktop seems to by python. This was a simple project that taught me some basics, and since there isn't a nicely developed perl module for the Google API I went on with the python.

Lets say you just made a little spreadsheet in OpenOffice


Now you want to share that amazingly complex spreadsheet with your lawyer on Google Docs


Now it's up there...

google docs

and you can edit and share with friends

google edit

Nautilus, the Gnome file manager, lets you drop scripts of your choosing into ~/.gnome2/nautilus-scripts/. When you run the script on a file through the right-click menu the file name gets passed to the script. I knew this was possible, and have played around with OS X folder actions before, but I have to say that in practice this is a lot easier than AppleScript to me.

Grab the python script yourself, download and install the gdata python API, edit the file to have your own username/password, and right-click your way to uploading fun. Disclaimer: this is just a quick and dirty thing, do not expect it to be good.