This repository has been archived by the owner on May 6, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
419b2b4
commit 5107f48
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (C) 2011 by Leo Cassarani | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
# Timetable | ||
|
||
Timetable is a web-based parser for the Imperial College Department of Computing timetables. It is written in Ruby and the Sinatra web framework. | ||
Timetable is a web-based scraper for the [Imperial College](http://www.imperial.ac.uk) [Department of Computing](http://www.doc.ic.ac.uk) timetables. It is written in Ruby and the [Sinatra](http://www.sinatrarb.com/) web framework. | ||
|
||
## The problem | ||
|
||
The Department of Computing at Imperial College London only publish their timetables as a series of HTML tables where every cell represent an hour-long slot (see [example](http://www.doc.ic.ac.uk/internal/timetables/timetable/autumn/class/3_2_11.htm)). Not wanting to miss any lectures because of their convoluted format, I wanted to import all the events into iCal (or equivalent calendar software) for easy and quick access. | ||
|
||
## The solution | ||
|
||
Given the user's degree course and year of entry, this will fetch the HTML pages corresponding to their timetable (and cache them for later), parse them, and finally output the resulting information as an iCalendar feed, which is supported by all the major calendar applications. | ||
|
||
## Presets | ||
|
||
A very common feature request I got was for users to be able to selectively exclude the modules they weren't taking from their timetable - in other words, users wanted to have a personalised timetable based on the modules they were taking. | ||
|
||
Users can now visit the main timetable page and, after selecting their year of entry, untick the boxes corresponding to the modules they're not taking this year. The list of excluded modules forms a "preset", which gets saved to a [MongoHQ](http://mongohq.com) instance and is used to filter out the contents of a user's timetable every time their feed is generated. | ||
|
||
## URL scheme | ||
|
||
Users without a preset (no modules excluded) can access their timetable directly by visiting `/course/year_of_entry`, e.g. `/comp/09` for Computing students who started their degree in 2009. Presets, on the other hand, have a 5-letter unique name associated with them, and can be simply retrieved at `/preset_name`. | ||
|
||
## Copyright | ||
|
||
Copyright (c) 2011 Leo Cassarani. See LICENSE for details. |