Langsung ke konten utama

GoogleCL Brings Google Services to the Command Line

GoogleCL Brings Google Services to the Command Line
Linux/Mac/Windows: Google's new utility, GoogleCL, allows you to access a handful of Google services from any *nix command line. Google's services are pretty easily accessible in their individual webapps, but if you've got a hankering for the command line, this is awesome.

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.

Ubuntu users can download a .deb package and install it right away, though Mac and Windows installation is a bit trickier. If you're the type that will be using GoogleCL, though, it's likely not beyond your skills. Note that before you begin, you'll need Python 2.5 or 2.6 installed, and Windows users will also need previously mentioned Cygwin. Update: It turns out Windows users don't need Cygwin. Here are some Windows-specific tips for installation, though.

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. Hit the link to read more and check out their page on Google Code, and share your favorite applications of these newfound commands in the comments!

POPULAR

Hacker Perusak Ribuan Situs Ditangkap

Pakistan telah melacak kelompok hacker besar dan memenjarakan 5 tersangka yang terlibat dalam merusak ribuan situs web domestik dan internasional dan penipuan online. “Hacker yang dikenal secara internasional telah ditangkap dalam operasi bersama negara-negara lain selama beberapa minggu ini,” kata staf senior Federal Investigation Agency (FIA) Mian Idrees. “Kami telah menggali hacker terkenal Grup Pakbugs dan menangkap 5 anggota grup ini,” katanya. Pihak berwenang menyita komputer dan perlengkapan lain yang terlibat dalam berbagai macam kriminal cyber, katanya. FIA mengatakan dalam sebuah pernyataan, grup ini terlibat dalam pembajakan atau perusakan ribuan situs web milik pemerintah, non-pemerintah dan organisasi internasional. “Mereka juga terlibat dalam penipuan kartu kredit dan penggunaan kartu kredit yang dicuri,” katanya. Pembuat Pakbugs, Jawad Ehsan alias Humza dipercaya berbasis di Arab Saudi, katanya. Tapi pendiri Hassan Khan telah ditangkap di barat laut Peshawa...

Irwandi, Hobi Nyetir Mobil dan Perempuan Cantik

Sebagai Gubernur Aceh, Irwandi Yusuf minta kepada rakyat tidak menggugatnya dalam dua hal. Pertama, menyetir mobil sendiri. Kedua, menikahi perempuan cantik. Sensasi sepertinya belum juga pupus dari diri dan model kepemimpinan Gubernur Aceh Irwandi Yusuf. Bayangkan, di tengah berbagai kritik tiga tahun “kegagalan” pemerintahannya, Dosen Fakultas Kedokteran Hewan Universitas Syiah Kuala ini, kembali mengeluarkan pernyataan yang membuat sebagian pendukungnya berdecak kagum. “Hanya dua hal yang saya minta pada rakyat Aceh. Lain saya berikan semuanya. Pertama, jangan gugat hobi saya menyetir mobil. Kedua, saya dicandukan untuk menyukai perempuan yang cantik, itu canduan dan saya punya istri cantik. Cuma dua hal itu yang saya minta.

Samsung Galaxy: Another Android Blasts Off

  IT'S getting harder and harder to keep up with all the latest Android mobile phone launches. They are like buses. You wait ages for one, and then about six come along at once. Hot on the heels of the Sony Ericsson X10, LG's first in the GW620, HTC and its Legend and Desire plus Samsung's own Galaxy Portal now comes this beauty. Again it's a Samsung. Again it's a Galaxy but this is codenamed the S and we've no idea why. It's hardly catchy.