We’ve started building our newest software package. One of the features I would like to include is the ability to access a calendar of events. It seems like it should be very straight forward. Just publish a "standards-based" format and then subscribe to it using a viewer. Well it almost works
We are a mostly Mac OS X based shop. I figured that a combination of iCal or Mozilla Calendar (once there is a version for Firefox 0.9.x for Mac OS X) or PHPiCalendar would allow me to generate an .ics file and subscribe to the URI (I also looked at using iWebCal but I just couldn’t get version 1.1 to run on my Mac and EventSherpa for my PC). This would provide a cross-platform and web-based solution to viewing generated calendar data.
I am able to generate a stream using Perl, Python, PHP or Java, but I just can’t seem to get iCal 1.5.2 to see any of the events. All of the other tools have absolutely no problem, which confuses me. This should be really straight forward, however it is causing me no end of grief, I am starting to wonder if it is a bug in iCal?
BEGIN:VCALENDAR VERSION:2.0 NAME:David Crow X-WR-CALNAME:David Crow X-WR-TIMEZONE:Canada/Eastern PRODID:-//David Crow//NONSGML iCalendar Template//EN CALSCALE:GREGORIAN METHOD:PUBLISH BEGIN:VEVENT UID:[email protected] URL;VALUE=URI:http://davidcrow.ca/ SUMMARY:Test Calendar Posting DTSTART;TZID=US-Eastern;VALUE=DATE-TIME:20040704T131610Z DTEND;TZID=US-Eastern;VALUE=DATE-TIME:20040705T133110Z ORGANIZER;CN=<a href="http://davidcrow.ca/">david</a> END:VEVENT BEGIN:VEVENT UID:[email protected] DTSTAMP:20040705T0900Z DTSTART:20040705T110200Z DTEND:20040706T111700Z SUMMARY:Welcome to Canada CLASS:PUBLIC CATEGORIES:BUSINESS,HUMAN RESOURCES TRANSP:TRANSPARENT END:VEVENT BEGIN:VEVENT UID:[email protected] DTSTAMP:20040706T1300Z DTSTART:20040706T163000Z DTEND:20040707T010000Z SUMMARY:Laurel is in sensitivity awareness class. CLASS:PUBLIC CATEGORIES:BUSINESS,HUMAN RESOURCES TRANSP:TRANSPARENT END:VEVENT BEGIN:VEVENT UID:[email protected] DTSTAMP:20040705T1300Z DTSTART:20040705T163000Z DTEND:20040707T010000Z SUMMARY:David Rocks CLASS:PUBLIC CATEGORIES:BUSINESS,HUMAN RESOURCES TRANSP:TRANSPARENT END:VEVENT BEGIN:VEVENT UID:[email protected] DTSTAMP:20040708T0800Z DTSTART:20040708T093000Z DTEND:20040708T103000Z SUMMARY:Test Calendar Posting CLASS:PUBLIC CATEGORIES:BUSINESS,HUMAN RESOURCES END:VEVENT END:VCALENDAR
iCal 1.5.2 is empty when importing this file. It reports that a URI that generates a "This calendar file is empty. No new events have been added to your iCal calendars."
The other tools have no problems reading this file. I have saved a calendar from iCal and I am now adding different pieces of an .ics file that has been generated and successfully imported into iCal. Though what works and what doesn’t seems to be arbitrary, i.e. I am just guessing at the changes that matter.
The iCal2RDF converter has no trouble creating a valid RDF file from the pasted in iCal format. However, I don’t seem to be able to read the RDFiCal format in Shrook or Bloglines (though it validates using the W3 RDF Validator). I am starting to wonder if it might be easier/quicker to just export to RSS or other XML format and convert this to iCal format (it seems that I am not a lone in this camp Marc Cantor and Ray Ozzie have both suggested this previously). There are a bunch of cool tools to help automate this process:
- SemaView’s RSS to RDFiCal
- Masahide Kanzaki which includes an RSS to RDFiCal and a RDFiCal to iCal (which generates the same error from iCal)
On a related note, none of these tools support the VJOURNAL format specified in the iCalendar format. It would be great to use iCal to view my blog subscriptions without having to resort to using a VEVENT for each blog entry.