Earlier I came across a post on Lifehacker about gcalcli, a python script which provides a command line interface to Google Calendar. It lets you search and display your events, even quick add new ones from the command line. Here’s how I got it running in Feisty and Gutsy:
First we need 2 additional python modules. Download the latest version of GData and dateutil and extract them. Open a terminal, cd into the first extracted folder and enter
sudo ./setup.py install
Run the same command in the second folder. Both modules are now installed and you can download gcalcli. I extracted the script to ~/bin. Open the script in your favourite text editor and fill in your username and password. Save the script.
Test the script:
gcalcli list
If you see a list of your calendars after a few seconds, then congratulations. If not, go over the installation instructions again
Now to some examples on how to use the script:
- Search for events (matches whole words):
gcalcli search <text> - Display your events for a 6 day period:
gcalcli agenda - All events for October:
gcalcli agenda 10/1 10/31 - Display detailed events:
gcalcli --details agenda - Quick add an event:
gcalcli quick 'Lunch with Paul 1pm 10/4'
You can also display your events on the desktop with conky. Just add the following line to ~/.conkyrc:
${execi 300 gcalcli --nc agenda}
gcalcli can also pop up event reminders. The script uses gxmessage to display a window with the start time and title of an upcoming event. For this to work I had to install the gmessage package:
sudo apt-get install gmessage
To start the reminders use
gcalcli remind
You will now get a popup if an event is starting within the next 10 minutes. You can specify a different interval, e.g. gcalcli remind 30 will pop up a reminder half an hour before the next event. To run reminders in the background add it as a cron job.
See the gcalcli wiki for more options.
Possibly related posts:




