Access Google Data API From Command Line

Googlecl is a google utility to access Google Data API from command line. Googlecl is written in Python programming language. Googlecl allow you to update your blogger blog, Picassa, Calender, Contact, Google Doc, and Youtube videos. This tool connect to Google service using Google Data API. Since it is written with Python, it’w work on cross platform such as Linux, FreeBSD, Windows and Mac OSX.

To install GoogleCL, you need to install it’s dependency:

  1. Python 2.5 or 2.6
  2. gdata >= 1.2.4 (preferably 2.0.x)

To install it on Ubuntu/Debian:

  1. Download googlecl deb file.
  2. Install it with this command:
    sudo dpkg -i googlecl*.deb

To install it on Windows:

  1. Download the googlecl for win32.
  2. Extract it and install.

To install it on MAC OSX:

  1. Install it from port command:
    sudo port install googlecl

For others you can grab the source file, compile and install it:

tar xf googlecl-x.x.x.tar.gz
python setup.py install --record=files.txt

Here is the basic example command:

  • Blogger
    $ google blogger post –title “foo” “command line posting”
  • Calendar
    $ google calendar add “Lunch with Jim at noon tomorrow”
  • Contacts
    $ google contacts list Bob name,email > the_bobs.csv
  • Docs
    $ google docs edit “Shopping list”
  • Picasa
    $ google picasa create “Cat Photos” ~/photos/cats/*.jpg
  • Youtube
    $ google youtube post –category Education killer_robots.avi

With this very useful tools, there is a lot you can do. Like make a software or web application to manage your data in one place, or make an automation tools for it. Just grow your idea and expand your skill. I am myself haven’t explore it in deep. But i will. So stay tunes and i will make another article about googlecl.

More details: googlecl homepage.
More example scripts: googlecl example.

Comments

  1. guest says:

    but how is knowing the user you have to google?.. in the command line should be a user and a password… or is a config file?

Give me your feedback

This site uses Akismet to reduce spam. Learn how your comment data is processed.