|
Project Information
|
WelcomeThis work is inspired by http://skema.secretman.dk/ who provides a nice (= easy to read) calendar for students at Aarhus University, when given their student id number. The object of this project is to provide the calendar in the more widespread iCal format to allow easy import into different calendar systems. NamedroppingThere's also an issue created for this, but we might as well present it here: What should this service be called? So far the suggestions are:
Viewing the calendarA good resource for viewing the final calendar (if you don't like google calendar) is http://www.instantcal.com/ that lets you link directly to an iCal file, whereupon it generates the calendar. Structure of the programThe Form of the InputEach subject is formatted like this (from http://services.science.au.dk/apps/skema/ElevSkema.asp): Matematisk Analyse 1 Forelæsning
The BeastThe program takes a student's id number, an eight digit number, and makes a POST request to a site that returns the students schedule in HTML format. This is then (to be) parsed to produce a calendar in the iCal format. The noteworthy classes are: FetchTimeTable.javaFetches the time table from Aarhus University's own site, and saves the raw HTML to a .txt file. This is to allow the connection to be closed as fast as possible. Note that it is only the content between the <body> ... </body> tags that is saved. TimeTableParserParses the time table found in aarskort.txt and creates a series of activities, which are then passed to the Schedule class. Schedule.javaThe Schedule class represents the overall time table and is responsible for creating the final calendar. It's constructor receives a list of Activitys and the user's student card number (as a String) Activity.javaEach Activity has fields corresponding to the table entries (from the above example) like this:
The Activity class provides the conversion from the activities to iCalendar VEVENTs, when requested (from Schedule) Subject.javaImportant: The Subject class has recently been factored out, and has been removed from the repository! Future plansCreate a web service that provides a good (easy) interface for this program (a la skema.secretman.dk) |