Skip to content

feat(talks): add official campus lectures - #14

Merged
aprylewu merged 2 commits into
wormforce:mainfrom
KevinHuge:codex/official-talks
Sep 7, 2026
Merged

feat(talks): add official campus lectures#14
aprylewu merged 2 commits into
wormforce:mainfrom
KevinHuge:codex/official-talks

Conversation

@KevinHuge

@KevinHuge KevinHuge commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

sustech-cli can read community-maintained talk data, but it has no direct view of the official university lecture feed. This change adds talks list and talks search using the lecture section of the SUSTech homepage.

  • Show lectures whose Beijing start time is still in the future by default; --all includes every lecture currently displayed on the homepage.
  • Keep records with unparseable times visible under a separate “time to confirm” group instead of guessing or dropping them.
  • Sort upcoming lectures from nearest to furthest and, under --all, started lectures from newest to oldest.
  • Support text, JSON, and JSONL output with official source, fetch-time, reference-time, and coverage metadata.
  • Update the bundled sustech-cli skill so agents route official lecture requests to the new direct CLI commands and keep them distinct from community-maintained online talks data.
  • Bound the response body and timeout, reject redirects and non-HTML responses, and allow only exact official lecture detail URLs.
  • Pin Cheerio 1.0.0 so the dependency remains compatible with the package's declared Node.js minimum.

The homepage currently exposes the same 12 lecture records as the first two archive pages, so the command intentionally presents one current homepage view without pagination or source-selection flags.

Validation

  • macOS arm64, Node.js v26.4.0.
  • npm run check and npm run build — passed.
  • node --test dist/test/official-talks.test.js — 9/9 passed.
  • npm test — 325/326 passed, including every new test. The existing context live supports calendar level and degrades gracefully when credentials are unavailable test still fails at its public academic-calendar network read.
  • npm pack --dry-run --ignore-scripts --json — passed (296 packaged files).
  • Live official homepage check on 2026-09-05 — 12 source records, 3 upcoming records by default, and all 12 with --all.

@aprylewu
aprylewu merged commit 1f4129b into wormforce:main Sep 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants