I’ve been working on being an event calendar curator ala Jon Udell’s system and was stuck getting a good calendar feed from the King Country Library System for my local Snoqualmie library. As in most projects, you start with some HTML page of calendar entries. In this case a search for Snoqualmie Library leads to this URL:
http://eventinfo.kcls.org/evanced/lib/eventcalendar.asp?ag=&et=&list&cn=0&private=0&ln=36
Which is missing the ICS feed. So the next step in the process is to try fusecal, which had done the trick many times before. However this time the page formatting was preventing fusecal from having useful event titles.
Today I came back and looked at the problem afresh. My first thought was that I could have something scrape the VCS links on the page and build a ical, but I really didn’t want to own any automation on my own servers (and I wasn’t ready yet to write a service on something like azure). So I poked into the link to the software maker of this calandar: Evanced. Fortunately there I discovered that some ical feature had been added to an eventsxml.asp. Putting that on the KCLS url I got:
Yay, I can see one event in XML. This is progress. Some sample code for client side rendering of eventsxml.asp gave me a couple parameters to try:
http://eventinfo.kcls.org/evanced/lib/eventsxml.asp?dm=xml&lib=all&alltime=1&nd=14
The next step was to filter to my specific library. Back on the HTML page there was one url parameter that seemed to be relevant; that ln=36. On the eventsxml.asp the same parameter doesn’t work, but lib=all was a tempting place to put my magic number “36:
http://eventinfo.kcls.org/evanced/lib/eventsxml.asp?dm=xml&lib=36&alltime=1&nd=14
Bingo! Now I’ve got a nice xml feed for local library. However I need ics. and trying dm=ics didn’t work. Remember back to the feature list calling it ical, I tried
http://eventinfo.kcls.org/evanced/lib/eventsxml.asp?dm=ical&lib=36&alltime=1&nd=60
Which along with the North Bend, Carnation, Fall City and Duvall is now in my delicious events curator list for Snoqualmie valley.