When and where do exams happen? idk let's find out. Scroll or drag with your mouse on top of the date range to adjust the time window seen in the map.
Check it out at invigilou.bencook.ca!
The server code is in Clojure. You will need Leiningen 2.0.0 or above installed.
Check out project.clj
for the lowdown on Clojure dependencies.
Frontend code is written in Coffeescript and other libraries are managed with
Bower. The standard install process for both of these is via NPM, the Node.js
package manager. If you have none of this installed, first install Node and then
run npm install
in the invigilou directory.
If you already have Bower installed, just run bower install
to install the
front-end libraries.
The exam- and building-database is already included as data/exam-schedule.sqlite
,
but it can be rebuilt by doing the following:
- Install Python and pip, if not already installed. Install Python dependencies:
$ pip install pyquery
- Get exam schedule info:
$ cd data
$ python
>>> import preproc
>>> preproc.db_setup()
>>> courses = preproc.main(url=preproc.UBC_EXAM_SCHEDULE_URL)
>>> preproc.insert(courses)
>>> exit()
- Get building info:
Uncomment the /createdb
and /fetchaddresses
routes in
src/invigilou/handler.clj
.
$ lein ring server-headless
Now navigate to localhost:3000/createdb
followed by
localhost:3000/fetchaddresses
.
If you watch your coffee closely enough, it will turn into Javascript:
$ coffee -o resources/public/js/ -cw src/coffee/
To do a full build, run npm run build
, which compiles the coffeescript and then uglifies it and concatenates a couple of libraries to produce exams.min.js
.
For development, with auto-reload on change of Clojure files:
$ lein ring server-headless
Compiled (as on Heroku), in the Jetty server:
$ lein with-profile uberjar uberjar
$ java -cp target/invigilou-standalone.jar clojure.main -m invigilou.handler
Copyright © 2015 Ben Cook