Google has released a command line tool to access many of their services. This is obviously handy for batch processing with scripts. The tool is largely written in Python and is open source, so it's highly portable and runs on the Mac.

The following services are currently supported:

Blogger

Calendar

Contacts

Docs

Picasa

Youtube

The easiest way to install these tools is using MacPorts. If you don't have MacPorts installed, the current version's installer is available on disk image from the link above. You will need to have the Apple Developer Tools installed to compile programs. [crarko adds: googlecl is also available from Fink, if you use that package manager instead.]

If you already have MacPorts, run the following commands in Terminal:

sudo port selfupdate
sudo port install googlecl

This will update MacPorts to the most recent release, and then fetch and build the GoogleCL utilities.

The GoogleCL project page has many example of use, including example scripts. You can also download source code from there.

A simple example of use is google contacts list name,email > contacts.csv, which will fetch your contacts list and save it to contacts.csv in the current directory.

The first time you run the google command to access information from your Google accounts, you will be asked to log into those accounts and authorize the utility for access.

[crarko adds: I tested this, and it works as described. It may take a while to build and install the packages.]

I just downloaded the source (in .tar.gz form), decompressed it, and ran the installer script according to the instructions, and it installed just fine. My system is Snow Leopard with XCode and all the latest updates installed.