pptx-reference-deck-analysis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PPTX Reference Deck Analysis

PPTX参考演示文稿分析

Inspect a reference deck as design evidence. This skill never copies, clones, or mutates a source deck.
将参考演示文稿作为设计依据进行检查。本技能绝不会复制、克隆或修改源演示文稿。

Contract

约定

Implement required extraction on demand with a small task-local
python-pptx
script. Capture only the information required for the new deck:
  • compact prompt context: slide count and size, text summaries, shape counts, styles, brand signals, template use, and layout rhythm;
  • full extraction:
    summary
    , slides, and read-only
    layout_tree
    evidence;
  • folder diagnostics: one result per deck plus a manifest;
  • style-master analysis: colors, fonts, size distribution, master/layout use, and flow patterns;
  • derived template catalog: zero-based source indices, layout roles, usable regions, placeholders, visual structures, and constraints.
通过一个小型的任务本地
python-pptx
脚本,按需实现所需的提取操作。仅捕获新演示文稿所需的信息:
  • 精简提示上下文:幻灯片数量和尺寸、文本摘要、形状数量、样式、品牌标识、模板使用情况以及布局节奏;
  • 完整提取:
    summary
    (摘要)、幻灯片内容,以及只读的
    layout_tree
    (布局树)依据;
  • 文件夹诊断:每个演示文稿对应一份结果,外加一份清单;
  • 母版样式分析:颜色、字体、尺寸分布、母版/布局使用情况以及流程模式;
  • 衍生模板目录:从零开始的源索引、布局角色、可用区域、占位符、视觉结构和约束条件。

Rules

规则

  • Keep the source deck read-only and independently author every target-slide coordinate.
  • Use the bundled OOXML utilities only for raw themes, relationships, notes, comments, animations, media, masters, or layouts that high-level extraction cannot expose.
  • Record inspected parts and parsing exceptions in the analysis manifest.
  • Do not use extracted content, fonts, images, or proprietary assets in a generated deck without explicit permission and license evidence.
  • 保持源演示文稿为只读状态,独立编写每个目标幻灯片的坐标。
  • 仅在高级提取无法获取原始主题、关系、备注、批注、动画、媒体、母版或布局时,使用捆绑的OOXML工具。
  • 在分析清单中记录已检查的部分和解析异常。
  • 未经明确许可和许可证明,不得在生成的演示文稿中使用提取的内容、字体、图像或专有资产。

OOXML package inspection

OOXML包检查

Install
defusedxml
from
requirements.txt
before using the bundled utilities.
  1. Run
    scripts/inspect.py <deck.pptx>
    for a compact JSON report of slide order, text, theme tokens, relationships, notes, comments, animations, and media.
  2. Run
    scripts/validate_package.py <deck.pptx> --output <report.json>
    for malformed XML, broken internal relationships, content-type gaps, duplicate layout links, and orphaned parts.
  3. Run
    scripts/unpack.py <deck.pptx> <output-dir>
    only when raw-package evidence is necessary.
  4. Resolve relationship targets relative to the
    .rels
    owner; never infer slide order from filenames.
在使用捆绑工具前,从
requirements.txt
安装
defusedxml
  1. 运行
    scripts/inspect.py <deck.pptx>
    ,获取幻灯片顺序、文本、主题标记、关系、备注、批注、动画和媒体的精简JSON报告。
  2. 运行
    scripts/validate_package.py <deck.pptx> --output <report.json>
    ,检查格式错误的XML、损坏的内部关系、内容类型缺失、重复的布局链接以及孤立的组件。
  3. 仅在需要原始包依据时,运行
    scripts/unpack.py <deck.pptx> <output-dir>
  4. 相对于
    .rels
    所有者解析关系目标;绝不要从文件名推断幻灯片顺序。

Safety

安全注意事项

  • Never modify a supplied deck or blindly copy package parts into a new deck.
  • Run the scripts from a trusted workspace; they reject path traversal, symlinks, oversized members, and archive bombs.
  • Parse untrusted XML with
    defusedxml
    ; do not enable entity expansion, DTD loading, or network access.
  • Treat theme colors as tokens unless fully resolved against the color scheme.
See
references/reference-deck-analysis.md
for output shapes,
references/reference-deck-analysis-patterns.md
for documentation-only patterns, and
references/ooxml-parsing.md
for package part maps.
  • 绝不要修改提供的演示文稿,也不要盲目将包组件复制到新演示文稿中。
  • 在可信工作区运行脚本;脚本会拒绝路径遍历、符号链接、过大的成员和归档炸弹。
  • 使用
    defusedxml
    解析不可信的XML;不要启用实体扩展、DTD加载或网络访问。
  • 除非完全根据配色方案解析,否则将主题颜色视为标记。
有关输出格式,请参阅
references/reference-deck-analysis.md
;仅作文档参考的模式,请参阅
references/reference-deck-analysis-patterns.md
;包组件映射,请参阅
references/ooxml-parsing.md