
179 - EMBED ALL KINDS OF CONTENT IN CALENDAR EVENTS
HaCK
# 71
HaCK 71:
Using Google Calendar, you can create an event that has a date, a
title, a description, comments, and so on. But how about an event
that contains an image—or even a full web application?
Google Calendar accepts external calendars in two different formats: the XML-based Google
Calendar Data API format, and the cross-industry iCalendar or “iCal” format. iCal is just a simple
text le that follows some straightforward syntactic rules. Following is an example calendar, which
you can create as a plain text le using an extension like *.ical and then upload to your web site:
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
X-WR-CALNAME:Book Reader's Club Events
BEGIN:VEVENT
DTSTART;VALUE=DATE:20070929
DTEND;VALUE=DATE:20070930
SUMMARY:Book Reader's Club Meeting
END:VEVENT
END:VCALENDAR
As you can see, the iCal calendar is split up into several lines, each of which is in itself split up
into name/value pairs separated by a colon character. The calendar starts with the line “BEGIN:
VCALENDAR” and ends with “END:VCALENDAR”. In between, you will nd more information on this
calendar—here, the calendar name “Book Reader’s Club Events”—as well as the specic events,
along with dates and titles. The date format is YYYYMMDD, so 20070929 means September 29, 2007.
...