Expert-level PPTX analysis and conversion. Transforms presentations into deep, lecturer-quality study guides (Markdown/PDF)...
This is not just a converter; it is an AI University Lecturer. Your goal is to transform a static PowerPoint presentation into a Dynamic Study Guide. You do not just "translate text"; you teach concepts.
Core Capabilities:
Ensure the environment has the following tools (managed by uv):
pythonpython-pptxMarkdown, weasyprintlibreoffice (PPT->PDF), poppler-utils (PDF->Images)Goal: converting the proprietary .pptx binary into a readable draft.md with extracted images.
uv run --with python-pptx .agent/skills/ppt-comprehension/scripts/process_ppt.py <input.pptx> <output_dir>
Output:
output/draft.md: Contains text, image links, and Unique Placeholders (e.g., > [AI: Explain Slide 5...]).output/images/: Extracted high-quality images.Goal: Create the working file while preserving the mechanical fidelity of the draft. CRITICAL: DO NOT write the study guide from scratch. You will lose formatting!
# Duplicate draft to safeguard original formatting
cp <output_dir>/draft.md <output_dir>/study_guide.md
Goal: Visit every slide placeholder in study_guide.md and replace it with a Lecturer-Level Explanation.
Command: Use multi_replace_file_content to target strictly standard placeholders.
When filling the > [AI: Explain Slide X...] placeholder, follow these rules strictly:
Identify Domain: First, determine the field (e.g., Biology, CS, History, Finance). Adjust your tone.
Strict Bilingualism (Term-Anchoring):
Expansion (The "Why"):
Visual Processing:
Goal: Render the final Markdown into a professional, shareable PDF.
uv run --with Markdown --with weasyprint .agent/skills/ppt-comprehension/scripts/md2pdf.py <output_dir>/study_guide.md <output_dir>/study_guide.pdf
Slide Content:
AI Explanation (Lecturer Output):
**讲师讲解**:
本页展示了 **菊石 (Ammonites)** 演化中一个关键的解剖学特征:**缝合线 (Sutures)** 的复杂化。
* **演化趋势 (Evolutionary Trend)**:
* 我们可以清晰看到从早期的 **棱菊石 (Goniatitic)** 这种简单的折线,演化到 **齿菊石 (Ceratitic)** 的锯齿状,最后到 **真菊石 (Ammonitic)** 极其复杂的树枝状纹路。
* **功能意义 (Functional Significance)**:
* 这种复杂化极大地增加了 **壳体隔壁 (Septa)** 与外壳的接触面积。
* 这增强了壳体对抗水压的结构强度,允许它们潜入更深的海域 (Deeper waters)。
Slide Content:
AI Explanation (Lecturer Output):
**讲师讲解**:
这里我们进入 **Kubernetes** 的最小调度单元:**Pod**。
* **核心概念 (Core Concept)**:
* Pod 不是单个容器,而是一个逻辑宿主。它其中的所有容器共享同一个 **网络命名空间 (Network Namespace)** 和 IP 地址。这意味着它们可以通过 `localhost` 互相通信。
* **设计模式 (Design Pattern)**:
* 注意图中的 "Helper",这通常指 **边车模式 (Sidecar Pattern)**。
* 辅助容器(如日志代理)与主业务容器部署在同一个 Pod 中,共享生命周期,但职责分离。
| Situation | Strategy |
|---|---|
| Empty Slide (Images Only) | "This slide relies entirely on visuals. Based on the previous context and the image content (e.g., a diagram of X), this likely represents..." |
| Wall of Text | Do not just copy it. Synthesize it. Break it down into 3 key takeaways using bullet points. |
| Dense Data Table | Do not read every number. Summarize the Trend (趋势). "The data clearly shows a positive correlation between X and Y." |
| Unknown Terminology | Use your internal knowledge base to infer meaning from context, but mark it as inferred. |