July 25, 2005

Greasemonkey and Microformats

I'll pontificate on this later, here's the short version. Some people include information about events in web pages so that if you have the right tools you can import them straight off the web to whatever calendar program you use. This format is called hCalendar.

I created a Greasemonkey user script that will find those hCalendar events and provide a link to import them into any calendar program that supports the iCalendar format (most notably Apple's iCal and Mozilla's Sunbird). What does this mean? Well any time you see an event on the web that has hCalendar information, you can click a link and it'll be added to your calendar so you don't have to copy the information by hand.

How do you get started?

  1. Install Firefox and the Greasemonkey extension
  2. Right-click on http://george.hotelling.net/projects/converthcal/converthcal.user.js and choose "Install user script..."
  3. Go to a page with hCalendar information (such as this one on Upcoming.org) and you'll see a link to add the event to your calendar

This is possible thanks to Brian Suda's X2V converter service. Suggestions welcome.

Update: Because Andy Hume keeps leaving comments asking for it I slapped together a version for hCard at http://george.hotelling.net/projects/converthcard/converthcard.user.js. Don't say I never gave you nothing.

Oh, and if you're looking to play with hCal, Les's Greasemonkey script (and screencast video) is a great place to start.

Posted by george at July 25, 2005 10:45 AM
Comments and TrackBacks

TrackBack URL: http://mt.gnerd.net/mt-gnerd-tb.cgi/2581

Nice one - this is the kind of thing I like to see. Real world uses for microformats.

Posted by: Andy Hume at July 25, 2005 12:43 PM

So when's the hCard one coming then? Should be fairly trivial to convert right?

Posted by: Andy Hume at July 25, 2005 12:51 PM

If you're looking for hCalendar-encoded events to add to your personal calendars, also check out www.evdb.com. Everything is hCalendar and hCard-encoded.

- Brian

Posted by: Brian Dear at July 28, 2005 12:26 AM
Greasemonkey & microformats: Getting started
Excerpt: This post presents a ten line javascript that can be used to identify and process virtually any microformatted content. The script uses the Firefox web browser's greasemonkey framework. The script and the general capabilities of modern web browsers s...
Read the rest...
Trackback from: The Community Engine Blog at July 28, 2005 06:45 PM

So, I installed the script and when I click on one of the hCalendar links on the pages you recommended it opened a dialogue box which asked me what program to use, or to save it to disk. I choose iCal (on MacOSX10.3) and it created a whole new calendar called X2V.

I'm a little at a loss as to what to do? Thanks

Posted by: David Thompson at July 29, 2005 04:59 PM

I did the same thing on Mac OS X 10.4 and iCal asked me which calendar I wanted to add the event to. I think that might be something that's changed between 10.3 and 10.4.

Posted by: George Hotelling at July 29, 2005 05:06 PM

I tried this with stand alone Mozilla Sunbird on Windows XP, but no event is added.

Can't find why, the data is in a good iCalendar format...

Posted by: Nicolas Hoizey at August 26, 2005 09:54 AM

Sorry, comments are closed.