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
优化SVG图片嵌入工具并补充 PyMuPDF 依赖
hugohe3fd230af0dfe1
diff --git a/requirements.txt b/requirements.txtindex c3306532..0288e328 100644--- a/requirements.txt+++ b/requirements.txt@@ -24,6 +24,12 @@ python-pptx>=0.6.21svglib>=1.5.0reportlab>=4.0.0+# ─────────────────────────────────────────────────────────────+# PDF 转 Markdown 工具 (tools/pdf_to_md.py)+# ─────────────────────────────────────────────────────────────+# 用于将 PDF 文件转换为 Markdown 格式,支持文本、图片、表格提取+PyMuPDF>=1.23.0+# ─────────────────────────────────────────────────────────────# 图片处理工具# ─────────────────────────────────────────────────────────────diff --git a/tools/embed_images.py b/tools/embed_images.pyindex 586fd7cf..18579fca 100644--- a/tools/embed_images.py+++ b/tools/embed_images.py@@ -68,11 +68,15 @@ def embed_images_in_svg(svg_path, dry_run=False):nonlocal images_embeddedimg_path = match.group(1)+ # 解码 XML/HTML 实体(如 & -> &)+ import html+ img_path_decoded = html.unescape(img_path)+# 处理相对路径- if not os.path.isabs(img_path):- full_path = os.path.join(svg_dir, img_path)+ if not os.path.isabs(img_path_decoded):+ full_path = os.path.join(svg_dir, img_path_decoded)else:- full_path = img_path+ full_path = img_path_decodedif not os.path.exists(full_path):print(f" [WARN] Image not found: {img_path}")