lecture-to-exam
Turns lecture recordings plus course slides into exam-ready study material, in two modes. Mode A: one Zoom share link with Zoom's official cloud transcript + that lecture's PDF/PPTX -> a bilingual knowledge-point Markdown (English verbatim + Chinese gloss) with every original slide rendered and embedded at full size, plus a self-contained PDF. If the recording has no official transcript, the skill downloads the audio only and stops; it never transcribes itself. Mode B: two or more finished lecture .md files + exam outline / past papers -> an 11-part TEXT-ONLY exam review handbook in Markdown and PDF. Triggers: 把录音整理成知识点, 总结这节课的知识点, 生成 lecture 讲义, 生成复习大纲, 期末复习手册, 根据所有 lecture 整理考点, 转成 pdf, or a Zoom recording link for a course. Review mode needs at least two lectures.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/jing-xl-xl--lecture-to-exam)HTML
<a href="/listings/jing-xl-xl--lecture-to-exam"><img src="/api/listings/jing-xl-xl--lecture-to-exam/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
第 1 步:放到宿主的 skill 目录
要求只有一条:**目录顶层直接能看到 `SKILL.md`**。
| 宿主 | 常见位置 | |---|---| | Claude Code | `~/.claude/skills/lecture-to-exam/`(个人)或 `<repo>/.claude/skills/`(项目) | | DSH | 当前 profile 的 skills 目录 | | Cursor / Windsurf 等 | 你配置的 skills / rules 目录,或项目内 `.cursor/skills/` | | WorkBuddy | `~/.workbuddy/skills/lecture-to-exam/` |
git clone <repo-url> lecture-to-exam cp -r lecture-to-exam ~/.claude/skills/ # 换成你的宿主目录
放好后重载宿主(重启,或让它重新扫描 skills)。
第 2 步:装依赖(一次性)
cd ~/.claude/skills/lecture-to-exam python3 -m pip install -r requirements.txt # markdown / pymupdf / yt-dlp npm install && npx playwright install chromium
系统工具:`curl`、`node`;`ffmpeg` 与 `yt-dlp` 只在"无官方转录、要下音频"时需要; LibreOffice 只在"PPTX 出原图"时需要。
macOS:`brew install ffmpeg` / `brew install --cask libreoffice` Linux:`sudo apt install ffmpeg libreoffice` Windows:装 LibreOffice 到默认目录(`C:\Program Files\LibreOffice`),或设 `SOFFICE_BIN`。
第 3 步:自检
python3 <skill>/scripts/run.py check_env
按**阶段**报告,而不是一刀切:`transcript (A1)` / `lecture notes (A2)` / `pdf export` / `audio fallback` 各自缺什么。`WARN` 是条件依赖,不影响其它阶段。
> 注意:LibreOffice 只"存在"不够——自检会**真的启动它**。启动报 > `DeploymentException` 会显示为 WARN,而不是骗你的 OK。
第 4 步:烟雾测试(不联网)
python3 <skill>/scripts/run.py md_to_html <skill>/examples/example_lecture_notes.md /tmp/demo.html python3 <skill>/scripts/run.py html_to_pdf /tmp/demo.html /tmp/demo.pdf
看到 `image requests failed: none` 且生成了 PDF,说明 md→pdf 链路正常。
> **以上命令都不需要 `cd` 进 skill 目录**——`run.py` 自己定位 skill 根目录。 > 在任意工作目录执行都可以,这正是"任意 AI 可直接用"的前提。
第 5 步:对话触发
这是 ICOM6045 第 5 讲的 Zoom 链接:<链接>,讲义在 <PPTX 路径>,帮我整理这一讲的知识点讲义(要带 PPT 原图)。
根据 lecture 目录下所有 lecture 的知识点 md,加上 exam 目录的往年真题,生成期末复习手册。
---
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 178 lines
- ---
- name: lecture-to-exam
- description: |-
- Turns lecture recordings plus course slides into exam-ready study material, in
- two modes. Mode A: one Zoom share link with Zoom's official cloud transcript +
- that lecture's PDF/PPTX -> a bilingual knowledge-point Markdown (English
- verbatim + Chinese gloss) with every original slide rendered and embedded at
- full size, plus a self-contained PDF. If the recording has no official
- transcript, the skill downloads the audio only and stops; it never transcribes
- itself. Mode B: two or more finished lecture .md files + exam outline / past
- papers -> an 11-part TEXT-ONLY exam review handbook in Markdown and PDF.
- Triggers: 把录音整理成知识点, 总结这节课的知识点, 生成 lecture 讲义, 生成复习大纲,
- 期末复习手册, 根据所有 lecture 整理考点, 转成 pdf, or a Zoom recording link for a
- course. Review mode needs at least two lectures.
- license: MIT
- ---
- # Lecture to Exam
- One skill, two independent modes sharing the same scripts and format rules.
- This file is the entry point and the rulebook. Stage-by-stage detail lives in
- `references/` and should be loaded only when that mode actually runs.
- - **Mode A — single lecture.** Recording + that lecture's slides →
- `figures/` original slide images + `<Course>_L<N>_知识点与考点.md` + PDF.
- - **Mode B — review handbook.** Two or more finished lecture `.md` files +
- exam outline / past papers → an 11-part, text-only handbook + PDF.
- Mode B consumes Mode A's output but never invokes it, and need not run in the
- same session.
- ## 0. Invocation contract (read this first)
- 1. **`SKILL_ROOT`** is the directory containing this file. All tooling is
- addressed from there.
- 2. **Run tools only through `scripts/run.py`**, never by assuming the cwd is the
- skill directory:
- ```bash
- python3 "$SKILL_ROOT/scripts/run.py" <tool> [args...]
- python3 "$SKILL_ROOT/scripts/run.py" --list
- ```
- `run.py` resolves the skill root from its own location, picks a Python
- interpreter that can actually import what the tool needs, and forwards the
- exit code. On Windows use `py -3` or `python` in place of `python3`.
- 3. **Check the environment for the stage you are about to run**, not for
- everything: `run.py check_env --json` reports which stage each dependency
- serves. Do not tell the user to install tools the stage does not use.
- 4. **Reply in the user's language.** The deliverables keep the format their spec
- defines (English verbatim lines + Chinese summaries).
- ## 1. Routing
- | User intent | Mode |
- |---|---|
- | One Zoom link + slides → lecture notes / 知识点 / 讲义 (with slide images) | A |
- | Official transcript + slides already supplied → knowledge summary | A (skip A1) |
- | "根据所有 lecture 生成复习大纲 / 期末复习手册 / 考点总结" | B |
- | Existing lecture `.md` → PDF only | A, stage A3 only |
- | Fewer than 2 lectures for a "review" request | B guard → ask for more |
- | Zoom link has no official transcript | A1 stops after audio download; ask the user for a transcript |
- | PPTX supplied but no working LibreOffice | A2 stops; offer the three outs in `references/mode-a.md` |
- ## 2. Hard rules (non-negotiable)
- 1. **Approval gate before any final file.** Show the full draft to the user —
- in the conversation, not a file — and wait for explicit approval. Mode A has
- two gates (transcript, then knowledge outline); Mode B has at least one
- (review outline) before writing anything final. A draft may live under
- `work/`; a deliverable may not be written before approval.
- 2. **Transcript: Zoom's official cloud transcript only.** Always try
- `zoom_transcript.py` first. Exit `0` = available → gate 1. Exit `3` with
- `NO_TRANSCRIPT` → download audio only, then stop and ask the user for a
- transcript shaped by `references/transcript-spec.md`. Exit `1` with `ERROR:`
- → access problem (password, expiry, SSO, network), **not** a missing
- transcript; fix access first. Never transcribe locally, never recommend a
- specific transcription tool.
- 3. **Original slide images are mandatory in Mode A.** Every non-blank page
- becomes `figures/{prefix}_p{NN}.png`, embedded once at full size beside the
- first point that uses it, with a caption and a matching page number. If no
- working LibreOffice, stop and offer the outs in `references/mode-a.md` — never
- ship a text-only handout or fabricate images. Blank pages are logged in the
- page-map, not embedded.
- 4. **The PDF mirrors the Markdown exactly.** Conversion only repackages layout.
- If `html_to_pdf` reports a failed image, fix the image; never ship the broken
- PDF (the tool deletes it and exits `2`).
- 5. **Mode B is text-only, with paragraph Chinese summaries.** No slide image,
- screenshot, or `` anywhere. Each point is five lines —
- `EN · 资料` / `EN · 录音` / `关键词` / `中(一段话)` / `📍 Source` — where
- `中(一段话)` is a full 80–200 character paragraph (是什么 / 为什么重要 /
- 怎么考). 🔴🟠 points must end with a concrete exam hint. Never a one-line gloss.
- 6. **No machine-specific paths.** Every path comes from an argument, an
- environment variable, or this file's own location.
- 7. **Review mode needs ≥ 2 lectures.** Run `validate_review_input.py` before any
- synthesis; on exit `2`, stop and ask for more lectures.
- ## 3. Exit codes
- | Code | Meaning | What to do |
- |---|---|---|
- | `0` | success | continue |
- | `1` | operation failed: dependency, access/network, or a failed verification | read stderr; fix the cause; do not proceed |
- | `2` | bad usage or insufficient input (e.g. < 2 lectures, broken PDF images) | fix the input or ask the user |
- | `3` | `NO_TRANSCRIPT` (no official transcript) or a missing lecture file | take the audio-only / ask-for-path branch |
- ## 4. Artifacts and the work directory
- ```text
- <course>/
- ├── work/ # intermediate drafts; safe to delete
- │ └── L5/
- │ ├── 01_transcript.md # gate-1 draft
- │ ├── 02_outline.md # knowledge outline draft
- │ └── 03_notes.md # exactly what gets approved
- ├── lecture_notes/
- │ ├── figures/L5/F_p01.png ... # original slide images
- │ ├── ICOM6045_L5_知识点与考点.md
- │ └── ICOM6045_L5_知识点与考点.pdf
- └── review/
- ├── ICOM6045_期末复习手册.md
- └── ICOM6045_期末复习手册.pdf
- ```
- **Resume:** if `work/<L>/03_notes.md` already exists and passes verification,
- skip straight to the approval gate instead of redoing the work. The same applies
- to `review/` when the handbook already verifies.
- ## 5. Verification gate
- Before showing a draft as final — and before writing a deliverable — run:
- ```bash
- python3 "$SKILL_ROOT/scripts/run.py" verify_output <file.md> --mode a [--slides N]
- python3 "$SKILL_ROOT/scripts/run.py" verify_output <file.md> --mode b
- ```
- It enforces, mechanically: four-/five-line blocks, image presence + on-disk
- existence + caption + page-map agreement (Mode A), zero images and 11 parts and
- 80–200 character paragraphs and exam hints (Mode B). Exit `1` means the draft
- violates its spec; fix it before the gate, not after. Use
- `--allow-text-only` **only** when the user has explicitly accepted a text-only
- handout.
- ## 6. References
- | File | Load it when |
- |---|---|
- | `references/mode-a.md` | running Mode A (A1 transcript → A2 notes → A3 PDF) |
- | `references/mode-b.md` | running Mode B (guard → 11 parts → PDF) |
- | `references/transcript-spec.md` | validating or requesting a transcript |
- | `references/knowledge-spec.md` | writing the Mode A `.md` |
- | `references/review-spec.md` | writing the Mode B handbook |
- | Tool | Purpose |
- |---|---|
- | `check_env` | read-only dependency check (`--json` for machines) |
- | `verify_output` | the gate above |
- | `zoom_transcript` / `zoom_fetch` / `zoom_fetch_share` | official transcript; audio-only fallback |
- | `extract_pdf` / `extract_pptx` / `render_pptx_pages` | source text and original page images |
- | `validate_review_input` | enforces ≥ 2 lectures |
- | `md_to_html` / `html_to_pdf` | Markdown → HTML → self-contained PDF |
- ## 7. Pitfalls
- - Never substitute local transcription for a missing official transcript.
- - User-supplied transcripts may get technical terms wrong — verify against the
- slides, and cite a precise `mm:ss` only when the user confirms timestamps.
- - Verify the supplied deck matches the recording before writing. Decks are named
- by module, folders by session; if they diverge, stop and confirm.
- - Supplied slides carry equal weight with the recording: every page is expanded
- into an item or logged in the page-map.
- - "LibreOffice installed" is not the same as "LibreOffice works" — `check_env`
- starts it to prove it; a `DeploymentException` means broken.
- - In Mode B, never answer an uncovered past-paper question from general
- knowledge; list it in the gap checklist instead.
- - Keep `figures/...` paths relative in Mode A so the folder travels with the
- `.md`; the PDF is the self-contained artifact.
README.md · README · 304 lines
- # lecture-to-exam
- [](LICENSE)
- [](tests/run_tests.py)
- **把课程录音 + 讲义,变成可直接用于期末开卷考试的复习资料。**
- > **EN** · An agent skill that turns lecture recordings (Zoom official transcript) + slide decks
- > into (A) a bilingual knowledge-point handout with every original slide embedded, and
- > (B) an 11-part, text-only exam review handbook. No transcription, no outside knowledge.
- 这是一个 **模型无关、宿主无关的 Agent Skill**:任何能读取 `SKILL.md` 并按对话执行
- 命令的 AI 都能用它——Claude Code、DSH、Cursor、WorkBuddy,或你自己的 agent 框架。
- 它不是一个独立 App,但工具层可以单独调用。
- - 有 **Zoom 官方云端转录** + 课程讲义(PPTX / PDF)→ **带 PPT 原始页图的单讲知识点讲义**。
- - 有 **≥2 份单讲讲义** + 考纲 / 往年真题 → **纯文字、无图片的 11 部分期末复习手册**。
- > 安装与排障见 [INSTALL.md](INSTALL.md);给 AI 的完整流程见 [SKILL.md](SKILL.md)。
- ---
- ## 1. 它做什么
- 一句话:**录音 + 讲义 → 知识点讲义 → 期末复习手册**。中间不自己转录、不联网找答案,
- 只做"整理与聚合"。
- 1. 从 Zoom 分享链接读取**录制自带的官方转录**(不是第三方转写服务,不需要额外账号)。
- 2. 把 PPTX / PDF 讲义逐页渲染成原图,与转录逐条对照,生成双语知识点讲义。
- 3. 把多份讲义和真题聚合成一份可开卷速查的复习手册。
- 它**不是**:
- - 语音转写软件——**不做转录**;没有官方转录时只下载音频交给你自己处理。
- - 答疑工具——复习手册里超出讲义范围的真题一律留占位,不自行补写外部知识。
- - 独立 App——由宿主 AI 按 `SKILL.md` 驱动;脚本可通过 `scripts/run.py` 单独调用。
- ---
- ## 2. 效果预览
- 
- ```text
- 你的课程目录/
- ├── work/L5/ # 中间草稿(审批用),可删
- │ ├── 01_transcript.md
- │ └── 03_notes.md
- ├── lecture_notes/
- │ ├── figures/ # 该讲所有幻灯片原图,扁平存放
- │ │ ├── F_p01.png … F_p44.png # 前缀 = 来源字母(F = 该 deck)
- │ │ └── I_p01.png … I_p47.png # 另一讲用另一个前缀,互不冲突
- │ ├── <Course>_L5_知识点与考点.md
- │ └── <Course>_L5_知识点与考点.pdf # 图已嵌入,可独立分发
- ├── review/
- │ ├── ICOM6045_期末复习手册.md
- │ └── ICOM6045_期末复习手册.pdf # 纯文字,无图
- └── transcripts/ # Zoom 官方转录(带时间戳与说话人)
- ```
- - **单讲讲义**:每页非空幻灯片原样嵌入对应知识点旁;四行块
- `EN · 资料 / EN · 录音 / 中 / 📍 Source`,英文逐字保留,方便开卷直接抄。
- - **复习手册**:11 部分,**完全无图**,每个考点中文总结是 80–200 字的一段话。
- 样例见 [`examples/`](examples/)(可离线跑通 md→pdf)。
- ### 2.1 一次真实运行的结果
- 下表是某门研究生课程(2 讲 + 1 份往年真题)的真实产出,可作为质量基准:
- | 产出 | 规模 | 校验 |
- |---|---|---|
- | L5 讲义(防火墙与隧道) | 38 个知识点 · 39 张原图 · 45 页 PDF | 11/11 闸门通过 |
- | L6 讲义(入侵检测) | 42 个知识点 · 43 张原图 · 51 页 PDF | 11/11 闸门通过 |
- | 期末复习手册(2 讲) | 11 部分 · 40 个考点 · 7 道真题解析 · 33 页 | 8/8 闸门通过 |
- | 幻灯片原图 | 91 张(130 dpi,逐页渲染) | 44 + 47 页全部对齐 |
- | 离线测试 | 32 项 | 32 passed / 0 failed / 0 skipped |
- 其中 4 道真题因超出这两讲范围,按规则留占位并汇总进「需补讲义清单」,未用常识补写。
- ---
- ## 3. 适合谁 / 不适合谁
- **适合你,如果:**
- - 你的课程有 Zoom 录播分享链接,且讲师开启了**"音频文字记录"**(官方转录)。
- - 你有对应的 PPTX / PDF 讲义。
- - 你要的是"整理已有材料",不是"替我听课、替我答题"。
- **不适合你,如果:**
- - 你只是想把 mp3/mp4 转成文字——本 skill **不做转录**。
- - 录制没有官方转录,且你不打算自己转录——流程会在下载音频后停止。
- - 你只有一讲却想做复习手册——复习模式硬性要求 **≥2 讲**。
- - 你要 PPT 原图讲义但没有可用的 LibreOffice——单讲讲义会停下并给出三条替代路径,
- 不会拿纯文字版凑数。
- ---
- ## 4. 安装(装到任意宿主)
- ### 第 1 步:放到宿主的 skill 目录
- 要求只有一条:**目录顶层直接能看到 `SKILL.md`**。
- | 宿主 | 常见位置 |
- |---|---|
- | Claude Code | `~/.claude/skills/lecture-to-exam/`(个人)或 `<repo>/.claude/skills/`(项目) |
- | DSH | 当前 profile 的 skills 目录 |
- | Cursor / Windsurf 等 | 你配置的 skills / rules 目录,或项目内 `.cursor/skills/` |
- | WorkBuddy | `~/.workbuddy/skills/lecture-to-exam/` |
- ```bash
- git clone <repo-url> lecture-to-exam
- cp -r lecture-to-exam ~/.claude/skills/ # 换成你的宿主目录
- ```
- 放好后重载宿主(重启,或让它重新扫描 skills)。
- ### 第 2 步:装依赖(一次性)
- ```bash
- cd ~/.claude/skills/lecture-to-exam
- python3 -m pip install -r requirements.txt # markdown / pymupdf / yt-dlp
- npm install && npx playwright install chromium
- ```
- 系统工具:`curl`、`node`;`ffmpeg` 与 `yt-dlp` 只在"无官方转录、要下音频"时需要;
- LibreOffice 只在"PPTX 出原图"时需要。
- macOS:`brew install ffmpeg` / `brew install --cask libreoffice`
- Linux:`sudo apt install ffmpeg libreoffice`
- Windows:装 LibreOffice 到默认目录(`C:\Program Files\LibreOffice`),或设 `SOFFICE_BIN`。
- ### 第 3 步:自检
- ```bash
- python3 <skill>/scripts/run.py check_env
- ```
- 按**阶段**报告,而不是一刀切:`transcript (A1)` / `lecture notes (A2)` /
- `pdf export` / `audio fallback` 各自缺什么。`WARN` 是条件依赖,不影响其它阶段。
- > 注意:LibreOffice 只"存在"不够——自检会**真的启动它**。启动报
- > `DeploymentException` 会显示为 WARN,而不是骗你的 OK。
- ### 第 4 步:烟雾测试(不联网)
- ```bash
- python3 <skill>/scripts/run.py md_to_html <skill>/examples/example_lecture_notes.md /tmp/demo.html
- python3 <skill>/scripts/run.py html_to_pdf /tmp/demo.html /tmp/demo.pdf
- ```
- 看到 `image requests failed: none` 且生成了 PDF,说明 md→pdf 链路正常。
- > **以上命令都不需要 `cd` 进 skill 目录**——`run.py` 自己定位 skill 根目录。
- > 在任意工作目录执行都可以,这正是"任意 AI 可直接用"的前提。
- ### 第 5 步:对话触发
- ```text
- 这是 ICOM6045 第 5 讲的 Zoom 链接:<链接>,讲义在 <PPTX 路径>,帮我整理这一讲的知识点讲义(要带 PPT 原图)。
- ```
- ```text
- 根据 lecture 目录下所有 lecture 的知识点 md,加上 exam 目录的往年真题,生成期末复习手册。
- ```
- ---
- ## 5. 两种模式
- ### Mode A — 单讲知识点讲义
- 输入:1 个 Zoom 分享链接 + 该讲 PPTX / PDF。
- 1. 读官方转录(秒级、带时间戳);**没有官方转录就只下载音频并停止**,等你自行转录。
- 2. 每张非空幻灯片渲染成原图,与转录逐页对照。
- 3. 先展示草稿,**经批准后**落盘 md/pdf。
- 细节见 [references/mode-a.md](references/mode-a.md)。
- ### Mode B — 期末复习手册
- 输入:≥2 份已完成的单讲讲义 md + 考纲 / 往年真题。
- 1. 校验讲次数量(少于 2 讲直接拒绝)。
- 2. 按 11 部分规范聚合;真题覆盖到的由讲义推导作答,未覆盖的留占位。
- 3. 先展示草稿,**经批准后**落盘 md/pdf。
- 细节见 [references/mode-b.md](references/mode-b.md)。
- ### 可执行质量闸门
- 散文规则会漂移,闸门不会:
- ```bash
- python3 <skill>/scripts/run.py verify_output <讲义.md> --mode a --slides 44
- python3 <skill>/scripts/run.py verify_output <手册.md> --mode b
- ```
- 它机械检查:四/五行块完整性、原图是否真的存在且配了图注、page-map 是否与图片一致、
- Mode B 是否零图片、是否 11 部分、中文段落是否 80–200 字、🔴🟠 是否带考试提示。
- 不合格就报出具体条目,先修再给用户看。
- ### 自测
- ```bash
- python3 <skill>/tests/run_tests.py # 32 项,离线;缺依赖的项自动 SKIP
- ```
- ---
- ## 6. FAQ
- **Q:报 `NO_TRANSCRIPT`?**
- 讲师没开"音频文字记录"(退出码 3)。脚本只下载音频就停;你自行转录成
- `[mm:ss] 文本`(见 `references/transcript-spec.md`)再交回来。
- **Q:报 `ERROR:` 而不是 `NO_TRANSCRIPT`?**
- 那是**访问问题**(密码 / 过期 / SSO / 网络),退出码 1,不代表没有官方转录。
- 先在浏览器打开确认可播放,再重试。
- **Q:我的 Zoom 不是 `hku.zoom.us`?**
- 脚本已从链接自动推导租户域名;仍失败就显式 `--domain <租户> --referer https://<租户>/`。
- **Q:链接需要登录 / 密码?**
- `zoom_fetch` 加 `--cookies-from-browser chrome`;分享链接有密码就先在浏览器里输入。
- **Q:LibreOffice 装了却一启动就崩?**
- `render_pptx_pages` 已内置独立临时 profile;仍失败用 `--lo-app` 指向健康副本,
- 或用 `--dmg` 挂载(仅 macOS),或直接把 PPTX 导出成 PDF 再走 `extract_pdf`。
- **Q:Playwright 报浏览器版本不匹配?**
- `npm install` 与 `npx playwright install chromium` 要用同一个版本。
- **Q:PPTX 和录音对不上?**
- 讲义按模块命名、录音按日期命名。脚本不猜对应关系;内容关键词不匹配时会请你确认。
- **Q:中文课程能用吗?**
- 能。转录契约与讲义规范都接受中文;中文总结用中文写。
- ---
- ## 7. 安全与隐私
- **这个 skill 会把什么发到哪里**
- | 动作 | 目的地 | 内容 |
- |---|---|---|
- | 读转录 / 下音频 | 你给的那个 Zoom 租户 | 分享链接本身、可选的浏览器 cookie(仅 `--cookies-from-browser`) |
- | 其余全部步骤 | 不出本机 | 讲义、转录、真题、生成的 md/pdf 都在本地处理 |
- 没有任何遥测、没有云端 API 调用、不向第三方上传你的材料。
- **转换 PDF 时**:`html_to_pdf` 关闭了 JavaScript,并只允许 `file:` / `data:` 资源,
- 远程请求一律阻断。也就是说,即使有人给你一个带 `<script>` 或远程图片的 `.md`,
- 转换过程也不会执行代码、不会泄露你的 IP。
- **会执行外部程序的地方**(都只在你的机器上、以你的权限运行):
- - `--dmg` / `--lo-app`:`hdiutil attach` 挂载 DMG,并 `xattr -dr com.apple.quarantine`
- 去掉隔离标记后执行其中的 LibreOffice。**只挂载你信任的 DMG。**
- - `yt-dlp` / `ffmpeg` / `curl`:走系统已安装版本,本仓库不打包它们。
- - `extract_pdf` 用 PyMuPDF 解析 PDF,`extract_pptx` 直接解 zip:**只处理你信任的文件。**
- **Zoom 转录的边界**:`zoom_transcript.py` 读取的是 Zoom 播放器的 feature-config 接口,
- 不是公开文档化的 API,可能随平台改动而失效,使用时请遵守所在机构的条款与课程规定。
- 日志里的分享链接已做脱敏(`/rec/share/<redacted>`),因为分享链接本身就是访问凭证。
- **不要提交真实材料**:`.gitignore` 默认忽略 `lecture_notes/`、`review/`、`transcripts/`、
- `out/`、`figures/` 与所有 `*.pdf`。样例与测试数据全部是合成的假数据。
- ## 8. 目录结构与许可
- ```text
- lecture-to-exam/
- ├── SKILL.md # 入口 + 硬规则 + 退出码 + 验证闸门(给 AI)
- ├── README.md # 本文件(给人)
- ├── INSTALL.md # 多平台安装与排障
- ├── requirements.txt / package.json
- ├── references/
- │ ├── mode-a.md # Mode A 分步流程
- │ ├── mode-b.md # Mode B 分步流程
- │ ├── transcript-spec.md # 转录稿契约
- │ ├── knowledge-spec.md # 单讲讲义格式(四行块 + 原图)
- │ └── review-spec.md # 复习手册格式(五行块 + 纯文字)
- ├── scripts/
- │ ├── run.py # ★ 统一入口(定位 skill 根 / 选解释器 / 转发退出码)
- │ ├── _common.py # 跨平台环境探测
- │ ├── check_env.py # 只读自检(--json)
- │ ├── verify_output.py # ★ 可执行格式闸门
- │ └── … # 转录、抓音、取字、出图、md→pdf
- ├── examples/ # 离线烟雾测试样例
- ├── tests/ # 32 项离线测试(缺依赖自动 SKIP)
- │ └── run_tests.py
- ├── assets/ # README 预览图
- └── .github/workflows/tests.yml # CI:每次 push 跑一遍离线测试
- ```
- **许可**:MIT,见 [LICENSE](LICENSE)。本 skill 只调用 curl / yt-dlp / ffmpeg /
- PyMuPDF / Markdown / Playwright / LibreOffice,不打包其源码。
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.