Extracting iCalendar feeds from embedded Google calendars

One of the ironies I’ve uncovered while working on the elmcity project is that many folks are publishing iCalendar feeds without even realizing it. I’ve found a number of Drupal websites, for example, that present calendars as web pages without offering the corresponding ICS links. But the biggest source of implicit iCalendar feeds is Google Calendar.

Here’s a typical example of Google Calendar embedded in a web page: Commmunity Gardens of Huntington WV. Curators for the elmcity project have figured out how to extract the ICS URL from this kind of page:

  1. View the source of the page (or frame)

  2. Find the script that embeds the calendar

  3. Find the email address mentioned in the script — in this example: communitygardenshunt@gmail.com

  4. Form an ICS URL based on that address

OK, it’s not that bad. As Bill Rawlinson points out here, there’s a civilian (non-geek) alternative:

  1. Click the Google Calendar button

  2. Add the calendar to your Google Calendar application — assuming you’re signed up to use it

  3. Click Settings -> Calendars

  4. Click the calendar you just added

  5. Right-click its ICAL button and capture the link

But either method is cumbersome. So I’ve added a service that streamlines discovery of the iCalendar feed’s URL. The easiest way to use that service is to go here and install the gcal2ics bookmarklet. When clicked from a page with an embedded Google Calendar, like the Huntington Community Gardens calendar, it yields this:

URL of web page with embedded Google Calendar:

http://www.huntingtoncommunitygardens.com/8.html

ICS (iCalendar) URL for that calendar:

http://www.google.com/calendar/ical/communitygardenshunt%40gmail.com/public/basic.ics

Why would a service like Drupal or Google Calendar ever publish an HTML rendering of a calendar without also offering the corresponding feed URL directly? Because, I guess, we have all failed to teach people what feed URLs are, and show them why they matter.

Posted in Uncategorized

One thought on “Extracting iCalendar feeds from embedded Google calendars

  1. There are reasons people hardly publish ICS links:

    1) lack of standardization although RFC 2445 now has reached Proposed Standard status and that may change

    2) Regular calendar tools don’t make it easy to publish calendar info in human-readable (HTML) and ICS form. Outlook for example allows you to share calendars as ICS but we need to _easily_ create an ICS for an entire set of calendar objects _and_ one item per entry (one use case: Team schedules. Maybe you just want to open a link to add that one important game, rather than the whole schedule)

    3) Javascript implementations don’t allow you to open ‘text/calendar’ files, usually only ‘text/html’.

    There are probably others but those are three I can think of

Leave a Reply