GoogleCL: Command-Line Googling

GoogleCL: Command-Line Googling

July 26, 2010

More on command line

I recently came across the GoogleCL project, which provides a command-line interface to various Google tools (e.g.., Calendar and YouTube). It's a fairly recent project not currently available via Debian or Ubuntu, but you can download and install a .deb file from the project page.

The first time you run each command, you'll need to open a browser to log into your Google account and authorize access to that tool. This requires Javascript, so I couldn't do it from the console using w3m, but a graphical browser worked fine. After specifying the username and granting access that first time, it works automatically for future uses.

I particularly liked the idea of a command-line Calendar interface:

google calendar today
google calendar add "Pub at Royal Oak at 6pm"

The 'today' command worked fine, but unfortunately I got a redirect error from the 'add' functionality. The bug report claims that it's sporadic, but I got it every time I tried.

The Blogger interface seemed to work better:

google blogger post --title "Testing" "testing testing"
google blogger delete --title "Testing"

Both of these worked fine. To use a file for the contents of a new post, just provide the filename instead of the string:

google blogger post --title "Testing again" testingfile

There are also interfaces available to Contacts, Docs ('edit' gave me that redirect error, though), Picasa, and YouTube. Sadly, search and other Google services are not yet included, due to the lack of an API. Google CL is definitely not yet a fully mature project, so it's not appropriate for anything remotely project-critical. However, it's a neat idea worth keeping an eye on for future developments.

Juliet Kemp has been messing around with Linux systems, for financial reward and otherwise, for about a decade. She is also the author of "Linux System Administration Recipes: A Problem-Solution Approach" (Apress, 2009).

Follow ServerWatch on Twitter