This project is no longer being maintained. Consider using https://github.com/aik2mlj/canvas-downloader, which is a maintained fork of the project with additional features.
Downloads files from all courses in canvas.
- Create a credential json file, eg
cred.json
{
"canvasUrl": "https://canvas.nus.edu.sg",
"canvasToken": "12345~jfkdlejoiferjiofu"
}canvasUrlshould include "https://"canvasTokencan be created from Account > Settings > New Access Token
- Get Term IDs by running
canvas-downloaderwith the credential file, eg
$ canvas-downloader --credential-file cred.json
Please provide the Term ID(s) to download via -t
Term IDs | Courses
115 | ["CS1101S", "CS1231S"]
120 | ["CS2040S", "CS2030"]
125 | ["CS3230"]- Rerun
canvas-downloaderwith the terms you are interested in downloading, eg
$ canvas-downloader --credential-file cred.json -t 115 120
Courses found:
* CS1101S
* CS1231S
...- To explore more options, use
--helpor-h
$ canvas-downloader --help
Usage: canvas-downloader [OPTIONS] --credential-file <FILE>
Options:
-c, --credential-file <FILE>
-d, --destination-folder <FOLDER> [default: .]
-n, --download-newer
-t, --term-ids <ID>...
-h, --help Print help
-V, --version Print version- If you want to download files updated on canvas, use
--download-neweror-n. By default, files updated on canvas will not overwrite already downloaded files. - If you want to specify where to download files into, use
--destination-folderor-d. By default, files will be downloaded to the folder in which the program is called.
- To use the executable downloaded from Releases, use
xattrto remove the quarantine- e.g.
xattr -d com.apple.quarantine canvas-downloader
- e.g.
- This occurs because the executable has not been signed with an apple developer account
- If it is not showing up as an executable
chmod +x canvas-downloader- This should make it executable