Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An online utility to merge your mods with friends
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
models
public
routes
util
.gitignore
README.md
app.js
package.json

README.md

NUSMorge

A simple way to visualize multiple timetable between you and your friends. Works with a NUSMods url.

Running

Install dependencies

npm install

Run app

node app.js

This will fire up the app at http://localhost:/3000. This vanilla app allows you to enter a NUSMods url into the input box, associate it with a name, and will then update the timetable to reflect the merge. You can do this as many times as you want.

Note that the only valid urls are the long URLS generated by NUSMods, such as [this](http://nusmods.com/#CS2100=11&CS2100=82&MA1521=2SL1&IS1103=63&CS1020=63&LSM1302=2SL2&MA1521=8T04&CS2100=21&CS1020=11&MA1521=2SL1&CS2100=21&CS1020=84&LSM1302=2SL2]

The Generate a link button let's you save your merged timetable and retrieves it next time. It requires a mongod running to work. A sample configuration file for testing is provided,

mongod --config ./models/db/mongdb.conf

Now the button will give you a unique id which you can use to retrieve your merged timetable.

Structure

app.js configures express, routes request to appropriate functions.

routes/morge.js contains functions which retrieves/updates from/to the database

modes/db.js is our library to talk to mongodb via mongojs. If a different database is be used and this is the only file which needs to be edited.

util/modstt.js is a file we got directly from NUSMods, contains all module information.

util/rejsonify.js helps us to parse modstt.js into a format that we use, which we write to at public/js/mods.js

public/js/main.js is the entry point for our app, contains main logic.

public/js/users.js manages (adding and removing) users.

public/js/timetable.js updates, recaculates clashes and displays timetable.

public/js/mods.js contains all the module information in a format what we work with.

public/js/network.js contains our client side calls to the database.

public/js/genLinkMnager.js handles generating a unique id.

Something went wrong with that request. Please try again.