Adopting hCal

February 2, 2008

We’re using hCalendar (or hCal) for importing events. If you would like to share your events with calagator.org right away, here’s an example, followed by a short explanation of the markup needed.

<div class="vevent">  
   <a class="url" href="https://calagator.wordpress.com">https://calagator.wordpress.com</a>
   <abbr class="dtstart" title="20080216T10:00">February 16, 2008, 10am</abbr>-
   <abbr class="dtend" title="20080216T18:00">6pm</abbr>
   <span class="summary">Calagator Codesprint</span> -  at
   <span class="location">Cubespace</span>, 622 SE Grand Ave. Portland, OR 97214
   <div class="geo">:
      <span class="latitude">45.51845</span>
      <span class="longitude">-122.66056</span>For more information, check with:
      <span class="contact">Audrey Eschright</span>
   </div><!-- end geo -->

Tags:
   <span class="category">calendaring</span>
   <span class="category">aggregation</span> 
   <span class="category">alligators </span>

   <div class="description">
The Calagator Development Team is meeting every 2 weeks to create a calendar aggregator for local technical events. We're working with Ruby On Rails, writing documentation, gathering information about standards, and trying to increase the use of calendar standards like hCalendar.
    </div>
</div><!-- end vevent -->

Today, Calagator recognizes the following classes:

  • vevent
    • dtstart (without timezone information)
    • summary
    • url

The import routine also recognizes multiple events on a single page.

Venues can be added through the web interface. The hackers will be working on recognition of the ‘location’ class soon.

*******

To make a valid hCal markup, you need to define three classes at a minimun:

  • vevent
    • summary
    • dtstart

These classes can be added to any HTML tag and do not need to be styled. Once you’ve added these basic tags, Calagator will recognize the event.

Other tags you might consider using include:

Once you’ve done that, you can test our import at http://calagator.org/sources. If there’s a bug, click the Bugs link in the upper right hand corner and let us know what went wrong.

If you’d like to test your hCal before submitting to the Calagator, there is a Firefox plugin called Operator. Operator detects many different microformats in a webpage.

If you’re interested in learning more about what hCal has to offer, have a look at the microformats.org hcalendar explanation. There’s also a cheatsheet, and a list of hCalendar implementations.