zcbot/skills/ppt/scripts/svg_to_pptx.py

26 lines
944 B
Python

#!/usr/bin/env python3
"""PPT Master - SVG to PPTX Tool (thin wrapper).
Delegates to the svg_to_pptx package. Kept for CLI backward compatibility:
python3 scripts/svg_to_pptx.py <project_path> -s final
"""
import sys
try: # zcbot: Windows GBK 控制台兼容,避免 emoji/© 等触发 UnicodeEncodeError
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
sys.stderr.reconfigure(encoding="utf-8", errors="replace")
except Exception:
pass
from pathlib import Path
# Ensure the scripts directory is on sys.path so the package can be found
sys.path.insert(0, str(Path(__file__).resolve().parent))
from svg_to_pptx import main
if __name__ == '__main__':
# Propagate main()'s return code as the process exit code — otherwise every
# `return 1` guard in main() (icon gate / no-SVG / bad path) silently exits 0
# and callers (and `&&` chains) can't tell success from a refused export.
sys.exit(main())