← 返回
未分类

Course

PKU Teaching Platform (北大教学网/Blackboard Learn) CLI tool built in Rust. Use this skill when working on the course crate, debugging course commands, adding fea...
PKU 教学平台(北大教学网/Blackboard Learn)RustCLI 工具。用于课程 crate、调试课程命令、添加功能。
wjsoj
未分类 clawhub v1.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 420
下载
💾 0
安装
1
版本
#blackboard#cli#latest#pku#rust

概述

Course - 北大教学网 CLI

A CLI client for PKU's Blackboard Learn teaching platform.

Architecture

  • Crate location: crates/course/
  • Auth flow: IAAA SSO (app_id="blackboard") → Blackboard SSO endpoint callback
  • API: HTML scraping with scraper crate (no JSON API available)
  • File upload: multipart form via reqwest

Key Source Files

  • src/main.rs — Clap CLI with subcommands
  • src/commands.rs — Command implementations
  • src/api.rs — HTML scraping logic, page parsers
  • src/display.rs — Terminal output formatting
  • src/client.rs — reqwest client builders

CLI Commands

CommandAliasFunction
--------------------------
login / logout / statusIAAA → Blackboard auth
coursesList enrolled courses (supports --all for all semesters)
infoCourse details
contentBrowse course content tree
assignmentsList assignments with deadlines
assignmentView single assignment
browseInteractive course content browser
assignment-downloadadlDownload assignment attachments
downloadDownload course files
video-downloadvdlDownload course recordings
videosvlsList available videos
submitUpload homework files
otpTOTP 2FA management

Auto-Login for AI Agents

# Check session status
info-auth check

# Auto-login (reads credentials from OS keyring, no password needed)
course login -p

Development Notes

  • HTML parsing is the primary data extraction method — no REST API
  • Assignment list supports deadline-based sorting
  • Video download handles replay/recording URLs
  • All user-facing strings in Chinese
  • Error handling: anyhow::Result with .context("中文描述")
  • Session persisted to ~/.config/info/course/
  • Credentials resolved via info_common::credential (keyring → env → interactive)

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-05-03 08:02 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

PKU Info Spider

wjsoj
微信公众号文章爬虫 CLI 工具,使用 Rust 编写。适用于 info‑spider crate 的开发、调试爬虫命令等场景。
★ 0 📥 445

PKU Info Auth

wjsoj
PKU 统一凭据管理 CLI(统一凭据管理)。当用户或 AI Agent 需要对 PKU服务进行身份验证或管理已存储的凭据时使用此技能。
★ 0 📥 431

PKU Campus Card

wjsoj
PKU校园卡 CLI 工具,使用 Rust 编写。适用于处理 campuscard 工具库、调试校园卡命令、添加功能等场景。
★ 0 📥 438