Professional Webmasters Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Introducing the Google Command Line Tool

Go down

Introducing the Google Command Line Tool Empty Introducing the Google Command Line Tool

Post  andry Wed Sep 01, 2010 4:50 am

GoogleCL is a command-line utility that provides access to various Google services. It streamlines tasks such as posting to a Blogger

blog, adding events to Calendar, or editing documents on Google Docs.
Having Google's services at your fingertips in the Terminal may not sound super cool, but if you want to incorporate, say, fetching Google Calendar events, Google contacts, Google

Docs, or Picasa photos into your scripts, GoogleCL is extremely handy (and long overdue). GoogleCL is a python program that can access and perform a number of actions in Blogger,

Calendar, Contacts, Docs, Picasa, and YouTube.

Install GoogleCL
Download both the gdata python client library
and GoogleCL. Unzip the tarballs or zip files and note the location of the folders (for the below example, I've left

mine in ~/Downloads). Then, open up a Terminal window and type the following commands, entering your password when prompted:
cd "~/Downloads/gdata-2.0.10/"
sudo python setup.py install
cd "~/Downloads/googlecl-0.9.5/"
sudo python setup.py install
When you're done, GoogleCl will be installed on your computer. The first time you use it for a service, it will prompt you for your Google username. Type it in and hit enter, after

which it will give you a URL that you can copy and paste into your browser to grant GoogleCL access to your account. Once you've done so, go back to the Terminal and hit enter to

complete the authorization. You'll have to go through this process for each Google service, but only the first time you use them.
You now have access to a number of different tasks in the aforementioned Google services that you can run in the Terminal or in shell scripts. You can post videos to YouTube,

schedule new appointments in Google Calendar, create and edit Google Docs inside Terminal, export your Gmail contacts list, and more. For more information, check out Google's

example scripts, as well as GoogleCL's manual page
andry
andry
Moderator
Moderator

Posts : 467
Join date : 2010-05-07

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum