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
fix: subtitles keep written-out numbers whole; web_to_md refuses -o with several URLs; narration_sync takes an existing --pptx path as given
hugohe37086c45c2ed5
diff --git a/skills/ppt-master/references/native-data-interface.md b/skills/ppt-master/references/native-data-interface.mdindex 386abef1..73a498a3 100644--- a/skills/ppt-master/references/native-data-interface.md+++ b/skills/ppt-master/references/native-data-interface.md@@ -66,13 +66,13 @@ The hash is a synchronization receipt, not proof of semantic equivalence; never### Table schema — `ppt-master.semantic-table.v2`-Every payload carries that exact `schema`; `columns` holds the optional header row and `rows` the body rows; `column_widths` / `row_heights` are relative weights. A cell is a string or an object with `text` (or `paragraphs` for rich text), `fill`, `color`, `align` (`l` / `ctr` / `r`), `valign` (`top` / `middle` / `bottom`), `bold`, `font_size`, `padding`, and per-side `borders` (each side is `{"style": "none"}` or `{"style": "solid", "color", "width"}`; a border without `style` is rejected); exact repetition may be factored into `defaults.cell` / `defaults.paragraph` / `defaults.run` (cell fields such as `align`, `valign`, `padding`, `font_size` go under `defaults.cell`, never directly under `defaults`) and named `cell_styles`. Merged cells use positive `row_span` / `col_span` on the anchor with every covered cell as `{"merge_continuation": true}`. The complete field grammar: [`native-data.md`](../scripts/docs/native-data.md).+Every payload carries that exact `schema`; `columns` holds the optional header row and `rows` the body rows; `column_widths` / `row_heights` are relative weights. A cell is a string or an object with `text` (or `paragraphs` for rich text), `fill`, `color`, `align` (`l` / `ctr` / `r`), `valign` (`top` / `middle` / `bottom`), `bold`, `font_size`, `padding`, and per-side `borders` keyed `left` / `right` / `top` / `bottom` / `diagonal_down` / `diagonal_up` (full words, unlike `align`; each side is `{"style": "none"}` or `{"style": "solid", "color", "width"}`; a border without `style` is rejected); exact repetition may be factored into `defaults.cell` / `defaults.paragraph` / `defaults.run` (cell fields such as `align`, `valign`, `padding`, `font_size` go under `defaults.cell`, never directly under `defaults`) and named `cell_styles`. Merged cells use positive `row_span` / `col_span` on the anchor with every covered cell as `{"merge_continuation": true}`. The complete field grammar: [`native-data.md`](../scripts/docs/native-data.md).**Hard rule — the table payload is complete**: every row, summary line, value, and cell style that must survive `--native-charts-and-tables` is in `columns` / `rows`, because fallback text is discarded on that route. A payload holding only `font_size` and a uniform border is not complete when the fallback draws a header band, row or column fills, first-column emphasis, non-uniform row heights, or sparse rules. Numeric or currency columns use cell objects with `align: "r"` (`text-anchor="end"` does not carry).### Chart schemas-Supported `type` values: `column`, `bar`, `line`, `area` (each with `grouping`), `pie`, `doughnut`, `pieOfPie`, `barOfPie`, `radar`, `radarMarkers`, `radarFilled`, `scatter`, `bubble`, `combo`, `treemap`, `sunburst`, `histogram`, `pareto`, `boxWhisker`, `waterfall`, `funnel`, `stock`. Category charts take `categories` plus `series[].values`; XY charts take `series[].x` / `y` (bubble adds `size`); combo takes `plots[]` or typed `series[]`; ChartEx types take their own hierarchy or value fields. `data_labels` (column / bar / line / area plots only; other types show values through companion text), `axes`, `axis_titles`, `show_legend` / `legend_position`, companion text (`caption`, `source`, `note`), and `style.colors` are the chrome fields. 3D aliases and `surface` are unsupported; exploded pie, `map`, `heatmap`, `bullet`, and `gantt` fail fast. Every field, enum, and range: [`native-data.md`](../scripts/docs/native-data.md).+Supported `type` values: `column`, `bar`, `line`, `area` (each with `grouping`), `pie`, `doughnut`, `pieOfPie`, `barOfPie`, `radar`, `radarMarkers`, `radarFilled`, `scatter`, `bubble`, `combo`, `treemap`, `sunburst`, `histogram`, `pareto`, `boxWhisker`, `waterfall`, `funnel`, `stock`. Category charts take `categories` plus `series[].values`; XY charts take `series[].x` / `y` (bubble adds `size`); combo takes `plots[]` or typed `series[]`; ChartEx types take their own hierarchy or value fields. `data_labels` (column / bar / line / area plots only; other types show values through companion text), `axes` (per axis `minimum` / `maximum` / `major_unit`, never `min` / `max`), `axis_titles`, `show_legend` / `legend_position`, companion text (`caption`, `source`, `note`), and `style.colors` are the chrome fields. 3D aliases and `surface` are unsupported; exploded pie, `map`, `heatmap`, `bullet`, and `gantt` fail fast. Every field, enum, and range: [`native-data.md`](../scripts/docs/native-data.md).**Chart chrome and color**: SVG-first metadata matches the fallback chrome and reads it literally — the dominant stroke of elements named `axis` becomes `style.axis_color` and of those named `grid` becomes `style.grid_color` (unlabeled lines fall back to the marker's dominant stroke), numbers keep their written form (a payload `73.0` renders as `73` unless `number_format` says otherwise), and marker text that is not a category, data label, axis label, or legend entry needs a companion entry; JSON-first owns its chrome. Generated payloads use uppercase `#RRGGBB`. Negative bars keep the series fill. The final checker tags SVG-first parity findings `blocks --native-charts-and-tables export`; that export refuses them, so clear them before exporting the native variant.diff --git a/skills/ppt-master/references/video-design.md b/skills/ppt-master/references/video-design.mdindex 4fa01e3a..4b9d492b 100644--- a/skills/ppt-master/references/video-design.md+++ b/skills/ppt-master/references/video-design.md@@ -65,6 +65,7 @@ Conditional design guidance for presentations whose intended use is recorded, se| Progressive reveal, continuing geometry, or timed emphasis materially aids explanation | Enable/load the appropriate animation capability || Quick generates a PPTX for recorded, self-running, or video delivery | **Hard rule**: enable Custom Animations before SVG authoring, use semantic groups and page-specific choreography, and complete the stage with a validated `animations.json` before base export; deck-wide `-a auto` and page transitions do not satisfy it; pages or groups may stay static — no coverage quota || Quick directly delivers a narrated video or MP4 | **Mandatory**: also enable Speaker Notes, Narration Audio, and video export; write the complete per-scene narration to `notes/total.md` before P01 as page-design input (agent-authored wording may be finalized after the roster, final/literal input stays verbatim); resolve narration-governed timing before audio, requiring timestamped page-local SRT for cue sync or subtitle delivery |+| Default generates a recorded or self-running deck and the workflow writes the narration itself | Enable Speaker Notes, Narration Audio, and Custom Animations at Stage 2; write the complete per-scene narration to `notes/total.md` after the approved roster/lock and before Step 5 as page-design input (agent-authored wording may be finalized during final-SVG validation, before audio) || The user explicitly requests static or page-transition-only playback | Keep object animation off; retain the remaining notes/audio/video outcomes |Default never forces object animation or audio merely because a deck may later be recorded; the Quick requirement selects the capability, not motion coverage.diff --git a/skills/ppt-master/scripts/narration_sync.py b/skills/ppt-master/scripts/narration_sync.pyindex 35bca053..6eced8df 100644--- a/skills/ppt-master/scripts/narration_sync.py+++ b/skills/ppt-master/scripts/narration_sync.py@@ -308,8 +308,9 @@ def _project_path(project_path: Path, value: str | None, default: Path) -> Path:def _project_input_path(project_path: Path, value: str) -> Path:+ """Resolve an input path: absolute, or existing as given, else project-relative."""path = Path(value)- if path.is_absolute():+ if path.is_absolute() or path.exists():return pathreturn project_path / pathdiff --git a/skills/ppt-master/scripts/source_to_md/web_to_md.py b/skills/ppt-master/scripts/source_to_md/web_to_md.pyindex 5577dccc..96c28e25 100644--- a/skills/ppt-master/scripts/source_to_md/web_to_md.py+++ b/skills/ppt-master/scripts/source_to_md/web_to_md.py@@ -1014,6 +1014,7 @@ def _convert_remote_document(route = build_conversion_command(local_path, output_path)print(f" [>>] {route.script_name} {local_path}")+ sys.stdout.flush()rc = subprocess.run(route.command).returncodeif rc != 0 or not os.path.isfile(output_path):return False, url, f"{route.script_name} exited with {rc}", None@@ -1203,10 +1204,17 @@ def main(argv: list[str] | None = None) -> int:)return 2+ if args.output and len(targets) > 1:+ print(+ "web_to_md.py: error: -o/--output names one Markdown file and takes "+ "one URL; for several URLs pass --dir <output directory> instead",+ file=sys.stderr,+ )+ return 2+results = []for i, url in enumerate(targets):- # Allow specific output file only if 1 URL- out = args.output if (len(targets) == 1 and args.output) else None+ out = args.output or Nonesuccess, url, err, out_path = process_url(url,out,diff --git a/skills/ppt-master/scripts/tests/test_dogfood_leaves_fixes.py b/skills/ppt-master/scripts/tests/test_dogfood_leaves_fixes.pyindex c1a45882..144e7918 100644--- a/skills/ppt-master/scripts/tests/test_dogfood_leaves_fixes.py+++ b/skills/ppt-master/scripts/tests/test_dogfood_leaves_fixes.py@@ -28,6 +28,8 @@ from svg_to_pptx.drawingml.converter import convert_svg_to_slide_shapes # noqa:from svg_to_pptx.drawingml.utils import project_filter_errors # noqa: E402from svg_to_pptx.pptx_package.builder import _slide_size_type # noqa: E402from project_management.cli import _is_project_tree, PROJECTS_ROOT # noqa: E402+from narration_sync import _project_input_path # noqa: E402+from tts_backends import backend_edge # noqa: E402PDF_URL = "https://www.example.gov/content/pkg/report/pdf/report.pdf"@@ -130,6 +132,43 @@ class ImportSourcesProjectTreeTests(unittest.TestCase):scratch.rmdir()+class NarrationRoundTests(unittest.TestCase):+ def test_subtitle_split_keeps_a_written_number_whole(self) -> None:+ text = "分别定点在东经八十度、一百一十点五度和一百四十度。"+ # Per-character word boundaries, as MiniMax returns them for Chinese.+ words = [+ backend_edge._MappedWord(start=i * 10, end=i * 10 + 10, source_start=i, source_end=i + 1)+ for i in range(len(text))+ ]+ parts = backend_edge._hard_split_span(text, (0, len(text)), words, 14)+ pieces = [text[a:b] for a, b in parts]+ for piece in pieces:+ self.assertFalse(+ piece.startswith(("一十", "十点", "点五")) or piece.endswith(("一百", "一百一", "点")),+ pieces,+ )+ self.assertEqual("".join(pieces), text.replace(" ", ""))++ def test_project_input_path_accepts_a_cwd_relative_existing_file(self) -> None:+ with tempfile.TemporaryDirectory() as tmp:+ root = Path(tmp)+ project = root / "project"+ (project / "exports").mkdir(parents=True)+ pptx = project / "exports" / "deck.pptx"+ pptx.write_bytes(b"PK")+ self.assertEqual(_project_input_path(project, "exports/deck.pptx"), project / "exports" / "deck.pptx")+ self.assertEqual(_project_input_path(project, str(pptx)), pptx)++ def test_web_to_md_refuses_output_file_for_several_urls(self) -> None:+ import io+ from contextlib import redirect_stderr+ buffer = io.StringIO()+ with redirect_stderr(buffer):+ rc = web_to_md.main(["https://example.org/a", "https://example.org/b", "-o", "out.md"])+ self.assertEqual(rc, 2)+ self.assertIn("--dir", buffer.getvalue())++class PolygonFilterTests(unittest.TestCase):SVG = ('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">'diff --git a/skills/ppt-master/scripts/tts_backends/backend_edge.py b/skills/ppt-master/scripts/tts_backends/backend_edge.pyindex 8d0856e0..77506f04 100644--- a/skills/ppt-master/scripts/tts_backends/backend_edge.py+++ b/skills/ppt-master/scripts/tts_backends/backend_edge.py@@ -16,6 +16,10 @@ _TICKS_PER_MILLISECOND = 10_000_SENTENCE_END = frozenset("。!?!?")_CLAUSE_END = frozenset(",,;;::")_CLOSING_PUNCTUATION = frozenset('”’」』)》)"\'')+# Characters that spell one number when adjacent: digits, CJK numerals and+# their connectors. A cue boundary between two of them splits a value such as+# 一百一十点五 or 2,750 across two subtitles.+_NUMERAL_CHARS = frozenset("0123456789零〇一二三四五六七八九十百千万亿两点.,%")@dataclass(frozen=True)@@ -196,6 +200,13 @@ def _sentence_spans(text: str) -> list[tuple[int, int]]:return spans+def _inside_number(text: str, index: int) -> bool:+ """Return whether a cut at ``index`` would split one written-out number."""+ if index <= 0 or index >= len(text):+ return False+ return text[index - 1] in _NUMERAL_CHARS and text[index] in _NUMERAL_CHARS++def _hard_split_span(text: str,span: tuple[int, int],@@ -214,6 +225,15 @@ def _hard_split_span(if start < word.source_end < endand _display_length(text, start, word.source_end) <= max_chars]+ # Provider word boundaries in Chinese are often per character; prefer+ # the cuts that keep a number whole and fall back only when no other+ # cut fits the width.+ whole_number_candidates = [+ candidate for candidate in candidates+ if not _inside_number(text, candidate[0])+ ]+ if whole_number_candidates:+ candidates = whole_number_candidatesif candidates:split_at, _ = min(candidates,diff --git a/skills/ppt-master/workflows/stages/generate-audio.md b/skills/ppt-master/workflows/stages/generate-audio.mdindex dd622b7d..b9ae4cb1 100644--- a/skills/ppt-master/workflows/stages/generate-audio.md+++ b/skills/ppt-master/workflows/stages/generate-audio.md@@ -35,7 +35,7 @@ python3 skills/ppt-master/scripts/notes_to_audio.py --list-voices --locale <locapython3 skills/ppt-master/scripts/notes_to_audio.py --provider <elevenlabs|minimax|qwen|cosyvoice> --list-voices```-From the flat list, pick **3–6 candidates**: cover both genders when the locale has them; for edge prefer the curated `COMMON_VOICES` set; for ElevenLabs prefer voices already in the user's account and never override a user-supplied `voice_id`; for MiniMax / Qwen / CosyVoice use a supplied cloned `voice_id` directly and never attempt cloning here; for CosyVoice subtitles use a timestamp-capable model/voice pair, and `--cosyvoice-audio-only` only when the user accepts no page-local SRT. Match the deck's tone — a Chinese consultant / financial deck leans a steady male (`zh-CN-YunjianNeural`) or clear female (`zh-CN-XiaoxiaoNeural`) voice; teaching / product decks a bright female or young male (`zh-CN-XiaoyiNeural` / `zh-CN-YunxiNeural`); launch / broadcast decks `zh-CN-YunyangNeural`; English consultant decks `en-US-GuyNeural` or `en-US-JennyNeural`; Japanese / Korean from `ja-JP-*` / `ko-KR-*` with gender + tone noted. Describe each candidate in one line in the user's chat language (gender · tone · best-fit scenario), with the exact name/ID to pass to `--voice-id` for cloud providers.+From the flat list, pick **3–6 candidates**: cover both genders when the locale has them; for edge prefer the curated `COMMON_VOICES` set; for ElevenLabs prefer voices already in the user's account and never override a user-supplied `voice_id`; for MiniMax / Qwen / CosyVoice `--list-voices` prints no catalog — use a supplied cloned `voice_id` directly (never attempt cloning here) or a system voice id from the provider's documentation; for CosyVoice subtitles use a timestamp-capable model/voice pair, and `--cosyvoice-audio-only` only when the user accepts no page-local SRT. Match the deck's tone — a Chinese consultant / financial deck leans a steady male (`zh-CN-YunjianNeural`) or clear female (`zh-CN-XiaoxiaoNeural`) voice; teaching / product decks a bright female or young male (`zh-CN-XiaoyiNeural` / `zh-CN-YunxiNeural`); launch / broadcast decks `zh-CN-YunyangNeural`; English consultant decks `en-US-GuyNeural` or `en-US-JennyNeural`; Japanese / Korean from `ja-JP-*` / `ko-KR-*` with gender + tone noted. Describe each candidate in one line in the user's chat language (gender · tone · best-fit scenario), with the exact name/ID to pass to `--voice-id` for cloud providers.---@@ -88,6 +88,7 @@ python3 skills/ppt-master/scripts/svg_to_pptx.py <project_path> --recorded-narra# 2C. Only when page-local SRT existspython3 skills/ppt-master/scripts/narration_sync.py subtitles <project_path> --pptx <final_narrated_pptx> --force+# <final_narrated_pptx>: absolute, or an existing path as given, else relative to <project_path># 2D. Optional native video through installed Windows PowerPointpython3 skills/ppt-master/scripts/powerpoint_video.py <final_narrated_pptx> -o <raw_powerpoint_video.mp4>