Awesome Conferences

Google Command Line Tool

I try not to use this blog to flog my employer's products but I just used the open source "Google Command Line" program and I have to spread the word... this really rocked.

I wanted to upload a bunch of photos to Picasa. I didn't want to sit there clicking on the web interface to upload each one, I didn't want to import them into iPhoto and then use the Picasa plug-in to upload them. I just wanted to get them uploaded.

Google CL to the rescue! It is a program that lets you access many google properties from the command line. It works on Mac, Linux and Windows. After a (rather simple) install process I was ready to give it a try.

Here's the command line that I typed:

$ google picasa create --title "2010-08-09-Hobart-Tasmania-SAGE-AU" ~/Desktop/PHOTOS-AU/*

I was expecting it to ask me for a username and password but I was surprised when it my web browser popped up, asked me to authorize this script to have permission to log in (just like third-party apps that authenticate against Google), and when I was back at the command line I pressed "return" to continue. The upload began and finished a few minutes later.

In addition to picasa, the command can also access blogger, youtube, docs, contacts and calendar.

Posted by Tom Limoncelli in Technical Tips

No TrackBacks

TrackBack URL: https://everythingsysadmin.com/cgi-bin/mt-tb.cgi/1150

2 Comments | Leave a comment

I particularly like the ability to open Google Documents in vim. I snarfed this function from somewhere and put it in my .bash_profile:

function gdvim {
TITLE="$@" ;
if [ ! "$TITLE" ] ; then
echo -n 'Title ? ';
read TITLE;
fi;
google docs edit \
--title "$TITLE" \
--editor $EDITOR;
}

Well, the indentation wasn't preserved, but I'm sure you can imagine it...

Leave a comment

Credits