Due to frequent changes made from the timetabling service side, this project is no longer working for the latest version.
Nottingtable is a web system that allows UNNC students to get their teaching timetable in ical (.ics) format.
MySQL 8.0 and Python MySQL client PyMySQL.
For student users:
-
Get your teaching timetable out of your box.
-
Import your timetable to any kind of calendar client as you like.
-
If this web system is deployed on Internet, you can also subscribe your timetable online to get updates.
For those who want to provide timetable related services to UNNC students:
-
This system is fully open sourced and easy to deploy to your own server.
-
You could make use of the API provided by this web system to get timetable in JSON format, which is much easier to parse.
-
Or you might want to use crawler module in this system directly to integrate with your service.
This deploy guide will not tell you how to setup a MySQL server, how to install python environment, and etc..
-
Clone this repository:
git clone https://github.com/Steven1677/nottingtable-flask.git
-
Create a virtual environment for this project (optional, but highly recommended):
cd nottingtable-flask
python3 -m venv venv
- Activate the virtual environment
source ./venv/bin/activate
- Install the Python library dependencies:
(venv) pip install -r requirements.txt
- Export environment variables for this project:
(venv) export DATABASE_URI=pymysql://database_user:password@database_address:port/database_name
Please replace your database setups to the connection string.
Note: The user should have the all the rights to that database.
- Change configuration in
nottingtable/config.py
Please pay attention to BASE_URL
FIRST_MONDAY
YEAR1_PDF_URL
CACHE_LIFE
.
- One more step to run the program:
(venv) export FLASK_APP=app.py
flask init-all
- Use flask builtin server to test the configuration before:
flask run
Now, the basic deployment finishes. For the production-ready deployment, please refer to Wiki.
As an open sourced program, any contributes to this project is welcome.
Especially for a modern frontend design
CorsairCat, who built the PHP version of this program, and inspired me about the crawler's database model.
Songkeys, main developer of uCourse, a popular WeChat mini program among UNNC students, which aimed at showing timetable on WeChat. He provided me a lot of details behind school's timetabling service implementation, which make my development much easier.
Apache License 2.0