Tool designed to make it easier to download course materials from Canvas (en masse). Configured originally for WPI's Canvas but can be easily modified for other schools.
This repository contains a proof of concept tool designed to demonstrate how files can be programmatically accessed and downloaded from Canvas using an API created here https://github.com/ucfopen/canvasapi. It is provided for educational purposes only and is not intended for practical use. Important Notes:
- Access Tokens: The tool requires a personal access token generated by the user for authentication with the Canvas API. Users are responsible for generating and using their tokens in accordance with their institution’s policies.
- Policy Awareness: This tool is strictly for demonstration purposes and should not be used in ways that violate Canvas’s policies or the terms of service of any institution. This repository is public for the purpose of showcasing the technical implementation on my personal website.
- Clone the repo.
- Run
pip install -r depend.txt
. - Add your API token from before to the .env file key
API_TOKEN
. - Run the script with
python main.py
and it will prompt you for each of your courses if you want to download it or not. - Once you have selected your courses it will create a directory named
data
and download each courses files to subdirectories named after the course name.
- Edit the variable at the top of the file
ALLOWED_FILE_TYPES
to choose what files you want. Default ispdf
,pptx
, anddocx
. - Edit the variable at the top of the file
OUTPUT_DIR
to be what you want. Default isdata
. - Files with the same name will be overwritten.
- I followed this guide and used these docs to build this tool
- https://github.com/ucfopen/canvasapi
- https://canvasapi.readthedocs.io/en/stable/
- https://github.com/ubc/getting-started-with-the-canvas-api-with-python