- Install Launchy
- Install Python
Install the Google Calendar Python API from http://code.google.com/p/gdata-python-client/
- Extract the zip file contents into C:\Python25\Lib\gdata
- Open a command prompt in that folder.
- Run this command: python setup.py install
Create a new python file at C:\scripts\python\gcalquickadd.py and put the following code in it. Update the information below with your Gmail account where is currently says ‘youremail@gmail.com’.
!/usr/bin/python
Created by Edward Delaporte
http://www.edthedev.com
!/usr/bin/python
import gdata.calendar.service import gdata.service import atom.service import gdata.calendar import sys import getpass
yourEmail = 'youremail@gmail.com' client = gdata.calendar.service.CalendarService() client.email = yourEmail client.password = getpass.getpass() client.source = 'Google-CalendarPythonSample-1.0' client.ProgrammaticLogin() entry = sys.argv[1:] content = ' '.join(entry) event = gdata.calendar.CalendarEventEntry() event.content = atom.Content(text=content) event.quick_add = gdata.calendar.QuickAdd(value='true');
new_event = client.InsertEvent(event, '/calendar/feeds/default/private/full')
Open your Launchy configuration options; and add the following command to the Runner plugin:
Name: gcal Program: C:\scripts\python\gcalquickadd.py Arguments: $$Give it a try! In launchy, you can type gcal, hit tab, and enter your calendar item according to Google’s ‘Quick-Add’ format (i.e. ‘Dinner at 5pm’). A command window will pop up and prompt you to enter your Google password. Enter your password (it will be hidden as you type), then go check your Google Calendar to see that your agenda item was added properly.