canvaslms


Namecanvaslms JSON
Version 4.1 PyPI version JSON
download
home_pagehttps://github.com/dbosk/canvaslms
SummaryCommand-line interface to Canvas LMS
upload_time2024-06-13 12:24:24
maintainerNone
docs_urlNone
authorDaniel Bosk
requires_python<4.0,>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

``` {.text}
canvaslms users -c DD1301 -s | cut -f 1,2 > students.csv
```

Then we check who has logged into student-shell.

``` {.text startFrom="2"}
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.

``` {.text startFrom="4"}
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)`.

``` {.text startFrom="6"}
    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][pandoc] on your system manually.

[pandoc]: https://pandoc.org/installing.html

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dbosk/canvaslms",
    "name": "canvaslms",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Daniel Bosk",
    "author_email": "dbosk@kth.se",
    "download_url": "https://files.pythonhosted.org/packages/a5/59/c92d9b93dcc14f8c027aef0d3473f0816eeef5079daee6368ec9ba0cd49e/canvaslms-4.1.tar.gz",
    "platform": null,
    "description": "# canvaslms: A CLI to Canvas LMS.\n\nThis program provides a command-line interface for Canvas. The command\nis `canvaslms` and it has several subcommands in the same style as Git.\n`canvaslms` provides output in a format useful for POSIX tools, this\nmakes automating tasks much easier.\n\nLet's consider how to grade students logging into the student-shell SSH\nserver. We store the list of students' Canvas and KTH IDs in a file.\n\n``` {.text}\ncanvaslms users -c DD1301 -s | cut -f 1,2 > students.csv\n```\n\nThen we check who has logged into student-shell.\n\n``` {.text startFrom=\"2\"}\nssh student-shell.sys.kth.se last | cut -f 1 -d \" \" | sort | uniq \\\n  > logged-in.csv\n```\n\nFinally, we check who of our students logged in.\n\n``` {.text startFrom=\"4\"}\nfor s in $(cut -f 2 students.csv); do\n  grep $s logged-in.csv && \\\n```\n\nFinally, we can set their grade to P and add the comment \"Well done!\" in\nCanvas. We set the grades for the two assignments whose titles match the\nregular expression `(Preparing the terminal|The terminal)`.\n\n``` {.text startFrom=\"6\"}\n    canvaslms grade -c DD1301 -a \"(Preparing the terminal|The terminal)\" \\\n      -u $(grep $s students.csv | cut -f 1) \\\n      -g P -m \"Well done!\"\ndone\n```\n\n## Installation\n\nJust install the PyPI package:\n```\npython3 -m pip install canvaslms\n```\nSome subcommands use `pandoc`, so you will likely have to [install \npandoc][pandoc] on your system manually.\n\n[pandoc]: https://pandoc.org/installing.html\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Command-line interface to Canvas LMS",
    "version": "4.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/dbosk/canvaslms/issues",
        "Homepage": "https://github.com/dbosk/canvaslms",
        "Releases": "https://github.com/dbosk/canvaslms/releases",
        "Repository": "https://github.com/dbosk/canvaslms"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a972449b7d134b81238545feba08a8cc8439522895f2ab02e80175b26d739708",
                "md5": "92ff3e299f1b3015c6c5c2d43c974bee",
                "sha256": "35f44cba090db5d8f1450021b6e36601f1d1bb29a3135437f86c80c763e51fa4"
            },
            "downloads": -1,
            "filename": "canvaslms-4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "92ff3e299f1b3015c6c5c2d43c974bee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 86954,
            "upload_time": "2024-06-13T12:23:26",
            "upload_time_iso_8601": "2024-06-13T12:23:26.107095Z",
            "url": "https://files.pythonhosted.org/packages/a9/72/449b7d134b81238545feba08a8cc8439522895f2ab02e80175b26d739708/canvaslms-4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a559c92d9b93dcc14f8c027aef0d3473f0816eeef5079daee6368ec9ba0cd49e",
                "md5": "c2cb946506c61d4d2a367620be4924cb",
                "sha256": "e4719efec13507051c21647a41fd657930040b5ea73493647d93dda63048ed65"
            },
            "downloads": -1,
            "filename": "canvaslms-4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c2cb946506c61d4d2a367620be4924cb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 58940,
            "upload_time": "2024-06-13T12:24:24",
            "upload_time_iso_8601": "2024-06-13T12:24:24.788659Z",
            "url": "https://files.pythonhosted.org/packages/a5/59/c92d9b93dcc14f8c027aef0d3473f0816eeef5079daee6368ec9ba0cd49e/canvaslms-4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-13 12:24:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dbosk",
    "github_project": "canvaslms",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "canvaslms"
}
        
Elapsed time: 0.26945s