Getting the ical/ics feed from a King County Library

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:

http://eventinfo.kcls.org/evanced/lib/eventsxml.asp

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.

Advertisements

3 thoughts on “Getting the ical/ics feed from a King County Library

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s