返回 ppt-master
__init__.py
1 """svg_to_pptx — SVG to PPTX conversion package.
2
3 Public API:
4 - main(): CLI entry point
5 - convert_svg_to_slide_shapes(): SVG -> DrawingML slide XML
6 - create_pptx_with_native_svg(): Build PPTX from SVG files
7 """
8
9 from __future__ import annotations
10
11 from typing import Any
12
13 __all__ = [
14 'main',
15 'convert_svg_to_slide_shapes',
16 'create_pptx_with_native_svg',
17 ]
18
19
20 def __getattr__(name: str) -> Any:
21 """Load public entry points lazily to keep low-level imports acyclic."""
22 if name == 'main':
23 from .pptx_package.cli import main
24
25 value = main
26 elif name == 'convert_svg_to_slide_shapes':
27 from .drawingml.converter import convert_svg_to_slide_shapes
28
29 value = convert_svg_to_slide_shapes
30 elif name == 'create_pptx_with_native_svg':
31 from .pptx_package.builder import create_pptx_with_native_svg
32
33 value = create_pptx_with_native_svg
34 else:
35 raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
36 globals()[name] = value
37 return value
38
38 lines PYTHON