Skip to main content

A set of internal tools for Ohio University's CS3560 course.

Project description

cs3560cli

A set of internal tools for Ohio University's CS3560 course.

Installation

python -m pip install cs3560cli

Features

blackboard student-list Command

Offer a link to get student enrollment data and offer to parse the JSON data into TSV data for an Excel sheet or Google Sheet

Usage

$ python -m cs3560cli blackboard student-list https://blackboard.ohio.edu/ultra/courses/_642196_1/cl/outline

Student list link:

https://blackboard.ohio.edu/learn/api/public/v1/courses/_642196_1/users?fields=id,userId,user,courseRoleId

Visit the link above in your browser.
Then copy and paste in the JSON data below and hit Ctrl-D (EOF) when you are done:

... [JSON Data pasted in by the user] ...

TSV data of the students:


firstName       lastName        emailHandle     isDrop  github-username team-id team-name       m1      m2      m3      m4      final   assigned-ta      note    discord-username        codewars-username       userId  courseMembershipId
... [formatted row of TSV data] ...

You can then copy this TSV data and paste into Excel sheet or Google Sheet.

blackboard categorize Command

When you download all submissions from an assignment, you will get a zip file with files from all students together in one place. This command can group files from a student together in a folder of their username.

$ python -m cs3560cli blackboard categorize gradebook_CS_3560_100_LEC_SPRG_2023-24_HW2.zip hw2
Categorizing files ...
$ ls hw2/
kc555014 ...

watch-zip Command

Watch for an archive file and extract it. This can be useful when you are grading student's submission, so you do not have to manually unzip it.

Usage

$ python -m cs3560cli watch-zip .
$ python -m cs3560cli watch-zip ~/Downloads

highlight Command

Create a syntax highlight code block with in-line style. The result can thus be embed into a content of LMS.

create-gitignore Command

Create a .gitignore file using content from github/gitignore repository.

Usage

$ python -m cs3560cli create-gitignore python
$ python -m cs3560cli create-gitignore cpp

By default, it also add windows and macos to the .gitignore file.

check-username Command

TBD

Scenario

New semester preparation

  1. Obtain the list of enrolled students.
  2. Creating a team in GitHub organization.
  3. Add OU-CS3560/examples to the team.
  4. Invite all students into the team in GitHUb organization.

Requirements

gh extension install mislav/gh-repo-collab
$TeamName = "entire-class-24f"
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /orgs/OU-CS3560/teams \
  -f name="$TeamName" \
  -f notification_setting='notifications_disabled' \
  -f privacy='closed'
gh repo-collab add OU-CS3560/examples "OU-CS3560/$TeamName" --permission read
python -m cs3560cli github bulk-invite

Creating repositories for teams

  1. (manual) Obtain team information (internal-id, members).
  2. Create a team.
  3. Create a repository.
  4. Add team to the repository with maintain permission.
  5. (manual) Invite students to the team.

Requirements

gh extension install mislav/gh-repo-collab
$TeamId = ""
$TeamHandle = "OU-CS3560/" + $TeamId
$RepoHandle = "OU-CS3560/" + $TeamId

$ParentTeamId = python -m cs3560cli github get-team-id entire-class-24f | Out-String
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /orgs/OU-CS3560/teams \
  -f parent_team_id=$ParentTeamId \
  -f name="$TeamId" \
  -f notification_setting='notifications_disabled' \
  -f privacy='closed'
gh repo create --private --template OU-CS3560/team-template $RepoHandle
gh repo-collab add $RepoHandle $TeamHandle --permission maintain

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs3560cli-0.2.1a3.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

cs3560cli-0.2.1a3-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

Details for the file cs3560cli-0.2.1a3.tar.gz.

File metadata

  • Download URL: cs3560cli-0.2.1a3.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for cs3560cli-0.2.1a3.tar.gz
Algorithm Hash digest
SHA256 a26fc6085cd0d49f895a197df7bf62879c665f80c380917e10fa772b56cc8c2e
MD5 944337d85c699e904dfa1186034c7b3c
BLAKE2b-256 9a1659c9e10b651a83f24c2bed9b0359fadda0ae3e4900a187929f67ca4afcaa

See more details on using hashes here.

File details

Details for the file cs3560cli-0.2.1a3-py3-none-any.whl.

File metadata

  • Download URL: cs3560cli-0.2.1a3-py3-none-any.whl
  • Upload date:
  • Size: 36.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for cs3560cli-0.2.1a3-py3-none-any.whl
Algorithm Hash digest
SHA256 9e02e2328b593a9923e25c159f84c1f01130cd1490123cccb473938632c6b7b7
MD5 0c3ce4575ff4912f02c7b90a2d1aa9d1
BLAKE2b-256 6d8fc1f90e8ea416ab1e74166aad476e45a22e5b46d9fd91f4f49fa8a2443441

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page