Skip to content

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

feat(svg_to_pptx): --animation-trigger auto for click-free cascade

hugohe37f693e928879
diff --git a/docs/animations.md b/docs/animations.md
index 04a81226..48fa05ff 100644
--- a/docs/animations.md
+++ b/docs/animations.md
@@ -34,17 +34,24 @@ Flags:
## Per-Element Animations
-Off by default. When enabled, entering a slide → first click reveals the first semantic group; each subsequent click reveals the next group in z-order.
+Off by default. When enabled, two trigger modes are available:
+
+- **`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.
```bash
-# Cascade every group with fade (recommended starting point)
+# Cascade every group with fade on click (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
-# Slow each reveal down to 0.5s
-python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --animation-duration 0.5
+# 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
+
+# Auto-cascade with custom pacing
+python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation mixed \
+ --animation-trigger auto --animation-stagger 0.6 --animation-duration 0.5
```
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:
@@ -57,8 +64,9 @@ The pool excludes `appear` because it has no visible motion.
Flags:
- `-a/--animation` — effect name, `mixed`, `random`, or `none`. Default: `none`.
-- `--animation-duration` — per-element seconds, default `0.3`.
-- `--animation-stagger` — kept for backward compatibility; ignored by click-by-click timing.
+- `--animation-trigger` — `click` (default, presenter-paced) or `auto` (cascades automatically on slide entry).
+- `--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.
## Anchor Logic — Top-Level `<g id="...">`
@@ -89,8 +97,10 @@ 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 | `--animation fade` |
+| Enable element animation (click) | `--animation fade` |
+| Auto-cascade without clicks | `--animation fade --animation-trigger auto` |
| Auto-vary element animation | `--animation mixed` |
| Slower per-element reveal | `--animation-duration 0.5` |
+| Wider gap between auto reveals | `--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.md
index 49a09d41..893bc943 100644
--- a/docs/zh/animations.md
+++ b/docs/zh/animations.md
@@ -34,17 +34,24 @@ python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --auto-advance 5
## 页内元素动画
-默认关闭。开启后:进入页面 → 第一次点击显示第一个语义组,后续每次点击按 z-order 显示下一个组。
+默认关闭。开启后有两种触发模式:
+
+- **`click`**(默认)—— 进入页面 → 第一次点击显示第一个语义组,后续每次点击按 z-order 显示下一个组。适合现场演讲,演讲者控制节奏。
+- **`auto`** —— 进入页面后第一组自动入场,后续按 `--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.5 秒
-python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --animation-duration 0.5
+# 进入页面自动级联,组间间隔 0.4 秒(默认 stagger)
+python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --animation-trigger auto
+
+# 自动级联,自定义节奏
+python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation mixed \
+ --animation-trigger auto --animation-stagger 0.6 --animation-duration 0.5
```
22 种单一效果:`appear`、`fade`、`fly`、`cut`、`zoom`、`wipe`、`split`、`blinds`、`checkerboard`、`dissolve`、`random_bars`、`peek`、`wheel`、`box`、`circle`、`diamond`、`plus`、`strips`、`wedge`、`stretch`、`expand`、`swivel`。再加两种自动轮换模式:
@@ -57,8 +64,9 @@ python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --an
参数:
- `-a/--animation` — 效果名、`mixed`、`random` 或 `none`。默认 `none`。
+- `--animation-trigger` — `click`(默认,演讲者点击触发)或 `auto`(进入页面后自动级联)。
- `--animation-duration` — 单个元素入场秒数,默认 `0.3`。
-- `--animation-stagger` — 仅保留兼容旧命令;当前逐次点击入场逻辑会忽略它。
+- `--animation-stagger` — `auto` 模式下两组之间的间隔(秒,默认 `0.4`)。`click` 模式忽略。
## 锚点机制 — 顶层 `<g id="...">`
@@ -89,8 +97,10 @@ python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation fade --an
| 切换转场效果 | `-t push`(或上文列表中任一) |
| 转场放慢 | `--transition-duration 0.8` |
| 自动播放 | `--auto-advance 5` |
-| 启用元素动画 | `--animation fade` |
+| 启用元素动画(点击触发) | `--animation fade` |
+| 自动级联(不需要点击) | `--animation fade --animation-trigger auto` |
| 元素动画自动轮换 | `--animation mixed` |
| 元素入场放慢 | `--animation-duration 0.5` |
+| auto 模式拉大间隔 | `--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.md
index c2a5d4b1..acc3362d 100644
--- a/skills/ppt-master/SKILL.md
+++ b/skills/ppt-master/SKILL.md
@@ -307,7 +307,8 @@ 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 by click), `mixed` (auto-vary across the deck). Requires top-level `<g id="...">` groups (already required by Executor).
+- `-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`).
- `--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.md
index 1d8fdcb7..b3bc8f2f 100644
--- a/skills/ppt-master/references/shared-standards.md
+++ b/skills/ppt-master/references/shared-standards.md
@@ -311,6 +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>`).
- `--auto-advance <seconds>` — kiosk-style auto-play
Full reference: [`docs/animations.md`](../../../docs/animations.md).
diff --git a/skills/ppt-master/scripts/pptx_animations.py b/skills/ppt-master/scripts/pptx_animations.py
index 901b3fb9..6a1b186b 100644
--- a/skills/ppt-master/scripts/pptx_animations.py
+++ b/skills/ppt-master/scripts/pptx_animations.py
@@ -292,15 +292,21 @@ def _build_effect_xml(
def create_sequence_timing_xml(
targets: list,
duration: float = 0.3,
+ trigger: str = 'click',
) -> str:
- """Generate a click-by-click multi-target entrance sequence.
+ """Generate a multi-target entrance sequence.
Args:
- targets: list of (shape_id, delay_ms, animation_name) tuples,
- in the order they should play. Each element is a separate
- ``clickEffect`` so one presenter click reveals one semantic group.
- ``delay_ms`` is ignored in this mode.
+ targets: list of (shape_id, delay_ms, animation_name) tuples, in
+ the order they should play. ``delay_ms`` is the delay before
+ this element starts, measured from when the previous element
+ triggers (only used in ``auto`` mode; ignored in ``click``
+ mode where the presenter paces reveals).
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).
Returns:
A ``<p:timing>`` element string. Returns an empty string when
@@ -309,31 +315,43 @@ def create_sequence_timing_xml(
if not targets:
return ''
+ if trigger not in ('click', 'auto'):
+ trigger = 'click'
+
dur_ms = int(duration * 1000)
steps = []
next_id = 3
for i, target in enumerate(targets):
- shape_id, _delay_ms, animation = target
+ shape_id, delay_ms, animation = target
if animation not in ANIMATIONS:
animation = 'fade'
anim_info = ANIMATIONS[animation]
wrapper_id = next_id
inner_id = next_id + 1
- click_id = next_id + 2
+ leaf_id = next_id + 2
set_id = next_id + 3
eff_id = next_id + 4
next_id += 5
effect_xml = _build_effect_xml(animation, shape_id, dur_ms, set_id, eff_id)
+
+ if trigger == 'click':
+ wrapper_cond = '<p:cond delay="indefinite"/>'
+ node_type = 'clickEffect'
+ else:
+ # auto: first element fires on slide entry, rest chain via afterEffect
+ wrapper_cond = f'<p:cond delay="{int(delay_ms)}"/>'
+ node_type = 'withEffect' if i == 0 else 'afterEffect'
+
steps.append(f'''<p:par>
<p:cTn id="{wrapper_id}" fill="hold">
- <p:stCondLst><p:cond delay="indefinite"/></p:stCondLst>
+ <p:stCondLst>{wrapper_cond}</p:stCondLst>
<p:childTnLst>
<p:par>
<p:cTn id="{inner_id}" fill="hold">
<p:stCondLst><p:cond delay="0"/></p:stCondLst>
<p:childTnLst>
<p:par>
- <p:cTn id="{click_id}" presetID="{anim_info.get('presetID', 1)}" presetClass="entr" presetSubtype="{anim_info.get('presetSubtype', 0)}" fill="hold" nodeType="clickEffect">
+ <p:cTn id="{leaf_id}" presetID="{anim_info.get('presetID', 1)}" presetClass="entr" presetSubtype="{anim_info.get('presetSubtype', 0)}" fill="hold" nodeType="{node_type}">
<p:stCondLst><p:cond delay="0"/></p:stCondLst>
<p:childTnLst>
{effect_xml}
diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_builder.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_builder.py
index da515c2f..8c6ec8f1 100644
--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_builder.py
+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_builder.py
@@ -136,6 +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',
) -> bool:
"""Create a PPTX file with native SVG.
@@ -154,7 +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: Legacy option ignored by click-by-click timing.
+ 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).
Returns:
Whether all slides were successfully created.
@@ -290,6 +294,7 @@ def create_pptx_with_native_svg(
mixed_animation_offset += max(0, len(anim_targets) - 1)
timing_xml = '\n' + create_sequence_timing_xml(
seq_targets, duration=animation_duration,
+ trigger=animation_trigger,
)
slide_xml = slide_xml.replace(
'</p:sld>',
diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_cli.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_cli.py
index 961d6587..863dd6a9 100644
--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_cli.py
+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_cli.py
@@ -57,7 +57,9 @@ 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.
- Each animated group uses an independent on-click trigger.
+ --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.
mixed uses a curated visible-effect sequence across the deck; random samples
from the same visible-effect pool.
@@ -109,8 +111,14 @@ 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-stagger', type=float, default=0.1,
- help='Legacy option; ignored by click-by-click timing')
+ 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-stagger', type=float, default=0.4,
+ help='Delay between elements in --animation-trigger=auto '
+ '(seconds, default 0.4). Ignored in click mode.')
parser.add_argument('--no-notes', action='store_true',
help='Disable speaker notes embedding (enabled by default)')
@@ -192,6 +200,7 @@ Speaker notes (enabled by default):
animation=animation,
animation_duration=args.animation_duration,
animation_stagger=args.animation_stagger,
+ animation_trigger=args.animation_trigger,
)
success = True