With the release of GoogleCL, the command line tool for the Google data APIs, Google reconfirmed if that was needed that it’s a geeky company (I mean you would not expect something like this form M$, right?) and they like command line tools. They released some basic command line tools for calendar, contacts, docs, picassa, blogger and youtube. Of course, coming from google the tools are written in their preferred language, python.
1 2 3 4 5 6 7 8 9 10 | |
There is a deb package available for ubuntu/debian_lenny, and source package for other distributions. The only requirement is Python 2.5 or 2.6 and the gdata python client library. You can install the package manually just as any python package:
1
| |
For MacOSX if you are running MacPorts, it is easier to install gdata and googlecl from ports (also easier to keep them updated in the future). The install should be as simple as:
1
| |
in case you don’t see it in your source list, just run a port selfupdate:
1
| |
Usage
There are several good examples on the project page, but basically each service has the ability to list, add and delete. Here are some simple examples for calendar:
List events for today only:
1
| |
and the same with some nicer formatting:
1 2 | |
we can also do a query after some strinng:
1
| |
and adding a new event:
1
| |
or delete an event:
1
| |
Calendar is definitely the most important one for me, but contacts and docs are also great to be controlled from the command line. I would like to see the same for Gmail in the future ;).