ChrisCooper / QcumberD

A Django-based course search service for Queen's University
qcumber.ca
Other
21 stars 5 forks source link

Qcumber served its purpose well for a number of years but was eventually retired after serving 1.5 million pageviews from a population of 28,000 students. You can read about its life in this blog post, or find a partially archived version on Wayback Machine

A course listing on Qcumber

Qcumber

Qcumber is a course catalog created for Queen's University students. It is live at http://qcumber.ca, and the main repository is at ChrisCooper/QcumberD on Github. Check out the wiki for extra information not in this readme, or the about page for more information on the project's origins and goals.

The original source code is available under the terms of the Mozilla Public License, v. 2.0, available at http://mozilla.org/MPL/2.0/. Images and other original non-code assets are © 2013 Chris Cooper.

Development overview

Qcumber, for the most part, is composed of web scrapers which pull data into the database, and simple Django apps that display that data on the website. For example, the exam scraper visits ExamBank and pulls all the exam links into simple database entries, and the corresponding Django app (basically just a directory in the project) contains definitions that help make sense of the database entries (known as models), as well as a few related things. The logic for the website itself is actually very simple. Really, all it does is display that data (though we are adding functionality as we speak).

All general configuration is under the qcumber directory, including settings.py, the root URL configuration file, javascript + images + CSS (LESS, actually), and files for storing private information like keys, file paths, and passwords (which are not committed to the respository).

To get your own copy of Qcumber to develop or improve, first follow the setup directions below, then run the scrapers for the data you wish to see (i.e. currently: courses, exams, and/or textbooks).

Setup Guide

  1. Installing the Prerequisites

Python and Libraries

This project has been tested with Python version 2.7. You can try other 2.x versions, but no promises.

I (Phil) could not get Qcumber to run under Python 3 after spending a whole couple seconds of trying. I have not tested on any version of Python other than 2.7.

The django project installation documentation would be a good starting point for other operating systems.

Git and a Github account

Pip and a Virtual Environment

Pip is used to install extra Python modules that aren't included by default. A virtual environment is an isolated Python environment. It allows for per-program environment configuration.

LESS Compiler

LESS is an extension of CSS that adds support for dynamic behaviours like variables and functions.

  1. Fork the Repository

  1. Clone it to your computer

  1. Create and Activate a Virtual Environment

  1. Install Required Packages

Make sure you have activated your virtual environment (see above) before running this command!

  1. Configure Your Setup

  1. Initialize the Database

Make sure your virtualenv is activated!

  1. Run Time!

Extra Notes

How to Scrape Course Data

You can also create your own configurations for debugging, by visiting the admin page and creating a Job Config, under scraper. Job configs have the following options:

libssl Errors

ImportError: dlopen(/Users/Me/QcumberD/venv/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: @loader_path/../lib/libssl.dylib
Referenced from: /usr/lib/libpq.5.dylib
Reason: Incompatible library version: libpq.5.dylib requires version 1.0.0 or later, but libssl.0.9.8.dylib provides version 0.9.8

then you may need to look at this Stack Overflow answer for the simple solution.