What class do we have next?

Timetables are one of the things my University just doesn’t get right.

You have to go on the website every now and then to either download your timetable as PDF, or export in iCal format if it’s available. But those aren’t going to be up to date if the timetable changes, and you’ll have to start over.

Up to now, there was always someone to come up with a system to provide an iCal link you could add to you calendar, which would always be up to date. This year however, the other year’s solutions are either down, or not updated for this school year… So I decided to give it a shot!

Since I know it’s possible to generate an ics from the website, I was hoping it would be possible to just call an URL and be done with it. Well, it’s not so simple; this solution doesn’t provide anything useful.

So I searched the web, and found some source code for some previous projects that access the same timetable software as me (ADE Campus).

One solution that came up, was to mimic a user interaction to generate the calendar. This ended up being kinda clunky, and didn’t really work well. Also I had no idea what I was doing.

The best solution however, came from some project who was kind enough to share their code on Google code, and it turns out ADE has a web API which is however undocumented.

This way, after getting a session key and setting a project (~school year) to use, we can retrieve XML data for a given resource (class/group).

Then it’s simply a matter of parsing the XML and creating an iCal with the extracted data.

I’ve again set up a cron job to generate the calendars every day; Once the calendars are uploded to the net, we can add their URL to our Google Calendar, and have an up-to-date timetable right on our phone!

Calendars can be found here: stic.imnotacyb.org
GitHub repo is here: github.com/JohannDickson/UDS_edt

 Update (20/01/14)
The University –finally– officially supports the export of calendars from ADE in a way that’s useful.

This entry was posted in Software, University. Bookmark the permalink.

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.