This application extracts syllabi from Canvas, downloads them, and adds it to an index.html file
- Install Python 3.7 or greater.
- Install Git.
- First, clone this repo.
git clone https://github.com/UBC-LFS/lfs-canvas-syllabus-python.git
$ pip install virtualenv
$ python -m venv venv
On Windows
$ venv\Scripts\activate
On Linux
$ source venv\bin\activate
$ pip install -r requirements.txt
This is where you'll specify the URL and token as show below. Don't add quotes. You can swap out the domain if you want to run it off production.
CANVAS_PROD_URL='https://[YOUR_URL].instructure.com'
CANVAS_TEST_URL='https://[YOUR_TEST_URL].instructure.com'
CANVAS_API_TOKEN=''
API_VERSION = 'api/v1'
- Rename syllabi_example to syllabi
- Run this application:
python main.py
- Input the year you are interested in (if you are interested in more than one year, you'll need to run the script more than one time).
- Select the terms you are interested in. You can select multiple terms by pressing space. If you want to select all the terms, leave the default selection of 'All'.
- Input the account number of your Faculty. For LFS, it's 1122 (old one 15).
- Wait for the script to gather the syllabuses. Depending on how many terms you select and how many courses there are, this could take some time.
- The syllabuses are now downloaded in
syllabi
, inside folders that indicate what year/term the course was offered. - The name of the courses without a syllabus will be added
output/coursesWithNoSyllabus/{session}
Thank you!