- name: canvas-syllabus-scraper
- run-with: terminal
- python>=3.7
- canvasapi>=2.0.0
- custom environment: canvas-syllabus-scraper
This project takes an account id as input and attempts to download any syllabi for courses in that account. The user can specify
- The term or year to filter to (uses "startswith" regex to match). For example, 2020 would include 2020W1-2, 2020W1, 2020W2, 2020S etc.
- Terminal will ask for inputs and confirmations
- Errors will be shown when necessary by the interface (also shows skipped courses that do not match term)
- A file with the entered term or year will be generated to show the status of each attempted course file
- Final files can be found in the folder pdf/
- This script is slow! It makes at least one request per course (depending on number of links found)
- We recommend running this script for specific terms or years (not all courses in accounts)
- The script is set to run in the PROD environment of canvas (url = "https://ubc.instructure.com/")
this is set as url in the functon
get_user_inputs()
in the file src/helpers.py
- Canvas API Token
- Canvas Account ID
- Canvas Term or Year required
You will need to create the canvas-syllabus-scraper environment. We use conda to manage our projects. Part of Learning Services and need any other help? Checkout our docs!
- Clone canvas-syllabus-scraper repository
- Install conda (Python 3.7 version)
- Import environment:
$ conda env create -f environment.yml
- Run
$ conda activate canvas-syllabus-scraper
$ python src/syllabus_downloader.py
This adapatation was forked from https://github.com/ubccapico/syllabus-scraper where the original authors are:
- Jeremy Hidjaja - JeremyH011
- Barish Golland - barishgolland
- Marko Prodanovic - markoprodanovic
- Alison Myers - alisonmyers
- Peter Lukasik - peterlukasik