AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He
refactor(svg_to_pptx): use PowerPoint-standard trigger names
hugohe3405a4ac4f33d
diff --git a/docs/animations.md b/docs/animations.mdindex 48fa05ff..9d627a02 100644--- a/docs/animations.md+++ b/docs/animations.md@@ -34,24 +34,28 @@ Flags:## Per-Element Animations-Off by default. When enabled, two trigger modes are available:+Off by default. When enabled, three Start modes are available — these mirror PowerPoint's animation-pane "Start" dropdown:-- **`click`** (default) — entering a slide → first click reveals the first semantic group; each subsequent click reveals the next group in z-order. Suits live presentations where the speaker paces reveals.-- **`auto`** — the first group fires automatically on slide entry, subsequent groups cascade after the previous one with `--animation-stagger` spacing. Suits kiosk playback, recorded walkthroughs, or anyone who wants visual flow without clicking.+- **`on-click`** (default) — entering a slide → first click reveals the first semantic group; each subsequent click reveals the next group in z-order. Suits live presentations where the speaker paces reveals.+- **`with-previous`** — all groups start together on slide entry, playing their entrance animation in parallel. Stagger ignored.+- **`after-previous`** — first group fires on slide entry, subsequent groups cascade after the previous one finishes, with `--animation-stagger` extra spacing. Suits kiosk playback, recorded walkthroughs, or anyone who wants visual flow without clicking.```bash-# Cascade every group with fade on click (recommended starting point)+# On-click cascade with fade (recommended starting point)python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade# Auto-vary effects within a slide (title fades; later groups cycle a curated pool)python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation mixed-# Auto-cascade on slide entry, 0.4s gap between groups (default stagger)-python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --animation-trigger auto+# After-previous cascade on slide entry, 0.4s gap between groups (default stagger)+python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --animation-trigger after-previous-# Auto-cascade with custom pacing+# After-previous with custom pacingpython3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation mixed \- --animation-trigger auto --animation-stagger 0.6 --animation-duration 0.5+ --animation-trigger after-previous --animation-stagger 0.6 --animation-duration 0.5++# All groups animate in unison on slide entry+python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --animation-trigger with-previous```22 single effects: `appear`, `fade`, `fly`, `cut`, `zoom`, `wipe`, `split`, `blinds`, `checkerboard`, `dissolve`, `random_bars`, `peek`, `wheel`, `box`, `circle`, `diamond`, `plus`, `strips`, `wedge`, `stretch`, `expand`, `swivel`. Plus two auto-vary modes:@@ -64,9 +68,9 @@ The pool excludes `appear` because it has no visible motion.Flags:- `-a/--animation` — effect name, `mixed`, `random`, or `none`. Default: `none`.-- `--animation-trigger` — `click` (default, presenter-paced) or `auto` (cascades automatically on slide entry).+- `--animation-trigger` — Start mode (matches PowerPoint): `on-click` (default), `with-previous`, or `after-previous`.- `--animation-duration` — per-element entrance seconds, default `0.3`.-- `--animation-stagger` — gap between elements in `auto` mode (seconds, default `0.4`). Ignored in `click` mode.+- `--animation-stagger` — gap between elements in `after-previous` mode (seconds, default `0.4`). Ignored otherwise.## Anchor Logic — Top-Level `<g id="...">`@@ -97,10 +101,11 @@ Executors should wrap logical sections in `<g id>` regardless of whether you pla| Change transition effect | `-t push` (or any from the list above) || Slower transition | `--transition-duration 0.8` || Auto-play | `--auto-advance 5` |-| Enable element animation (click) | `--animation fade` |-| Auto-cascade without clicks | `--animation fade --animation-trigger auto` |+| Enable element animation (on-click) | `--animation fade` |+| Cascade without clicks | `--animation fade --animation-trigger after-previous` |+| All groups animate together | `--animation fade --animation-trigger with-previous` || Auto-vary element animation | `--animation mixed` || Slower per-element reveal | `--animation-duration 0.5` |-| Wider gap between auto reveals | `--animation-stagger 0.8` |+| Wider gap in after-previous | `--animation-stagger 0.8` |See also: [`scripts/docs/svg-pipeline.md`](../skills/ppt-master/scripts/docs/svg-pipeline.md) for the full `svg_to_pptx.py` reference.diff --git a/docs/zh/animations.md b/docs/zh/animations.mdindex 893bc943..36e7466d 100644--- a/docs/zh/animations.md+++ b/docs/zh/animations.md@@ -34,24 +34,28 @@ python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --auto-advance 5## 页内元素动画-默认关闭。开启后有两种触发模式:+默认关闭。开启后有三种 Start 模式,**与 PowerPoint 动画窗格的 Start 下拉菜单一一对应**:-- **`click`**(默认)—— 进入页面 → 第一次点击显示第一个语义组,后续每次点击按 z-order 显示下一个组。适合现场演讲,演讲者控制节奏。-- **`auto`** —— 进入页面后第一组自动入场,后续按 `--animation-stagger` 间隔依次自动出现。适合展厅循环、录屏走查,或者只是想看流动效果不想点击。+- **`on-click`**(默认,单击时)—— 进入页面 → 第一次点击显示第一个语义组,后续每次点击按 z-order 显示下一个组。适合现场演讲,演讲者控制节奏。+- **`with-previous`**(与上一动画同时)—— 所有组在进入页面时一起入场,并行播放各自的入场动画。`--animation-stagger` 不生效。+- **`after-previous`**(在上一动画之后)—— 第一组进入页面时入场,后续组在前一个结束后接着出现,并按 `--animation-stagger` 增加额外间隔。适合展厅循环、录屏走查,或者只是想看流动效果不想点击。```bash-# 全部用 fade 点击入场(推荐起点)+# 单击触发的 fade 入场(推荐起点)python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade# 同页自动轮换效果(首组 fade,后续组在精选效果池中轮换)python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation mixed-# 进入页面自动级联,组间间隔 0.4 秒(默认 stagger)-python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --animation-trigger auto+# after-previous 自动级联,组间间隔 0.4 秒(默认 stagger)+python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --animation-trigger after-previous-# 自动级联,自定义节奏+# after-previous 自定义节奏python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation mixed \- --animation-trigger auto --animation-stagger 0.6 --animation-duration 0.5+ --animation-trigger after-previous --animation-stagger 0.6 --animation-duration 0.5++# 所有组进入页面时同时入场+python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --animation-trigger with-previous```22 种单一效果:`appear`、`fade`、`fly`、`cut`、`zoom`、`wipe`、`split`、`blinds`、`checkerboard`、`dissolve`、`random_bars`、`peek`、`wheel`、`box`、`circle`、`diamond`、`plus`、`strips`、`wedge`、`stretch`、`expand`、`swivel`。再加两种自动轮换模式:@@ -64,9 +68,9 @@ python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation mixed \参数:- `-a/--animation` — 效果名、`mixed`、`random` 或 `none`。默认 `none`。-- `--animation-trigger` — `click`(默认,演讲者点击触发)或 `auto`(进入页面后自动级联)。+- `--animation-trigger` — Start 模式(与 PowerPoint 一致):`on-click`(默认)、`with-previous`、`after-previous`。- `--animation-duration` — 单个元素入场秒数,默认 `0.3`。-- `--animation-stagger` — `auto` 模式下两组之间的间隔(秒,默认 `0.4`)。`click` 模式忽略。+- `--animation-stagger` — `after-previous` 模式下两组之间的额外间隔(秒,默认 `0.4`)。其他模式忽略。## 锚点机制 — 顶层 `<g id="...">`@@ -97,10 +101,11 @@ python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation mixed \| 切换转场效果 | `-t push`(或上文列表中任一) || 转场放慢 | `--transition-duration 0.8` || 自动播放 | `--auto-advance 5` |-| 启用元素动画(点击触发) | `--animation fade` |-| 自动级联(不需要点击) | `--animation fade --animation-trigger auto` |+| 启用元素动画(单击) | `--animation fade` |+| 自动级联(不需要点击) | `--animation fade --animation-trigger after-previous` |+| 所有组同时入场 | `--animation fade --animation-trigger with-previous` || 元素动画自动轮换 | `--animation mixed` || 元素入场放慢 | `--animation-duration 0.5` |-| auto 模式拉大间隔 | `--animation-stagger 0.8` |+| after-previous 拉大间隔 | `--animation-stagger 0.8` |完整 `svg_to_pptx.py` 参考:[`scripts/docs/svg-pipeline.md`](../../skills/ppt-master/scripts/docs/svg-pipeline.md)。diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.mdindex acc3362d..49d33209 100644--- a/skills/ppt-master/SKILL.md+++ b/skills/ppt-master/SKILL.md@@ -308,7 +308,7 @@ python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path> -s final**Optional animation flags** (add to the command above when the user asks for them; otherwise omit):- `-t <effect>` — page transition. Default `fade`. Options: `fade` / `push` / `wipe` / `split` / `strips` / `cover` / `random` / `none`.- `-a <effect>` — per-element entrance animation. Default off. Common picks: `fade` (every group fades in), `mixed` (auto-vary across the deck). Requires top-level `<g id="...">` groups (already required by Executor).-- `--animation-trigger {click,auto}` — `click` (default, presenter-paced) or `auto` (cascade automatically on slide entry; pacing via `--animation-stagger`).+- `--animation-trigger {on-click,with-previous,after-previous}` — Start mode (matches PowerPoint's animation-pane Start dropdown). Default `on-click`. Use `after-previous` (with `--animation-stagger`) for click-free cascade, or `with-previous` for all-at-once.- `--auto-advance <seconds>` — kiosk-style auto-play.Full effect list, anchor logic, and limits: [`docs/animations.md`](../../docs/animations.md).diff --git a/skills/ppt-master/references/shared-standards.md b/skills/ppt-master/references/shared-standards.mdindex b3bc8f2f..da1d484c 100644--- a/skills/ppt-master/references/shared-standards.md+++ b/skills/ppt-master/references/shared-standards.md@@ -311,7 +311,7 @@ python3 scripts/svg_to_pptx.py <project_path> -s final**Optional animation flags** (only when the user asks):- `-t <effect>` — page transition (`fade` / `push` / `wipe` / `split` / `strips` / `cover` / `random` / `none`; default `fade`)- `-a <effect>` — per-element entrance animation (`fade` / `mixed` / `random` / one of 22 named effects; default off). Anchors on top-level `<g id="...">` groups.-- `--animation-trigger {click,auto}` — `click` (default) or `auto` (cascade automatically on slide entry; pace with `--animation-stagger <seconds>`).+- `--animation-trigger {on-click,with-previous,after-previous}` — Start mode matching PowerPoint's animation-pane Start dropdown. Default `on-click`; `after-previous` cascades on slide entry (pace via `--animation-stagger <seconds>`); `with-previous` plays all groups together.- `--auto-advance <seconds>` — kiosk-style auto-playFull reference: [`docs/animations.md`](../../../docs/animations.md).diff --git a/skills/ppt-master/scripts/pptx_animations.py b/skills/ppt-master/scripts/pptx_animations.pyindex 6a1b186b..775a045e 100644--- a/skills/ppt-master/scripts/pptx_animations.py+++ b/skills/ppt-master/scripts/pptx_animations.py@@ -292,21 +292,23 @@ def _build_effect_xml(def create_sequence_timing_xml(targets: list,duration: float = 0.3,- trigger: str = 'click',+ trigger: str = 'on-click',) -> str:"""Generate a multi-target entrance sequence.Args:targets: list of (shape_id, delay_ms, animation_name) tuples, in- the order they should play. ``delay_ms`` is the delay before+ the order they should play. ``delay_ms`` is the gap beforethis element starts, measured from when the previous element- triggers (only used in ``auto`` mode; ignored in ``click``- mode where the presenter paces reveals).+ triggers (only used in ``after-previous`` mode; ignored in+ the other two).duration: per-element entrance duration in seconds.- trigger: ``'click'`` (one presenter click per element) or- ``'auto'`` (first element fires on slide entry, subsequent- elements fire after the previous one with ``delay_ms``- spacing).+ trigger: PowerPoint-standard Start mode for each element.+ ``'on-click'`` — one presenter click per element (default).+ ``'with-previous'`` — all elements start together on slide+ entry.+ ``'after-previous'`` — first element fires on slide entry,+ rest chain after the previous one with ``delay_ms`` spacing.Returns:A ``<p:timing>`` element string. Returns an empty string when@@ -315,8 +317,8 @@ def create_sequence_timing_xml(if not targets:return ''- if trigger not in ('click', 'auto'):- trigger = 'click'+ if trigger not in ('on-click', 'with-previous', 'after-previous'):+ trigger = 'on-click'dur_ms = int(duration * 1000)steps = []@@ -334,11 +336,16 @@ def create_sequence_timing_xml(next_id += 5effect_xml = _build_effect_xml(animation, shape_id, dur_ms, set_id, eff_id)- if trigger == 'click':+ if trigger == 'on-click':wrapper_cond = '<p:cond delay="indefinite"/>'node_type = 'clickEffect'+ elif trigger == 'with-previous':+ # All elements share the slide-entry trigger; played in parallel.+ wrapper_cond = '<p:cond delay="0"/>'+ node_type = 'withEffect'else:- # auto: first element fires on slide entry, rest chain via afterEffect+ # after-previous: first fires on slide entry, rest chain after+ # the previous element with delay_ms spacing.wrapper_cond = f'<p:cond delay="{int(delay_ms)}"/>'node_type = 'withEffect' if i == 0 else 'afterEffect'diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_builder.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_builder.pyindex 8c6ec8f1..bb8e0bee 100644--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_builder.py+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_builder.py@@ -136,7 +136,7 @@ def create_pptx_with_native_svg(animation: str | None = None,animation_duration: float = 0.3,animation_stagger: float = 0.1,- animation_trigger: str = 'click',+ animation_trigger: str = 'on-click',) -> bool:"""Create a PPTX file with native SVG.@@ -155,10 +155,10 @@ def create_pptx_with_native_svg(animation: Per-element entrance animation mode (single effect name,'mixed', 'random', or None to disable). Native shapes mode only.animation_duration: Per-element entrance duration in seconds.- animation_stagger: Delay between elements in ``auto`` trigger mode- (seconds). Ignored in ``click`` mode.- animation_trigger: ``'click'`` (default; one click per element) or- ``'auto'`` (cascade automatically on slide entry).+ animation_stagger: Delay between elements in ``after-previous``+ trigger mode (seconds). Ignored otherwise.+ animation_trigger: PowerPoint Start mode — ``'on-click'`` (default),+ ``'with-previous'``, or ``'after-previous'``.Returns:Whether all slides were successfully created.diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_cli.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_cli.pyindex 863dd6a9..7cf7b788 100644--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_cli.py+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_cli.py@@ -56,10 +56,11 @@ Transition effects (-t/--transition):Per-element entrance animation (-a/--animation, native shapes mode):{', '.join(animation_choices)}- Notes: applied to top-level <g id="..."> SVG groups in z-order.- --animation-trigger=click (default) → one presenter click per group.- --animation-trigger=auto → first group fires on slide entry, rest- cascade after previous with --animation-stagger spacing.+ Notes: applied to top-level <g id="..."> SVG groups in z-order. Start mode set+ by --animation-trigger, matching PowerPoint's Start dropdown:+ on-click (default) one presenter click per group+ with-previous all groups start together on slide entry+ after-previous cascade; gap = --animation-stagger secondsmixed uses a curated visible-effect sequence across the deck; random samplesfrom the same visible-effect pool.@@ -111,14 +112,16 @@ Speaker notes (enabled by default):'element), "random", or "none" (default).')parser.add_argument('--animation-duration', type=float, default=0.3,help='Per-element entrance duration in seconds (default: 0.3)')- parser.add_argument('--animation-trigger', type=str, choices=['click', 'auto'],- default='click',- help='How per-element animations advance: '- '"click" (default, one click per element) or '- '"auto" (cascade automatically on slide entry)')+ parser.add_argument('--animation-trigger', type=str,+ choices=['on-click', 'with-previous', 'after-previous'],+ default='on-click',+ help='Per-element Start mode (matches PowerPoint Start dropdown): '+ '"on-click" (default, one click per element), '+ '"with-previous" (all start together on slide entry), '+ '"after-previous" (cascade after the previous element).')parser.add_argument('--animation-stagger', type=float, default=0.4,- help='Delay between elements in --animation-trigger=auto '- '(seconds, default 0.4). Ignored in click mode.')+ help='Delay between elements in --animation-trigger=after-previous '+ '(seconds, default 0.4). Ignored in other modes.')parser.add_argument('--no-notes', action='store_true',help='Disable speaker notes embedding (enabled by default)')