Enhanced hCalendar download links
Posted on
Introduction
A script that automatically transforms links to Technorati's events service into a useful little menu allowing events to be downloaded or added to various online calendar services. If you want to see it action check out this live demo.
It's a bit rough around the edges (there's a list of issues below). It uses Dan Webb's Sumo microformats parser to extract event details (some online calendar services don't support iCalendar import, so the details need to be passed directly) and JQuery to manipulate the page.
Files
The latest version of the script is kept in a public repository on GitHub
How to use
- Mark up your events using hCalendar
- Add a link to Technorati's events parsing service. For example, the link for this page would be http://technorati.com/events/http://georgebrock.com/blog/enhanced-hcalendar-downloads
- Add all the relevant Javascript files to your page (Sumo's microformat.js and hcalendar.js, jQuery and enhanced-hcalendar-downloads.js)
- That's all you need to do, but you might want to add some CSS rules to make the menu prettier (start here: enhanced-hcalendar-downloads.css)
Issues
- The current version only supports duration in the format
PTminutesM
. If a dtend is provided it will be used in preference to duration. - Sumo and Technorati both have some quirks about which variations of the ISO 8601 date format they support.
- If you include a fragment in the URL you pass to Technorati, the script will use the first event found in that container to generate the Google and Yahoo! calendar links. Unfortunately the Technorati service will ignore the fragment and parse all the hCalendar instances on the page, I've asked them if this can be changed.
1 Comment
Tantek Çelik commented on :
Hi George, I hope you're doing well!
The Technorati contacts and events feed services are now offline (2012), however you can use H2VX.com instead, e.g.:
Instead of: feeds.technorati.com/contacts/
use: h2vx.com/vcf/
Instead of: feeds.technorati.com/events/
use: h2vx.com/ics/
Instead of: webcal://feeds.technorati.com/events/
use: h2vx.com/ics/sub/
I've gone ahead and edited the code in github and issued a pull request accordingly.
Please feel free to update your article to change the Technorati feed links/examples to H2VX.
Thanks!
Tantek