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: native fallback stamping reports a malformed page without skipping the valid ones
hugohe37acddfb97df3
diff --git a/skills/ppt-master/scripts/stamp_native_fallbacks.py b/skills/ppt-master/scripts/stamp_native_fallbacks.pyindex 39249a7f..0b6e3815 100644--- a/skills/ppt-master/scripts/stamp_native_fallbacks.py+++ b/skills/ppt-master/scripts/stamp_native_fallbacks.py@@ -303,10 +303,19 @@ def main(argv: Optional[list[str]] = None) -> int:args = build_parser().parse_args(argv)try:files = _svg_files(args.input.resolve())- prepared = [- (path, *_prepare_file(path))- for path in files- ]+ except (NativeFallbackStampError, OSError) as exc:+ print(f"Error: {exc}", file=sys.stderr)+ return 1+ # Pages stamp independently: one malformed page is reported without+ # leaving every valid page unstamped.+ prepared = []+ errors: list[str] = []+ for path in files:+ try:+ prepared.append((path, *_prepare_file(path)))+ except (NativeFallbackStampError, OSError) as exc:+ errors.append(str(exc))+ try:if args.write:for path, payload, _svg_first, _json_first, changed in prepared:if changed:@@ -339,7 +348,9 @@ def main(argv: Optional[list[str]] = None) -> int:)if changed_files and not args.write:print("Re-run with --write to apply these validated baseline updates.")- return 0+ for error in errors:+ print(f"Error: {error}", file=sys.stderr)+ return 1 if errors else 0if __name__ == "__main__":diff --git a/skills/ppt-master/scripts/tests/test_dogfood_leaves_fixes.py b/skills/ppt-master/scripts/tests/test_dogfood_leaves_fixes.pyindex 41f16891..5b6561b6 100644--- a/skills/ppt-master/scripts/tests/test_dogfood_leaves_fixes.py+++ b/skills/ppt-master/scripts/tests/test_dogfood_leaves_fixes.py@@ -444,6 +444,26 @@ class KoreanIntakeTests(unittest.TestCase):self.assertIn("| | 2025 | 2024 |\n| 계 | 7,482 | 7,561 |", markdown)+class StampIndependenceTests(unittest.TestCase):+ def test_bad_page_does_not_block_valid_pages(self) -> None:+ import contextlib+ import io+ import stamp_native_fallbacks++ with tempfile.TemporaryDirectory() as tmp:+ root = Path(tmp)+ (root / "01_ok.svg").write_text(+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"/>', encoding="utf-8")+ (root / "02_bad.svg").write_text(+ '<svg xmlns="http://www.w3.org/2000/svg"><text>R&D</text></svg>', encoding="utf-8")+ out, err = io.StringIO(), io.StringIO()+ with contextlib.redirect_stdout(out), contextlib.redirect_stderr(err):+ code = stamp_native_fallbacks.main([str(root)])+ self.assertEqual(code, 1)+ self.assertIn("01_ok.svg: unchanged", out.getvalue())+ self.assertIn("02_bad.svg: invalid SVG XML", err.getvalue())++class SlideSizeTypeTests(unittest.TestCase):def test_standard_ratios_keep_their_token(self) -> None:self.assertEqual(_slide_size_type(12192000, 6858000), "screen16x9")