Merge pull request #3 from alex-bellon/documentation

Added more information about credentials to README
This commit is contained in:
David Katsandres 2021-03-17 07:31:39 -07:00 committed by GitHub
commit 7c3308436d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 14 deletions

View File

@ -1,8 +1,8 @@
# Introduction # Introduction
The Canvas Student Data Export Tool can export nearly all of a student's data from Instructure Canvas Learning Management System (Canvas LMS). The Canvas Student Data Export Tool can export nearly all of a student's data from Instructure Canvas Learning Management System (Canvas LMS).
This is useful when you are graduating or leaving your college or university, and would like to have a backup of all the data you had in canvas. This is useful when you are graduating or leaving your college or university, and would like to have a backup of all the data you had in canvas.
The tool exports all of the following data: The tool exports all of the following data:
- Course Assignments - Course Assignments
- Course Announcements - Course Announcements
- Course Discussions - Course Discussions
@ -10,8 +10,8 @@ The tool exports all of the following data:
- Course Files - Course Files
- Course Modules - Course Modules
The tool will export your data in JSON format, and will organize it nicely into folders named for every term of every year. The tool will export your data in JSON format, and will organize it nicely into folders named for every term of every year.
Example: Example:
- Fall 2013 - Fall 2013
- Econ 101 - Econ 101
- files - files
@ -36,21 +36,33 @@ Example:
# Getting Started # Getting Started
## Dependencies ## Dependencies
To run the program, you will need the following dependencies: To run the program, you will need the following dependencies:
`pip install requests` `pip install requests`
`pip install jsonpickle` `pip install jsonpickle`
`pip install canvasapi` `pip install canvasapi`
Then run from the command line: Then run from the command line:
`python export.py` `python export.py`
## Configuration ## Configuration
These are the configuration parameters for the program: These are the configuration parameters for the program:
- Canvas API URL - Canvas API URL - this is the URL of your institution, for example `https://example.instructure.com`
- Canvas API key - Canvas API key - this can be created by going to Canvas and navigating to `Account` > `Settings` > `Approved Integrations` > `New Access Token`
- Canvas User ID - Canvas User ID - this can be found at `https://example.instructure.com/api/v1/users/self` in the `id` field
- Directory in which to download course information to (will be created if not present) - Directory in which to download course information to (will be created if not present)
- List of Course IDs that should be skipped - List of Course IDs that should be skipped
### Loading credentials from a file
To avoid manually entering credentials every time you run the program, you can create a `credentials.yaml` file in the same directory as the script that has the following fields:
```yaml
API_URL: < URL of your institution >
API_KEY: < API Key from Canvas >
USER_ID: < User ID from Canvas >
```
You can then run the script as normal:
`python export.py`
# Contribute # Contribute
I would love to see this script's functionality expanded and improved! I welcome all pull requests :) Thank you! I would love to see this script's functionality expanded and improved! I welcome all pull requests :) Thank you!