keynote

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Keynote Skill

Keynote Skill

Quick Reference

快速参考

TaskGuide
Read / analyze a
.key
deck
python scripts/keynote_tool.py inspect presentation.key --json
Dump text by slide
python scripts/keynote_tool.py dump-text presentation.key
Get slide count
python scripts/keynote_tool.py get-slide-count presentation.key
Read presenter notes
python scripts/keynote_tool.py get-notes presentation.key --json
List master layouts
python scripts/keynote_tool.py list-masters presentation.key --json
Edit existing Keynote deckRead editing.md
Create deck from scratchRead creation.md
List available themes
python scripts/keynote_tool.py list-themes
Export to PPTX / PDF
python scripts/keynote_tool.py export presentation.key --pptx out.pptx --pdf out.pdf
Render slide images
python scripts/keynote_tool.py render-images presentation.key --out-dir rendered
Render specific slides
python scripts/keynote_tool.py render-images presentation.key --out-dir rendered --slides 3,6-8

任务操作指南
读取/分析.key演示文稿
python scripts/keynote_tool.py inspect presentation.key --json
按幻灯片导出文本
python scripts/keynote_tool.py dump-text presentation.key
获取幻灯片数量
python scripts/keynote_tool.py get-slide-count presentation.key
读取演示者备注
python scripts/keynote_tool.py get-notes presentation.key --json
列出母版版式
python scripts/keynote_tool.py list-masters presentation.key --json
编辑现有Keynote演示文稿阅读editing.md
从头创建演示文稿阅读creation.md
列出可用主题
python scripts/keynote_tool.py list-themes
导出为PPTX/PDF
python scripts/keynote_tool.py export presentation.key --pptx out.pptx --pdf out.pdf
渲染幻灯片图片
python scripts/keynote_tool.py render-images presentation.key --out-dir rendered
渲染指定幻灯片
python scripts/keynote_tool.py render-images presentation.key --out-dir rendered --slides 3,6-8

Reading Content

内容读取

bash
undefined
bash
undefined

Inspect slide structure, layouts, and text item counts

检查幻灯片结构、版式和文本项数量

python scripts/keynote_tool.py inspect presentation.key --json
python scripts/keynote_tool.py inspect presentation.key --json

Dump text grouped by slide (includes layout names)

按幻灯片导出带版式信息的可读文本

python scripts/keynote_tool.py dump-text presentation.key
python scripts/keynote_tool.py dump-text presentation.key

Quick slide count

快速获取幻灯片数量

python scripts/keynote_tool.py get-slide-count presentation.key
python scripts/keynote_tool.py get-slide-count presentation.key

Read presenter notes (all slides or specific)

读取演示者备注(全部幻灯片或指定幻灯片)

python scripts/keynote_tool.py get-notes presentation.key --json python scripts/keynote_tool.py get-notes presentation.key --slide 3
python scripts/keynote_tool.py get-notes presentation.key --json python scripts/keynote_tool.py get-notes presentation.key --slide 3

List available master slide layouts (essential for template-based work)

列出可用母版幻灯片版式(基于模板工作的必备操作)

python scripts/keynote_tool.py list-masters presentation.key --json
python scripts/keynote_tool.py list-masters presentation.key --json

Export for downstream tooling

导出供下游工具使用

python scripts/keynote_tool.py export presentation.key --pptx output.pptx --pdf output.pdf

---
python scripts/keynote_tool.py export presentation.key --pptx output.pptx --pdf output.pdf

---

Editing Workflow

编辑工作流

Read editing.md for full details.
  1. Inspect slide structure with
    inspect
    and
    dump-text
    .
  2. Apply targeted edits with
    replace-text
    ,
    set-text
    ,
    format-text
    , or structural commands.
  3. Export to
    .pdf
    /
    .pptx
    and run visual/content QA.

详细说明请阅读editing.md
  1. 使用
    inspect
    dump-text
    命令检查幻灯片结构。
  2. 使用
    replace-text
    set-text
    format-text
    或结构命令进行针对性编辑。
  3. 导出为.pdf/.pptx格式并进行视觉/内容QA测试。

Creating From Scratch

从头创建演示文稿

Read creation.md for full details.
Use when no template deck exists or when a new native
.key
deck is required. For template-based workflows (corporate templates), see the template section in creation.md.

详细说明请阅读creation.md
当没有模板演示文稿或需要新建原生.key演示文稿时使用此功能。对于基于模板的工作流(如企业模板),请查看creation.md中的模板章节。

Command Reference

命令参考

CommandPurpose
inspect
Slide count, layout names, and text-item inventory
dump-text
Human-readable text by slide with layout info
get-slide-count
Quick slide count
get-notes
Read presenter notes
set-notes
Write presenter notes
replace-text
Find/replace text across all text items
set-text
Set text of a specific text item on a specific slide
format-text
Set font, size, and/or color of a text item
add-text-item
Create a new text box on a slide with optional formatting
add-slide
Add a new slide (optional position and layout)
delete-slide
Delete a slide by index
add-image
Insert an image on a slide with optional position/size
list-themes
List available Keynote themes
list-masters
List master slide layouts in a document
create
Create a new empty Keynote document
export
Export
.key
to
.pptx
and/or
.pdf
render-images
Slide image rendering for QA (supports selective slides)

命令用途
inspect
获取幻灯片数量、版式名称和文本项清单
dump-text
按幻灯片导出带版式信息的可读文本
get-slide-count
快速获取幻灯片数量
get-notes
读取演示者备注
set-notes
写入演示者备注
replace-text
在所有文本项中查找并替换文本
set-text
设置指定幻灯片上指定文本项的内容
format-text
设置文本项的字体、大小和/或颜色
add-text-item
在幻灯片上创建新文本框并可选择设置格式
add-slide
添加新幻灯片(可指定位置和版式)
delete-slide
按索引删除幻灯片
add-image
在幻灯片上插入图片并可指定位置/大小
list-themes
列出可用的Keynote主题
list-masters
列出文档中的母版幻灯片版式
create
创建新的空白Keynote文档
export
将.key文件导出为.pptx和/或.pdf格式
render-images
渲染幻灯片图片用于QA测试(支持选择特定幻灯片)

Design Guidelines

设计规范

Color Strategy

色彩策略

  • Use 2-3 accent colors plus a neutral background.
  • Pick colors from the Keynote theme palette for consistency.
  • Ensure sufficient contrast between text and background (4.5:1 minimum).
  • 使用2-3种强调色加中性背景。
  • 从Keynote主题调色板中选择颜色以保持一致性。
  • 确保文本与背景之间有足够的对比度(最小4.5:1)。

Typography

排版

ElementFont SizeWeight
Slide title36-44 ptBold
Section header28-32 ptBold
Body text18-24 ptRegular
Code blocks14-20 ptMonospace (Menlo, SF Mono)
Captions / footnotes12-14 ptRegular or Light
  • Limit each slide to 2 font families maximum.
  • Use the theme's default fonts unless there is a specific reason to override.
  • For code slides: use
    format-text --font "Menlo" --color "#FFFFFF"
    on Code master layouts.
元素字体大小字重
幻灯片标题36-44 pt粗体
章节标题28-32 pt粗体
正文文本18-24 pt常规
代码块14-20 pt等宽字体(Menlo, SF Mono)
说明文字/脚注12-14 pt常规或轻量
  • 每张幻灯片最多使用2种字体族。
  • 除非有特殊原因,否则使用主题默认字体。
  • 对于代码幻灯片:在代码母版版式上使用
    format-text --font "Menlo" --color "#FFFFFF"
    命令。

Layout

布局

  • Keep a 40-60 pt margin from all slide edges.
  • Align elements to a consistent grid.
  • Place one key idea per slide; avoid visual clutter.
  • Use visual elements (images, shapes, charts) on most slides to maintain engagement.

  • 所有幻灯片边缘保留40-60 pt的边距。
  • 元素对齐到统一网格。
  • 每张幻灯片只放一个核心观点;避免视觉杂乱。
  • 大多数幻灯片使用视觉元素(图片、形状、图表)以保持吸引力。

QA (Required)

QA测试(必填)

  • Always export edited deck to
    .pdf
    and/or
    .pptx
    .
  • Verify text content after edits (
    dump-text
    or
    markitdown
    on exported
    .pptx
    ).
  • Render slide images and inspect overlap, clipping, and spacing.
  • Use
    --slides
    to render only changed slides and conserve resources.
bash
undefined
  • 编辑后的演示文稿务必导出为.pdf和/或.pptx格式。
  • 编辑后验证文本内容(使用
    dump-text
    命令或对导出的.pptx使用markitdown)。
  • 渲染幻灯片图片并检查重叠、裁剪和间距问题。
  • 使用
    --slides
    参数仅渲染修改过的幻灯片以节省资源。
bash
undefined

Render all slides

渲染所有幻灯片

python scripts/keynote_tool.py render-images presentation.key --out-dir rendered
python scripts/keynote_tool.py render-images presentation.key --out-dir rendered

Render only specific slides (saves time and tokens)

仅渲染指定幻灯片(节省时间和资源)

python scripts/keynote_tool.py render-images presentation.key --out-dir rendered --slides 3,6-8

---
python scripts/keynote_tool.py render-images presentation.key --out-dir rendered --slides 3,6-8

---

Limitations

限制说明

  • Native
    .key
    editing requires macOS + Keynote.app.
  • Keynote automation is not truly headless; the app may still launch or briefly appear during operations.
  • Script avoids forced app focus (
    activate
    ) to reduce UI interruption, but macOS may still surface windows.
  • Some master layouts have linked text items (e.g., Code layout links t1 and t3). Use
    add-text-item
    to create independent text boxes when needed.
  • 原生.key文件编辑需要macOS + Keynote.app。
  • Keynote自动化并非真正的无头模式;操作期间应用程序可能仍会启动或短暂显示。
  • 脚本避免强制获取应用焦点(
    activate
    )以减少UI干扰,但macOS仍可能弹出窗口。
  • 部分母版版式包含关联文本项(例如代码版式关联t1和t3)。需要时使用
    add-text-item
    命令创建独立文本框。

Dependencies

依赖项

  • Python 3.10+
  • macOS with
    Keynote.app
  • osascript
  • pdftoppm
    (optional, for image rendering)
  • Python 3.10+
  • 安装有
    Keynote.app
    的macOS系统
  • osascript
  • pdftoppm
    (可选,用于图片渲染)