A command-line tool for renaming Blackboard courses, either one at a time through an interactive prompt or in bulk from a file.
- Go 100%
| .env.sample | ||
| .gitignore | ||
| courses.txt | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
renamer
A cli tool for renaming Blackboard courses, either one at a time or in bulk from a .txt file.
It uses chawk to interact with the Blackboard API and the UI uses huh.
Configuration
Requires Blackboard REST API credentials (application key and secret) with permission to read and update courses.
Credentials are read from environment variables in a .env file in the working directory. See .env.sample for more information.
Usage
One at a time
Run the tool with no arguments:
./renamer
- Enter a course ID (or
q/quitto exit). - The tool fetches the course and shows its current name.
- Edit the name (it is pre-filled with the current one) and press Enter.
- The course is renamed, and the prompt repeats for the next course.
Press Ctrl-C at any prompt to exit.
Batch mode
Pass a file with the -file flag:
./renamer -file courses.txt
Each line has a course ID and the new name, separated by a pipe (|):
COURSE-101|Introduction to Biology
COURSE-102|Organic Chemistry I (Extra)
COURSE-103|World History Since 1500
Lines with a missing |, an empty course ID, or an empty new name are skipped with a warning that includes the line number.
Note
- Renames are applied immediately, so double-check your input file before running a large batch.
- This tool looks up each course's current name before renaming, so each line costs 2 API calls.