Dabbling with Greasemonkey

As part of a very cool announcement on the part of Yahoo! Local, I ended up writing my first greasemonkey script yesterday. Local is now marking up events, business entities, and reviews with Microformats. This is an important announcement on Yahoo!’s part, not for the mere availability of the data (as it was always there), but instead because it means that development of third party applications for Yahoo! users can be accelerated. Such as, this GM script. Instead of copying-and-pasting, or hand-entering event info into your Y! Calendar, microformats make it simpler for the developer (me) to provide the end-user (you) with a bridge to move that info of interest around automatically. The general idea is that microformats are a catalyst for useful applications of data on the web, not as an end unto themselves.

Philosophy aside, the GM script detects hcalendar or hcalendar w/hcard embedded, and inserts a little icon that lets you add it to Yahoo! Calendar. It’s now available here.

It’s a pretty modified version of Scott Reynen’s Google hCalendar script. Among the things I ended up doing were adding in a switch to detect embedded hCard inside of hCalendar profiles, breaking out the individual address components of a venue for Y! Calendar to use, and adding in some fiddling to accomodate the Calendar GET-based one-time import.

It’s a pretty simple trick, but it might be a handy starting point to get an idea of the ease of extracting data from Y! Local or other sites for personal use.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.