CLI workflow for Tongji Look (look.tongji.edu.cn): store IAM credentials locally, list recent courses, transcribe a lecture video to SRT/TXT, download lecture slide snapshots, and generate a Markdown study note from transcript + slides.
Use the bundled CLI to:
SRT + TXT,This skill is intentionally CLI-first (no frontend).
When you see these trigger phrases, follow this mapping:
look-tongji:setup -> run python "<SKILL_DIR>/scripts/look_tongji.py" setuplook-tongji:list -> run python "<SKILL_DIR>/scripts/look_tongji.py" listlook-tongji:slide -> run python "<SKILL_DIR>/scripts/look_tongji.py" slide ...look-tongji:transcribe -> run python "<SKILL_DIR>/scripts/look_tongji.py" transcribe ... (aliases: transcript, )translook-tongji:note -> run python "<SKILL_DIR>/scripts/look_tongji.py" note ... (default: transcript + slide in parallel)Where:
<SKILL_DIR> is the directory that contains this SKILL.md.<SKILL_DIR>/.env (and ignored by <SKILL_DIR>/.gitignore).<SKILL_DIR>/state/ (JWT token cache and last selection)../tongji-output/ (relative to where the command is executed).Never ask the user to paste passwords into chat. Prefer interactive terminal input (or environment variables) and keep .env out of version control.
When you need more details, read:
references/url-guide.md for how to obtain and parse lecture URLsreferences/troubleshooting.md for common setup/login/ASR issuesreferences/security.md for credential/cache/output safety noteslook-tongji:setupGoal: verify basic dependencies and store credentials in <SKILL_DIR>/.env.
Run:
python "<SKILL_DIR>/scripts/look_tongji.py" setup
Non-interactive options (avoid passing passwords via CLI when possible):
python "<SKILL_DIR>/scripts/look_tongji.py" setup --username "<YOUR_ID>" --password "<YOUR_PASSWORD>" --overwrite
If dependencies are missing, install them from <SKILL_DIR>/requirements.txt.
look-tongji:listGoal: login and list recent courses with indices.
Run:
python "<SKILL_DIR>/scripts/look_tongji.py" list
If you need to search a course by name (and it may not appear in "recent"),
use the full course list method TongjiClient.get_all_courses() for higher accuracy.
CLI shortcut:
python "<SKILL_DIR>/scripts/look_tongji.py" list --all --query "<COURSE_NAME_KEYWORD>"
If you already know which course index to choose (for non-interactive runs):
python "<SKILL_DIR>/scripts/look_tongji.py" list --choose 1
This saves the selected course to <SKILL_DIR>/state/last_course.json.
look-tongji:noteGoal: default workflow for one lecture: transcribe + download slides + write notes.
Preferred inputs (ask user for one of these):
look.tongji.edu.cn (best effort parsing for course_id + sub_id)course_id + sub_id (most reliable)Transcript-only command with a lecture URL:
python "<SKILL_DIR>/scripts/look_tongji.py" transcribe --lecture-url "<LECTURE_URL>"
Transcript-only command with IDs:
python "<SKILL_DIR>/scripts/look_tongji.py" transcribe --course-id "<COURSE_ID>" --sub-id "<SUB_ID>"
If only course_id is provided, the CLI can list the latest lectures and let you choose:
python "<SKILL_DIR>/scripts/look_tongji.py" transcribe --course-id "<COURSE_ID>"
look-tongji:noteUnless the user explicitly says "不要下载PPT/slide" (or equivalent):
note command for the same course_id + sub_id (internally does transcript + slide in parallel).Default combined command:
python "<SKILL_DIR>/scripts/look_tongji.py" note --course-id "<COURSE_ID>" --sub-id "<SUB_ID>"
If user explicitly requests transcript only:
python "<SKILL_DIR>/scripts/look_tongji.py" note --course-id "<COURSE_ID>" --sub-id "<SUB_ID>" --no-slide
# or:
python "<SKILL_DIR>/scripts/look_tongji.py" transcribe --course-id "<COURSE_ID>" --sub-id "<SUB_ID>"
The CLI writes to ./tongji-output/ (relative to the current working directory):
<course_id>_<sub_id>.srt<course_id>_<sub_id>.txt<course_id>_<sub_id>.json (metadata)slide_<course_id>_<sub_id>/ (slide images + index.json)Important transcript-reading rule:
<course_id>_<sub_id>.json as the main transcript source (JSON ASR payloads are noisy).<course_id>_<sub_id>.txt (preferred when timestamps are not required),<course_id>_<sub_id>.srt (use when timeline/timestamp context is needed).Important slide-reading rule:
slide_<course_id>_<sub_id>/index.json as the main slide timeline source (often noisy).0102_t01-32-45_s005565.jpg
0102: slide sequence numbert01-32-45: timestamp hh-mm-sss005565: total seconds from lecture start (1*3600 + 32*60 + 45 = 5565)After the CLI finishes, read transcript TXT plus slide metadata/images and write:
<course_id>_<sub_id>_notes.md in the same tongji-output/ folder.Important responsibility boundary:
Use the following note prompt and output only Markdown (notes content should be in Simplified Chinese):
You are a professional course TA. Based on the provided ASR transcript and lecture slide snapshots, write detailed study notes in Markdown (notes content in Simplified Chinese).
Requirements:
1) Output notes directly. No polite preface. No "here is the summary" opener.
2) Make the text fluent and logically structured. Fix obvious ASR errors and repetitions, but do not fabricate content not present in transcript/slides.
3) Markdown formatting: only use headings starting from ### (allow ###/####/#####). Do not use # or ##. Use bold/lists/tables when appropriate; avoid overly fragmented bullet-only output.
4) If the lecture mentions assignments/exams/attendance/grouping, put a short "### Course Reminders" section at the very top.
5) Use LaTeX for variables and formulas: inline $...$, block $$...$$. Do not put non-ASCII characters inside LaTeX.
6) Be faithful to transcript/slides and include enough details so that a student can learn from the notes (not just an outline).
7) If transcript and slides conflict, prefer slide text for terminology/spelling and briefly note uncertainty.
Now write the notes from transcript + slides:
look-tongji:slideGoal: download detected slide snapshots for one lecture.
Run with a lecture URL:
python "<SKILL_DIR>/scripts/look_tongji.py" slide --lecture-url "<LECTURE_URL>"
Run with IDs:
python "<SKILL_DIR>/scripts/look_tongji.py" slide --course-id "<COURSE_ID>" --sub-id "<SUB_ID>"
If throttling is suspected, reduce concurrency:
python "<SKILL_DIR>/scripts/look_tongji.py" slide --course-id "<COURSE_ID>" --sub-id "<SUB_ID>" --concurrency 2 --retries 5