canvas-sync downloads files from a Canvas by Instructure web server and creates a similar folder structure on your local computer.
canvas-sync.mp4
canvas-sync uses the Canvas LMS API to download files from the Canvas server.
In order to authenticate with the server an access token must be generated. An access tokens allows third-party applications such as canvas-sync to access Canvas resources on your behalf.
To create a token:
- On Canvas, go to "Account" followed by "Settings".
- Under "Approved integrations", click on the "New access token" button.
- Put canvas-sync as the token's purpose and then click on the "Generate token" button.
- Copy and paste the token in the configuration file, described below.
Next, create a folder called canvas-sync in your user config directory and then within this folder, create a JSON file called config.json like the following
{
"url": "https://canvas.northwestern.edu",
"token": "AUTHENTICATION TOKEN GOES HERE",
"directory": "D:/Canvas",
"ignored_courses": [
178029,
178124,
145482
]
}
where:
urlis the URL of your Canvas server;tokenis the authentication token created as described in the previous section;directoryis the path to the directory on the local file system where you want Canvas files to be synced to;- and
ignored_coursesis a list of course IDs that you do not want to be synced.
A future version of canvas-sync will create this config file automatically.