Course
by @wjsoj
PKU Teaching Platform (北大教学网/Blackboard Learn) CLI tool built in Rust. Use this skill when working on the course crate, debugging course commands, adding fea...
clawhub install pku-course📖 About This Skill
name: course description: "PKU Teaching Platform (北大教学网/Blackboard Learn) CLI tool built in Rust. Use this skill when working on the course crate, debugging course commands, adding features to the teaching platform CLI, or when the user mentions 教学网, Blackboard, course downloads, assignment submission, video downloads, or PKU teaching. Also use when dealing with HTML scraping via the scraper crate, Blackboard SSO callback, or multipart file uploads. NOT for course schedule / 课表 / weekly timetable questions — for those use the
treehole skill (treehole course), which is the canonical source and includes 辅修/双学位. This course crate only deals with the Blackboard teaching platform (assignments, files, recordings, announcements)."
version: 2.0.0
Course - 北大教学网 CLI
A CLI client for PKU's Blackboard Learn teaching platform.
Architecture
crates/course/app_id="blackboard") → Blackboard SSO endpoint callbackscraper crate (no JSON API available)Key Source Files
src/main.rs — Clap CLI with subcommandssrc/commands.rs — Command implementationssrc/api.rs — HTML scraping logic, page parserssrc/display.rs — Terminal output formattingsrc/client.rs — reqwest client buildersCLI Commands
| Command | Alias | Function |
|---------|-------|----------|
| login / logout / status | | IAAA → Blackboard auth |
| courses | | List enrolled courses (supports --all for all semesters) |
| info | | Course details |
| content | | Browse course content tree |
| assignments | | List assignments with deadlines |
| assignment | | View single assignment |
| browse | | Interactive course content browser |
| assignment-download | adl | Download assignment attachments |
| download | | Download course files |
| video-download | vdl | Download course recordings |
| videos | vls | List available videos |
| submit | | Upload homework files |
| otp | | TOTP 2FA management |
Auto-Login for AI Agents
# Check session status
info-auth checkAuto-login (reads credentials from OS keyring, no password needed)
course login -p
Development Notes
anyhow::Result with .context("中文描述")~/.config/info/course/info_common::credential (keyring → env → interactive)