views:

162

answers:

4

What are common methods / official standards for surfacing event or calendar data?

My use case is that I want to aggregate event information from several different websites into a single calendar or event listing (this is on an intranet, we have control over all websites). I want to ask the websites to present their data in a certain format so I can consume it.

Things that I have looked into:

  • iCalendar
  • hCalendar (microformat) - embedded into webpages, but then is a web-crawler necessary?
  • RSS - no clear standard for embedding time-specific data (event proposal that is still in 'Proposed' status http://web.resource.org/rss/1.0/modules/event/)

While iCalendar seems to be most commonly used, my hesitation is that it isn't easy for content creators to also present their data in iCalendar format. I suppose that is where hCalendar becomes useful.

A: 

Take a look at Duke University's Data Feeds. They provide calendar/event feeds in RSS and custom XML. They've also posted sample PHP/JavaScript code for how to consume their feeds. You might want to have the sites on your intranet provide their feeds in one of those 2 formats and use something similar to their sample PHP script to aggregate the feeds.

Calvin
+2  A: 

Present the calendar data as RFC 2445 iCalendar format.

Present a syndication feed of updates as RFC 5023 AtomPub format.

bignose
+1  A: 

I would recommend publishing the source information using hCalendar. You can then use a parsing library or service to convert from hCalendar to iCalendar (or some other useful format, like XML or JSON).

The benefit over publishing iCalendar directly is twofold:

  1. You only need to publish a single version of your information (HTML only rather than HTML and iCalendar).
  2. It's easier for your publishers, they will just need to make minor modifications to the HTML used to publish their events rather than learning a whole new format.

There are various microformats parsers that either run as web services or that you can install and run on your own servers. There's information on the microformats wiki: http://microformats.org/wiki/implementations, http://microformats.org/wiki/parsers.

In particular you might find X2V useful: http://microformats.org/wiki/implementations#X2V

georgebrock
A: 

I suggest using an Atom feed with XHTML entries containing hCalendar records.

Andrey Vlasovskikh