A tool that instruments some of the Google services to the unix command line.
- Home/download – http://code.google.com/p/googlecl/
- Example scripts: http://code.google.com/p/googlecl/wiki/ExampleScripts
- GoogleCL Brings Google Services to the Command Line (Lifehacker; 2010.06.18) http://lifehacker.com/5567258/googlecl-brings-google-services-to-the-command-line
- “The Beginner Guide to Use GoogleCL” by Tavis J. Hampton (makeTechEasier; 2010.06.23) – http://maketecheasier.com/beginner-guide-googlecl/2010/06/23
Installation:
- 1) Download gdata-python-client library from http://code.google.com/p/gdata-python-client/downloads/list
- 2) Download googlecl from http://code.google.com/p/googlecl/downloads/list
- Unpack both files and install them as follows:
tar zxvf gdata-2.0.10.tar.gz cd gdata-2.0.10 python setup.py install cd .. tar zxvf googlecl-0.9.8.tar.gz cd googlecl-0.9.8 python setup.py install cd ..
Examples
Following list is taken verbatim from the project page (http://code.google.com/p/googlecl/wiki/ExampleScripts). Idea is to grow this list as I find further tricks with this toolkit. Here it goes::
- Blogger:
- google blogger post –tags “GoogleCL, awesome” –title “Test Post” “I’m posting from the command line”
- google blogger post blogpost.txt
- google blogger list title,url-site # List posts
- google blogger delete –title “Test Post”
- google delete –title “Silly post number [0-9]*” # Delete posts matching regex
- google tag –title “Dev post” –tags “Python, software” # label an existing post
- Calendar:
- google calendar add “Dinner party with George today at 6pm” # add event to calendar
- google calendar today # List events for today only.
- google calendar list –date 2010-06-01,2010-06-30 # List events.
- google calendar delete –title “Dinner party with George” # Delete an event.
- google calendar today list –cal .* | egrep ‘\[.*\]’ # List all calendars
- Contacts:
- google contacts add “J. Random Hacker, jrandom@example.com”
- google contacts list name,email –title “J. Random Hacker”
- google contacts delete –title “J. Random Hacker”
- Docs:
- google docs delete –title “Evidence”
- google docs list title,url-direct –delimiter “: ” # list docs
- google docs upload the_bobs.csv ~/work/docs_to_share/*
gdata-python-client >= 1.3.0 ONLY:
- google docs edit –title “Shopping list” –editor vim
- google docs get –title “Homework [0-9]*”
- Picasa:
- google picasa create –title “Vermont Test” –tags Vermont vermont.jpg
- google picasa get –title “Vermont Test” /path/to/download/folder
- google picasa list title,url-direct –query “A tag”
- google picasa post –title “Vermont Test” ~/old_photos/*.jpg # Add to an album
- google picasa tag –title “Vermont Test” –tags “places”
- google picasa delete –title “Vermont Test” # delete entire album
- Youtube:
- google youtube post –category Education –devtags GoogleCL killer_robots.avi
- google youtube delete –title “killer_robots.avi”
- google youtube list # list my videos
- google youtube tag -n “.*robot.*” –tags robot