Command-line interface to Canvas LMS
Project description
canvaslms: A CLI to Canvas LMS.
This program provides a command-line interface for Canvas. The command
is canvaslms and it has several subcommands in the same style as Git.
canvaslms provides output in a format useful for POSIX tools, this
makes automating tasks much easier.
Let's consider how to grade students logging into the student-shell SSH server. We store the list of students' Canvas and KTH IDs in a file.
canvaslms users -c DD1301 -s | cut -f 1,2 > students.csv
Then we check who has logged into student-shell.
ssh student-shell.sys.kth.se last | cut -f 1 -d " " | sort | uniq \
> logged-in.csv
Finally, we check who of our students logged in.
for s in $(cut -f 2 students.csv); do
grep $s logged-in.csv && \
Finally, we can set their grade to P and add the comment "Well done!" in
Canvas. We set the grades for the two assignments whose titles match the
regular expression (Preparing the terminal|The terminal).
canvaslms grade -c DD1301 -a "(Preparing the terminal|The terminal)" \
-u $(grep $s students.csv | cut -f 1) \
-g P -m "Well done!"
done
Installation
Just install the PyPI package:
python3 -m pip install canvaslms
Some subcommands use pandoc, so you will likely have to install
pandoc on your system manually.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file canvaslms-2.7.tar.gz.
File metadata
- Download URL: canvaslms-2.7.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.79.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d490bbdbea08001da82aa6b5c47ddc0c394186b616de4d7b112dd60afc23a481
|
|
| MD5 |
704086a61f8d9e411faa558cd4c1918b
|
|
| BLAKE2b-256 |
1261b7b7c81b159677d53b2b365ea7f55f02f0a22ce1e73f96f5d8f1a07a977e
|
File details
Details for the file canvaslms-2.7-py3-none-any.whl.
File metadata
- Download URL: canvaslms-2.7-py3-none-any.whl
- Upload date:
- Size: 57.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.79.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5f00e52ac06bb827ab67781fad2c4765ce8572ca9ab283d8b8c2230fa9c97f2
|
|
| MD5 |
060308e27ac885c98466a4d77014fd54
|
|
| BLAKE2b-256 |
c7fe5feff3a31cddf2054e05255bdb1ec70512e2f429e9dd4a6a828f6a22212e
|