Thursday, 7 May 2009

Internet Explorer (IE) accelerator for Google Calendar

Accelerators are a nice new feature in Internet Explorer 8 (IE8). You can highlight text, click on the accelerator icon and the text gets sent as a parameter (GET or POST) to an Internet-based application. It can be used for example to send the contents of a webpage to Windows Live Mail, Gmail or Yahoo! Mail, look up a word in Encarta, Wikipedia or Dictionary.com, add a bookmark to Facebook, del.icio.us, Digg or Reddit, look-up a street address on Windows Live Map, Google Maps, Yahoo! Maps or MapQuest, translate a word on Windows Live Translation, AltaVista’s Babel Fish or Google Translation etc.

I was looking for an accelerator for Google Calendar but couldn't seem to find one so I created my own.

It is surprinsingly easy to create an accelerator. All you need is to host an XML file on a publicly accessible website:

<?xml version="1.0" encoding="UTF-8"?>
<os:openServiceDescription
xmlns:os="http://www.microsoft.com/schemas/openservicedescription/1.0">
<os:homepageUrl>http://www.happyads.ch</os:homepageUrl>
<os:display>
<os:name>Google Calendar</os:name>
<os:icon>http://www.google.com/accounts/calendar/favicon.ico</os:icon>
<os:description>Add to Google Calendar</os:description>
</os:display>
<os:activity category="Add">
<os:activityAction context="selection">
<os:execute action="http://www.happyads.ch/googleCalendar" method="get">
<os:parameter name="action" value="TEMPLATE" type="text" />
<os:parameter name="text" value="{documentTitle}" type="text" />
<os:parameter name="dates" value="{selection}/{selection}" type="text" />
</os:execute>
</os:activityAction>
</os:activity>
</os:openServiceDescription>


and create a button linking to the XML file:

<button id="myButton" onclick="window.external.AddService('http://www.happyads.ch/googleCalendar/accelerator.xml')">Add Google Calendar Accelerator</button>

As dates can come in several formats I have used a website I own to do the date parsing: http://www.happyads.ch/ (the parsing is done using the PHP language). Once the date has been parsed and transformed into a Google Calendar compatible date (yyyymmdd e.g. 20091231) it is then automatically forwarded to Google Calendar.

Why not try it out and tell me what you think of it:



Of course you need a Google Calendar account for it to work.

At the moment the following date formats are supported:
  • yyyymmdd (e.g. 20091231)
  • dd.mm.yyyy (e.g. 31.12.2009)
  • dd.mm.yy (e.g. 31.12.09)
  • dd/mm/yyyy (e.g. 31/12/2009)
  • dd/mm/yy (e.g. 31/12/09)
  • dd-mm-yyyy (e.g. 31-12-2009)
  • dd-mm-yy (e.g. 31-12-09)
  • (d)d month yyyy (e.g. 31 december 2009)
If you want me to add a new date format (or if you have a problem) simply add a comment and I will see what I can do.

Please bookmark, your votes are noticed and appreciated:
Bookmark and Share

No comments:

Post a Comment