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
docs: convert layout documentation to English and add Chinese README
hugohe37fadf8d399df
diff --git a/AGENTS.md b/AGENTS.mdindex e9ca7f61..752fa7f5 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -1,84 +1,84 @@# AGENTS.md-本文件为通用 AI 代理提供项目入口。执行 PPT 生成任务前,**必须先阅读 `skills/ppt-master/SKILL.md`** 获取完整工作流与规则。+This file serves as the project entry point for general AI agents. Before executing PPT generation tasks, **you MUST first read `skills/ppt-master/SKILL.md`** for the complete workflow and rules.-## 项目概述+## Project Overview-PPT Master 是一个 AI 驱动的多格式 SVG 内容生成系统。通过多角色协作(Strategist → Image_Generator → Executor → Optimizer),将源文档(PDF/URL/Markdown)转化为高质量 SVG 页面,并导出为 PPTX。+PPT Master is an AI-driven multi-format SVG content generation system. Through multi-role collaboration (Strategist → Image_Generator → Executor → Optimizer), it converts source documents (PDF/URL/Markdown) into high-quality SVG pages and exports them as PPTX.-**核心流程**:`源文档 → 创建项目 → 模板选项 → Strategist 八项确认 → [Image_Generator] → Executor → 后处理 → 导出 PPTX`+**Core Pipeline**: `Source Document → Create Project → Template Option → Strategist Eight Confirmations → [Image_Generator] → Executor → Post-processing → Export PPTX`-**执行要求**:+**Execution Requirements**:-- 开始 PPT 任务前,优先阅读 `skills/ppt-master/SKILL.md`-- 如需独立创建模板,阅读 `skills/ppt-master/workflows/create-template.md`-- 具体角色规则与技术约束都在 `skills/ppt-master/references/`-- ⚠️ **严格串行执行**:流程中的每个 Step 必须逐步执行,禁止合并、打包、并行执行多个 Step+- Before starting a PPT task, read `skills/ppt-master/SKILL.md` first+- To create a template independently, read `skills/ppt-master/workflows/create-template.md`+- Role-specific rules and technical constraints are in `skills/ppt-master/references/`+- ⚠️ **Strict serial execution**: Every Step in the pipeline MUST be executed sequentially — bundling, batching, or parallelizing Steps is FORBIDDEN-## 常用命令+## Common Commands```bash-# 源内容转换-python3 skills/ppt-master/scripts/pdf_to_md.py <PDF文件>+# Source content conversion+python3 skills/ppt-master/scripts/pdf_to_md.py <PDF_file>python3 skills/ppt-master/scripts/web_to_md.py <URL>node skills/ppt-master/scripts/web_to_md.cjs <URL>-# 项目管理-python3 skills/ppt-master/scripts/project_manager.py init <项目名> --format ppt169-python3 skills/ppt-master/scripts/project_manager.py import-sources <项目路径> <源文件或URL...> --move-python3 skills/ppt-master/scripts/project_manager.py validate <项目路径>+# Project management+python3 skills/ppt-master/scripts/project_manager.py init <project_name> --format ppt169+python3 skills/ppt-master/scripts/project_manager.py import-sources <project_path> <source_files_or_URLs...> --move+python3 skills/ppt-master/scripts/project_manager.py validate <project_path>-# 图片工具-python3 skills/ppt-master/scripts/analyze_images.py <项目路径>/images-python3 skills/ppt-master/scripts/nano_banana_gen.py "提示词" --aspect_ratio 16:9 --image_size 1K -o <项目路径>/images+# Image tools+python3 skills/ppt-master/scripts/analyze_images.py <project_path>/images+python3 skills/ppt-master/scripts/nano_banana_gen.py "prompt" --aspect_ratio 16:9 --image_size 1K -o <project_path>/images-# SVG 质量检查-python3 skills/ppt-master/scripts/svg_quality_checker.py <项目路径>+# SVG quality check+python3 skills/ppt-master/scripts/svg_quality_checker.py <project_path>-# 后处理三步(必须按顺序逐条执行,禁止一次性执行)-python3 skills/ppt-master/scripts/total_md_split.py <项目路径>-# ✅ 确认无报错后执行下一条-python3 skills/ppt-master/scripts/finalize_svg.py <项目路径>-# ✅ 确认无报错后执行下一条-python3 skills/ppt-master/scripts/svg_to_pptx.py <项目路径> -s final+# Post-processing pipeline (MUST run sequentially, one at a time — NEVER batch)+python3 skills/ppt-master/scripts/total_md_split.py <project_path>+# ✅ Confirm no errors before running the next command+python3 skills/ppt-master/scripts/finalize_svg.py <project_path>+# ✅ Confirm no errors before running the next command+python3 skills/ppt-master/scripts/svg_to_pptx.py <project_path> -s final```-## 核心目录+## Core Directories-- `skills/ppt-master/SKILL.md` — 主入口与完整流程-- `skills/ppt-master/workflows/create-template.md` — 独立模板工作流-- `skills/ppt-master/references/` — 角色定义与技术规范-- `skills/ppt-master/scripts/` — 工具脚本-- `skills/ppt-master/templates/` — 布局模板、图表模板、图标库-- `examples/` — 示例项目-- `projects/` — 用户项目工作区+- `skills/ppt-master/SKILL.md` — Main entry point and complete workflow+- `skills/ppt-master/workflows/create-template.md` — Standalone template workflow+- `skills/ppt-master/references/` — Role definitions and technical specifications+- `skills/ppt-master/scripts/` — Tool scripts+- `skills/ppt-master/templates/` — Layout templates, chart templates, icon library+- `examples/` — Example projects+- `projects/` — User project workspace-## SVG 技术约束+## SVG Technical Constraints-**禁用功能**:`clipPath` | `mask` | `<style>` | `class` | 外部 CSS | `<foreignObject>` | `textPath` | `@font-face` | `<animate*>` | `<script>` | `marker-end` | `<iframe>` | `<symbol>+<use>`(`<defs>` 内 `id` 为合法引用,不在此列)+**Banned features**: `clipPath` | `mask` | `<style>` | `class` | external CSS | `<foreignObject>` | `textPath` | `@font-face` | `<animate*>` | `<script>` | `marker-end` | `<iframe>` | `<symbol>+<use>` (`id` inside `<defs>` is a legitimate reference and is NOT banned)-**PPT 兼容性替代**:+**PPT compatibility alternatives**:-| 禁止 | 替代 |-|------|------|+| Banned | Alternative |+|--------|-------------|| `rgba()` | `fill-opacity` / `stroke-opacity` |-| `<g opacity>` | 每个子元素单独设置 opacity |-| `<image opacity>` | 遮罩层叠加 |-| `marker-end` 箭头 | `<polygon>` 三角形 |+| `<g opacity>` | Set opacity on each child element individually |+| `<image opacity>` | Overlay with a mask layer |+| `marker-end` arrows | `<polygon>` triangles |-## 画布格式速查+## Canvas Format Quick Reference-| 格式 | viewBox |-|------|---------|+| Format | viewBox |+|--------|---------|| PPT 16:9 | `0 0 1280 720` || PPT 4:3 | `0 0 1024 768` |-| 小红书 | `0 0 1242 1660` |-| 朋友圈 | `0 0 1080 1080` |+| Xiaohongshu (RED) | `0 0 1242 1660` |+| WeChat Moments | `0 0 1080 1080` || Story | `0 0 1080 1920` |-## 后处理注意事项+## Post-processing Notes-- **禁止**用 `cp` 命令替代 `finalize_svg.py`-- **禁止**从 `svg_output/` 直接导出,必须从 `svg_final/`(`-s final`)导出-- 后处理三步命令不要添加 `--only` 等额外参数-- **禁止**将后处理三步写在同一个代码块或同一次 shell 调用中执行+- **NEVER** use `cp` as a substitute for `finalize_svg.py`+- **NEVER** export directly from `svg_output/` — MUST export from `svg_final/` (use `-s final`)+- Do NOT add extra flags like `--only` to the post-processing commands+- **NEVER** run the three post-processing steps in a single code block or single shell invocationdiff --git a/CLAUDE.md b/CLAUDE.mdindex b559bdcf..516b349d 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -1,75 +1,75 @@# CLAUDE.md-本文件为 Claude Code 提供项目概览。执行 PPT 生成任务前,**必须先阅读 [AGENTS.md](./AGENTS.md) 与 `skills/ppt-master/SKILL.md`** 获取完整工作流与规则。+This file provides a project overview for Claude Code. Before executing PPT generation tasks, **you MUST first read [AGENTS.md](./AGENTS.md) and `skills/ppt-master/SKILL.md`** for the complete workflow and rules.-## 项目概述+## Project Overview-PPT Master 是一个 AI 驱动的多格式 SVG 内容生成系统。通过多角色协作(Strategist → Image_Generator → Executor → Optimizer),将源文档(PDF/URL/Markdown)转化为高质量 SVG 页面,并导出为 PPTX。+PPT Master is an AI-driven multi-format SVG content generation system. Through multi-role collaboration (Strategist → Image_Generator → Executor → Optimizer), it converts source documents (PDF/URL/Markdown) into high-quality SVG pages and exports them as PPTX.-**核心流程**:`源文档 → 创建项目 → 模板选项 → Strategist八项确认 → [Image_Generator] → Executor → 后处理 → 导出PPTX`+**Core Pipeline**: `Source Document → Create Project → Template Option → Strategist Eight Confirmations → [Image_Generator] → Executor → Post-processing → Export PPTX`-## 常用命令+## Common Commands```bash-# 源内容转换-python3 skills/ppt-master/scripts/pdf_to_md.py <PDF文件>+# Source content conversion+python3 skills/ppt-master/scripts/pdf_to_md.py <PDF_file>python3 skills/ppt-master/scripts/web_to_md.py <URL>node skills/ppt-master/scripts/web_to_md.cjs <URL>-# 项目管理-python3 skills/ppt-master/scripts/project_manager.py init <项目名> --format ppt169-python3 skills/ppt-master/scripts/project_manager.py import-sources <项目路径> <源文件或URL...> --move-python3 skills/ppt-master/scripts/project_manager.py validate <项目路径>+# Project management+python3 skills/ppt-master/scripts/project_manager.py init <project_name> --format ppt169+python3 skills/ppt-master/scripts/project_manager.py import-sources <project_path> <source_files_or_URLs...> --move+python3 skills/ppt-master/scripts/project_manager.py validate <project_path>-# 图片工具-python3 skills/ppt-master/scripts/analyze_images.py <项目路径>/images-python3 skills/ppt-master/scripts/nano_banana_gen.py "提示词" --aspect_ratio 16:9 --image_size 1K -o <项目路径>/images+# Image tools+python3 skills/ppt-master/scripts/analyze_images.py <project_path>/images+python3 skills/ppt-master/scripts/nano_banana_gen.py "prompt" --aspect_ratio 16:9 --image_size 1K -o <project_path>/images-# SVG 质量检查-python3 skills/ppt-master/scripts/svg_quality_checker.py <项目路径>+# SVG quality check+python3 skills/ppt-master/scripts/svg_quality_checker.py <project_path>-# 后处理三步(必须按顺序逐条执行,禁止一次性执行)-python3 skills/ppt-master/scripts/total_md_split.py <项目路径>-# ✅ 确认无报错后执行下一条-python3 skills/ppt-master/scripts/finalize_svg.py <项目路径>-# ✅ 确认无报错后执行下一条-python3 skills/ppt-master/scripts/svg_to_pptx.py <项目路径> -s final+# Post-processing pipeline (MUST run sequentially, one at a time — NEVER batch)+python3 skills/ppt-master/scripts/total_md_split.py <project_path>+# ✅ Confirm no errors before running the next command+python3 skills/ppt-master/scripts/finalize_svg.py <project_path>+# ✅ Confirm no errors before running the next command+python3 skills/ppt-master/scripts/svg_to_pptx.py <project_path> -s final```-## 架构+## Architecture-- `skills/ppt-master/references/` — AI 角色定义和技术规范-- `skills/ppt-master/scripts/` — 28个工具脚本-- `skills/ppt-master/templates/` — 布局模板、图表模板、640+ 矢量图标-- `examples/` — 示例项目-- `projects/` — 用户项目工作区+- `skills/ppt-master/references/` — AI role definitions and technical specifications+- `skills/ppt-master/scripts/` — 28 tool scripts+- `skills/ppt-master/templates/` — Layout templates, chart templates, 640+ vector icons+- `examples/` — Example projects+- `projects/` — User project workspace-## SVG 技术约束(不可协商)+## SVG Technical Constraints (Non-negotiable)-**禁用功能**:`clipPath` | `mask` | `<style>` | `class` | 外部 CSS | `<foreignObject>` | `textPath` | `@font-face` | `<animate*>` | `<script>` | `marker-end` | `<iframe>` | `<symbol>+<use>`(`<defs>` 内 `id` 为合法引用,不在此列)+**Banned features**: `clipPath` | `mask` | `<style>` | `class` | external CSS | `<foreignObject>` | `textPath` | `@font-face` | `<animate*>` | `<script>` | `marker-end` | `<iframe>` | `<symbol>+<use>` (`id` inside `<defs>` is a legitimate reference and is NOT banned)-**PPT 兼容性替代**:+**PPT compatibility alternatives**:-| 禁止 | 替代 |-|------|------|+| Banned | Alternative |+|--------|-------------|| `rgba()` | `fill-opacity` / `stroke-opacity` |-| `<g opacity>` | 每个子元素单独设置 opacity |-| `<image opacity>` | 遮罩层叠加 |-| `marker-end` 箭头 | `<polygon>` 三角形 |+| `<g opacity>` | Set opacity on each child element individually |+| `<image opacity>` | Overlay with a mask layer |+| `marker-end` arrows | `<polygon>` triangles |-## 画布格式速查+## Canvas Format Quick Reference-| 格式 | viewBox |-|------|---------|+| Format | viewBox |+|--------|---------|| PPT 16:9 | `0 0 1280 720` || PPT 4:3 | `0 0 1024 768` |-| 小红书 | `0 0 1242 1660` |-| 朋友圈 | `0 0 1080 1080` |+| Xiaohongshu (RED) | `0 0 1242 1660` |+| WeChat Moments | `0 0 1080 1080` || Story | `0 0 1080 1920` |-## 后处理注意事项+## Post-processing Notes-- **禁止**用 `cp` 命令替代 `finalize_svg.py`-- **禁止**从 `svg_output/` 直接导出,必须从 `svg_final/`(`-s final`)导出-- 后处理三步命令不要添加 `--only` 等额外参数-- **禁止**将后处理三步写在同一个代码块或同一次 shell 调用中执行+- **NEVER** use `cp` as a substitute for `finalize_svg.py`+- **NEVER** export directly from `svg_output/` — MUST export from `svg_final/` (use `-s final`)+- Do NOT add extra flags like `--only` to the post-processing commands+- **NEVER** run the three post-processing steps in a single code block or single shell invocationdiff --git a/README.md b/README.mdindex 612c907f..b41ca1f4 100644--- a/README.md+++ b/README.md@@ -1,73 +1,73 @@-# PPT Master — AI 生成可编辑的精美演示文稿,支持任意文档输入+# PPT Master — AI generates editable, beautifully designed presentations from any document[](https://github.com/hugohe3/ppt-master/releases)[](https://opensource.org/licenses/MIT)[](https://github.com/hugohe3/ppt-master/stargazers)-[English](./README_EN.md) | 中文+English | [中文](./README_CN.md)-丢进一份 PDF、网址或 Markdown,AI 自动生成**可在 PowerPoint 中直接编辑**的精美演示文稿。支持 PPT 16:9、小红书、朋友圈等 10+ 种格式。+Drop in a PDF, URL, or Markdown file — AI generates **beautifully designed presentations that you can edit directly in PowerPoint**. Supports PPT 16:9, social media cards, marketing posters, and 10+ other formats.-> 💡 **架构大更新**:目前项目架构已进行重大升级(Skill-based architecture):-> 1. **大幅减少 Token 消耗与模型依赖**:现在即使不使用 Opus 模型,其他模型也能生成质量尚可的结果。-> 2. **更强的系统扩展性**:整个 `skills` 文件夹按 Agent Skills 标准组织,每个子目录都是一个完全自包含的 Skill。您可以将其直接放入支持该标准的 AI 客户端的 skills 目录中作为本地技能原生调用(例如:Claude Code 的 `.claude/skills/` 或 `~/.claude/skills/`;Antigravity 置于全局 skills 目录后经由 `.agent/workflows/` 引用;GitHub Copilot 的 `.github/skills/` 或 `~/.copilot/skills/`)。-> 3. **稳定版降级选择**:旧版多平台适配架构虽然 Token 消耗较多,但经受了更长时间的检验。如果您在使用当前新版本时遇到不稳定情况,可以随时尝试退回至老架构的最终版本:[v1.3.0](https://github.com/hugohe3/ppt-master/tree/v1.3.0)。+> 💡 **Major Update**: The project architecture has undergone a massive upgrade (Skill-based architecture):+> 1. **Lower Token Consumption & Model Dependency**: Significantly reduced token consumption. Now, even non-Opus models can generate decent results.+> 2. **High Extensibility**: The `skills` folder is organized according to the Agent Skills standard, with each subdirectory being a fully self-contained Skill. It can be natively invoked by dropping it into the skills directory of compatible AI clients (e.g., `.claude/skills/` or `~/.claude/skills/` for Claude Code; global skills directory referenced via `.agent/workflows/` for Antigravity; `.github/skills/` or `~/.copilot/skills/` for GitHub Copilot).+> 3. **Stable Fallback**:Although the previous multi-platform architecture consumes more tokens, it has been more extensively tested. If you experience instability with the current version, you can always fall back to the last release of the old architecture: [v1.3.0](https://github.com/hugohe3/ppt-master/tree/v1.3.0).-> **在线示例**:[GitHub Pages 在线预览](https://hugohe3.github.io/ppt-master/) — 查看实际生成效果+> **Online Examples**: [GitHub Pages Preview](https://hugohe3.github.io/ppt-master/) — See actual generated results-> **视频演示**:[YouTube](https://www.youtube.com/watch?v=jM2fHmvMwx0) | [Bilibili](https://www.bilibili.com/video/BV1ZZAFzWEPJ/)+> **Video Demo**: [YouTube](https://www.youtube.com/watch?v=jM2fHmvMwx0) | [Bilibili](https://www.bilibili.com/video/BV1ZZAFzWEPJ/)----## 🎴 精选示例+## 🎴 Featured Examples-> **示例库**: [`examples/`](./examples/) · **15 个项目** · **229 页**+> **Example Library**: [`examples/`](./examples/) · **15 projects** · **229 pages**-| 类别 | 项目 | 页数 | 特色 |-| --------------- | ---- | :--: | ---- |-| 🏢 **咨询风格** | [心理治疗中的依恋](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E5%BF%83%E7%90%86%E6%B2%BB%E7%96%97%E4%B8%AD%E7%9A%84%E4%BE%9D%E6%81%8B) | 32 | 顶级咨询风格,最大规模示例 |-| | [构建有效AI代理](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E6%9E%84%E5%BB%BA%E6%9C%89%E6%95%88AI%E4%BB%A3%E7%90%86_Anthropic) | 15 | Anthropic 工程博客,AI Agent 架构 |-| | [重庆市区域报告](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E9%87%8D%E5%BA%86%E5%B8%82%E5%8C%BA%E5%9F%9F%E6%8A%A5%E5%91%8A_ppt169_20251213) | 20 | 区域财政分析,企业预警通数据 |-| | [甘孜州经济财政分析](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E7%94%98%E5%AD%9C%E5%B7%9E%E7%BB%8F%E6%B5%8E%E8%B4%A2%E6%94%BF%E5%88%86%E6%9E%90) | 17 | 政务财政分析,藏区文化元素 |-| 🎨 **通用灵活** | [Debug 六步法](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%80%9A%E7%94%A8%E7%81%B5%E6%B4%BB%2B%E4%BB%A3%E7%A0%81_debug%E5%85%AD%E6%AD%A5%E6%B3%95) | 10 | 深色科技风格 |-| | [重庆大学论文格式](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%80%9A%E7%94%A8%E7%81%B5%E6%B4%BB%2B%E5%AD%A6%E6%9C%AF_%E9%87%8D%E5%BA%86%E5%A4%A7%E5%AD%A6%E8%AE%BA%E6%96%87%E6%A0%BC%E5%BC%8F%E6%A0%87%E5%87%86) | 11 | 学术规范指南 |-| ✨ **创意风格** | [地山谦卦深度研究](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E6%98%93%E7%90%86%E9%A3%8E_%E5%9C%B0%E5%B1%B1%E8%B0%A6%E5%8D%A6%E6%B7%B1%E5%BA%A6%E7%A0%94%E7%A9%B6) | 20 | 易经本体美学,阴阳爻变设计 |-| | [金刚经第一品研究](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E7%A6%85%E6%84%8F%E9%A3%8E_%E9%87%91%E5%88%9A%E7%BB%8F%E7%AC%AC%E4%B8%80%E5%93%81%E7%A0%94%E7%A9%B6) | 15 | 禅意学术,水墨留白 |-| | [Git 入门指南](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E5%83%8F%E7%B4%A0%E9%A3%8E_git_introduction) | 10 | 像素复古游戏风 |+| Category | Project | Pages | Features |+| -------- | ------- | :---: | -------- |+| 🏢 **Consulting Style** | [Attachment in Psychotherapy](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E5%BF%83%E7%90%86%E6%B2%BB%E7%96%97%E4%B8%AD%E7%9A%84%E4%BE%9D%E6%81%8B) | 32 | Top consulting style, largest scale example |+| | [Building Effective AI Agents](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E6%9E%84%E5%BB%BA%E6%9C%89%E6%95%88AI%E4%BB%A3%E7%90%86_Anthropic) | 15 | Anthropic engineering blog, AI Agent architecture |+| | [Chongqing Regional Report](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E9%87%8D%E5%BA%86%E5%B8%82%E5%8C%BA%E5%9F%9F%E6%8A%A5%E5%91%8A_ppt169_20251213) | 20 | Regional fiscal analysis |+| | [Ganzi Prefecture Economic Analysis](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E7%94%98%E5%AD%9C%E5%B7%9E%E7%BB%8F%E6%B5%8E%E8%B4%A2%E6%94%BF%E5%88%86%E6%9E%90) | 17 | Government fiscal analysis, Tibetan cultural elements |+| 🎨 **General Flexible** | [Debug Six-Step Method](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%80%9A%E7%94%A8%E7%81%B5%E6%B4%BB%2B%E4%BB%A3%E7%A0%81_debug%E5%85%AD%E6%AD%A5%E6%B3%95) | 10 | Dark tech style |+| | [Chongqing University Thesis Format](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%80%9A%E7%94%A8%E7%81%B5%E6%B4%BB%2B%E5%AD%A6%E6%9C%AF_%E9%87%8D%E5%BA%86%E5%A4%A7%E5%AD%A6%E8%AE%BA%E6%96%87%E6%A0%BC%E5%BC%8F%E6%A0%87%E5%87%86) | 11 | Academic standards guide |+| ✨ **Creative Style** | [I Ching Qian Hexagram Study](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E6%98%93%E7%90%86%E9%A3%8E_%E5%9C%B0%E5%B1%B1%E8%B0%A6%E5%8D%A6%E6%B7%B1%E5%BA%A6%E7%A0%94%E7%A9%B6) | 20 | I Ching aesthetics, Yin-Yang design |+| | [Diamond Sutra Chapter 1 Study](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E7%A6%85%E6%84%8F%E9%A3%8E_%E9%87%91%E5%88%9A%E7%BB%8F%E7%AC%AC%E4%B8%80%E5%93%81%E7%A0%94%E7%A9%B6) | 15 | Zen academic, ink wash whitespace |+| | [Git Introduction Guide](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E5%83%8F%E7%B4%A0%E9%A3%8E_git_introduction) | 10 | Pixel retro game style |-📖 [查看完整示例文档](./examples/README.md)+📖 [View Complete Examples Documentation](./examples/README.md)----## 🚀 快速开始+## 🚀 Quick Start-### 1. 配置环境+### 1. Configure Environment-#### Python 环境(必需)+#### Python Environment (Required)-本项目需要 **Python 3.8+**,用于运行 PDF 转换、SVG 后处理、PPTX 导出等工具。+This project requires **Python 3.8+** for running PDF conversion, SVG post-processing, PPTX export, and other tools.-| 平台 | 推荐安装方式 |-|------|------------|-| **macOS** | 使用 [Homebrew](https://brew.sh/):`brew install python` |-| **Windows** | 从 [Python 官网](https://www.python.org/downloads/) 下载安装包 |-| **Linux** | 使用系统包管理器:`sudo apt install python3 python3-pip`(Ubuntu/Debian) |+| Platform | Recommended Installation |+|----------|-------------------------|+| **macOS** | Use [Homebrew](https://brew.sh/): `brew install python` |+| **Windows** | Download installer from [Python Official Website](https://www.python.org/downloads/) |+| **Linux** | Use package manager: `sudo apt install python3 python3-pip` (Ubuntu/Debian) |-> 💡 **验证安装**:运行 `python3 --version` 确认版本 ≥ 3.8+> 💡 **Verify Installation**: Run `python3 --version` to confirm version ≥ 3.8-#### Node.js 环境(可选)+#### Node.js Environment (Optional)-如需使用 `web_to_md.cjs` 工具(用于微信公众号等高防站点的网页转换),需安装 Node.js。+If you need to use the `web_to_md.cjs` tool (for converting web pages from WeChat and other high-security sites), install Node.js.-| 平台 | 推荐安装方式 |-|------|------------|-| **macOS** | 使用 [Homebrew](https://brew.sh/):`brew install node` |-| **Windows** | 从 [Node.js 官网](https://nodejs.org/) 下载 LTS 版本安装包 |-| **Linux** | 使用 [NodeSource](https://github.com/nodesource/distributions):`curl -fsSL https://deb.nodesource.com/setup_lts.x \| sudo -E bash - && sudo apt-get install -y nodejs` |+| Platform | Recommended Installation |+|----------|-------------------------|+| **macOS** | Use [Homebrew](https://brew.sh/): `brew install node` |+| **Windows** | Download LTS version from [Node.js Official Website](https://nodejs.org/) |+| **Linux** | Use [NodeSource](https://github.com/nodesource/distributions): `curl -fsSL https://deb.nodesource.com/setup_lts.x \| sudo -E bash - && sudo apt-get install -y nodejs` |-> 💡 **验证安装**:运行 `node --version` 确认版本 ≥ 18+> 💡 **Verify Installation**: Run `node --version` to confirm version ≥ 18-### 2. 克隆仓库并安装依赖+### 2. Clone Repository and Install Dependencies```bashgit clone https://github.com/hugohe3/ppt-master.git@@ -75,205 +75,208 @@ cd ppt-masterpip install -r requirements.txt```-> 如遇权限问题,可使用 `pip install --user -r requirements.txt` 或在虚拟环境中安装。+> If you encounter permission issues, use `pip install --user -r requirements.txt` or install in a virtual environment.-### 3. 打开 AI 编辑器+### 3. Open AI Editor-推荐使用以下 AI 编辑器:+Recommended AI editors:-| 工具 | 推荐度 | 说明 |+| Tool | Rating | Description || --------------------------------------------------- | :----: | ----------------------------------------------------------------------------- |-| **[Claude Code](https://claude.ai/)** | ⭐⭐⭐ | **强烈推荐**!Anthropic 官方 CLI,原生 Opus 支持,上下文最充裕 |-| Codebuddy IDE | ⭐⭐ | 优秀的国产 AI IDE,对 Kimi 2.5、MiniMax 2.7 等国产大模型有较好支持 |-| [Cursor](https://cursor.sh/) | ⭐⭐ | 主流 AI 编辑器,体验好但价格较高 |-| [VS Code + Copilot](https://code.visualstudio.com/) | ⭐⭐ | 微软官方方案,性价比高,但上下文窗口受限(200k,预留 35% 给输出) |-| [Antigravity](https://antigravity.dev/) | ⭐ | 免费但额度极少且不稳定,仅作备选 |+| **[Claude Code](https://claude.ai/)** | ⭐⭐⭐ | **Highly Recommended**! Anthropic official CLI, native Opus support, largest context window |+| Codebuddy IDE | ⭐⭐ | Great Chinese AI IDE, good support for local models like Kimi 2.5 and MiniMax 2.7 |+| [Cursor](https://cursor.sh/) | ⭐⭐ | Mainstream AI editor, great experience but relatively expensive |+| [VS Code + Copilot](https://code.visualstudio.com/) | ⭐⭐ | Microsoft official solution, cost-effective, but limited context window (200k, 35% reserved for output) |+| [Antigravity](https://antigravity.dev/) | ⭐ | Free but very limited quota and unstable. Alternative only. |-### 4. 开始创作+### 4. Start Creating-在 AI 编辑器中打开聊天面板,直接描述你想创作的内容:+Open the AI chat panel in your editor and describe what content you want to create:```-用户:我有一份关于 Q3 季度业绩的报告,需要制作成 PPT+User: I have a Q3 quarterly report that needs to be made into a PPT-AI:好的,先确认是否使用模板;确认后我会继续八项确认并生成设计规范。- [模板选项] [建议] B) 不使用模板;如需使用模板,我会先参考 templates/layouts/layouts_index.json 给出推荐- [Strategist] 1. 画布格式:[建议] PPT 16:9- [Strategist] 2. 页数范围:[建议] 8-10 页+AI: Sure. First we'll confirm whether to use a template; after that Strategist will+ continue with the eight confirmations and generate the design spec.+ [Template Option] [Recommended] B) No template+ [Strategist] 1. Canvas format: [Recommended] PPT 16:9+ [Strategist] 2. Page count: [Recommended] 8-10 pages...```-> 💡 **模型推荐**:Claude Opus 效果最佳,但大部分主流模型(如 Kimi 2.5、MiniMax 2.7 等,可通过 Codebuddy IDE 使用)目前均能生成不错的内容,仅在细节排版效果上可能存在差距。因目前某些 IDE (如 Antigravity) 的 Opus 极不稳定,请优先使用其他稳定的 AI 客户端进行创作。+> 💡 **Model Recommendation**: Claude Opus works best, but most mainstream models today (like Kimi 2.5 and MiniMax 2.7, tested via Codebuddy IDE) can also generate decent results with only minor gaps in layout details. Due to the instability of Opus on some IDEs (like Antigravity), trying other stable AI clients is recommended.-#### Gemini 生图 API(可选)+#### Gemini Image Generation API (Optional)-本项目的 `nano_banana_gen.py` 可通过 Gemini API 在 AI 客户端中直接生成高质量配图。使用前需配置环境变量:+The `nano_banana_gen.py` tool can generate high-quality images via the Gemini API directly within AI clients. Configure the following environment variables before use:```bash-# 必需:Gemini API Key(从 https://aistudio.google.com/apikey 获取)+# Required: Gemini API Key (obtain from https://aistudio.google.com/apikey)export GEMINI_API_KEY="your-api-key"-# 可选:自定义 API 端点(用于代理服务)+# Optional: Custom API endpoint (for proxy services)export GEMINI_BASE_URL="https://your-proxy-url.com/v1beta"```-> 💡 **持久化**:将上述 `export` 命令添加到 `~/.zshrc`(macOS/Linux zsh)或 `~/.bashrc`(Linux bash)中,重启终端即可永久生效。+> 💡 **Persist settings**: Add the `export` commands above to `~/.zshrc` (macOS/Linux zsh) or `~/.bashrc` (Linux bash), then restart your terminal.-> 💡 若使用 Antigravity 代理,调用时需传入模型参数(`-m gemini-3.1-flash-image`)。+> 💡 If using the Antigravity proxy, pass the model parameter (`-m gemini-3.1-flash-image`).-> 💡 **AI 迷失上下文?** 可提示 AI 优先阅读 `skills/ppt-master/SKILL.md`;如需一个仓库级入口概览,再参考 `AGENTS.md`+> 💡 **AI Lost Context?** Ask the AI to read `skills/ppt-master/SKILL.md` first; use `AGENTS.md` as the repository-level entry overview.-> 💡 **AI 生成图片建议**:如需 AI 生成配图,建议在 [Gemini](https://gemini.google.com/) 中生成后选择 **Download full size** 下载,分辨率比 Antigravity 直接生成的更高。Gemini 生成的图片右下角会有星星水印,可使用 [gemini-watermark-remover](https://github.com/journey-ad/gemini-watermark-remover) 或本项目的 `skills/ppt-master/scripts/gemini_watermark_remover.py` 去除。+> 💡 **AI Image Generation Tip**: For AI-generated images, we recommend generating them in [Gemini](https://gemini.google.com/) and selecting **Download full size** for higher resolution. Gemini images have a star watermark in the bottom right corner, which can be removed using [gemini-watermark-remover](https://github.com/journey-ad/gemini-watermark-remover) or this project's `skills/ppt-master/scripts/gemini_watermark_remover.py`.----## 🏗️ 系统架构+## 🏗️ System Architecture```-用户输入 (PDF/URL/Markdown)+User Input (PDF/URL/Markdown)↓-[源内容转换] → pdf_to_md.py / web_to_md.py+[Source Content Conversion] → pdf_to_md.py / web_to_md.py↓-[创建项目] → project_manager.py init <项目名> --format <格式>+[Create Project] → project_manager.py init <project_name> --format <format>↓-[模板选项] A) 使用已有模板 B) 不使用模板+[Template Option] A) Use existing template B) No template↓-[需要新模板?] → 使用 /create-template 工作流单独创建+[Need New Template?] → Use /create-template workflow separately↓-[Strategist] 策略师 - 八项确认与设计规范+[Strategist] - Eight Confirmations & Design Specifications↓-[Image_Generator] 图片生成师(当选择 AI 生成时)+[Image_Generator] (When AI generation is selected)↓-[Executor] 执行师 - 分阶段生成- ├── 视觉构建阶段:连续生成所有 SVG 页面 → svg_output/- └── 逻辑构建阶段:生成完整讲稿 → notes/total.md+[Executor] - Two-Phase Generation+ ├── Visual Construction Phase: Generate all SVG pages → svg_output/+ └── Logic Construction Phase: Generate complete speaker notes → notes/total.md↓-[后处理] → total_md_split.py(拆分讲稿)→ finalize_svg.py → svg_to_pptx.py+[Post-processing] → total_md_split.py (split notes) → finalize_svg.py → svg_to_pptx.py↓-输出: 可编辑的 PPTX(自动嵌入讲稿)+Output: Editable PPTX (auto-embeds speaker notes)↓-[Optimizer_CRAP] 优化师(可选,初版后不满意再用)+[Optimizer_CRAP] (Optional, only if the first draft is unsatisfactory)↓-如有优化:重新运行后处理与导出+If optimized: re-run post-processing and export```-> 📖 详细工作流程请优先参阅 [skills/ppt-master/SKILL.md](./skills/ppt-master/SKILL.md),仓库级入口概览见 [AGENTS.md](./AGENTS.md)+> 📖 For the full workflow, start with [SKILL.md](./skills/ppt-master/SKILL.md). For a repository-level overview, see [AGENTS.md](./AGENTS.md).-> 💡 **PPT 编辑提示**:导出的 PPTX 中每页为 SVG 格式。选中页面内容,右键选择 **"转换为形状"** (Convert to Shape) 即可自由编辑所有元素。需要 **Office 2016** 或更高版本。+> 💡 **PPT Editing Tip**: Each page in the exported PPTX is in SVG format. Select the page content in PowerPoint, right-click and choose **"Convert to Shape"** to freely edit all elements. Requires **Office 2016** or later.----## 📚 文档导航+## 📚 Documentation Navigation-| 文档 | 说明 |-|------|------|-| 🧭 [AGENTS.md](./AGENTS.md) | 仓库级入口概览(适用于通用 AI 代理) |-| 📖 [SKILL.md](./skills/ppt-master/SKILL.md) | `ppt-master` 核心流程与规则源 |-| 🎨 [设计指南](./skills/ppt-master/references/design-guidelines.md) | 配色、排版、布局规范详解 |-| 📐 [画布格式](./skills/ppt-master/references/canvas-formats.md) | PPT、小红书、朋友圈等 10+ 种格式 |-| 🖼️ [图片嵌入指南](./skills/ppt-master/references/svg-image-embedding.md) | SVG 图片嵌入最佳实践 |-| 📊 [图表模板库](./skills/ppt-master/templates/charts/) | 13 种标准化图表模板 |-| 🛠️ [工具集](./skills/ppt-master/scripts/README.md) | 所有工具的使用说明 |-| 💼 [示例索引](./examples/README.md) | 15 个项目、229 页 SVG 示例 |+| Document | Description |+|----------|-------------|+| 🧭 [AGENTS.md](./AGENTS.md) | Repository-level entry overview for general AI agents |+| 📖 [SKILL.md](./skills/ppt-master/SKILL.md) | Canonical `ppt-master` workflow and rules |+| 🎨 [Design Guidelines](./skills/ppt-master/references/design-guidelines.md) | Colors, typography, and layout specifications |+| 📐 [Canvas Formats](./skills/ppt-master/references/canvas-formats.md) | PPT, Xiaohongshu (RED), WeChat Moments, and 10+ formats |+| 🖼️ [Image Embedding Guide](./skills/ppt-master/references/svg-image-embedding.md) | SVG image embedding best practices |+| 📊 [Chart Template Library](./skills/ppt-master/templates/charts/) | Standardized chart templates |+| 🔧 [Role Definitions](./skills/ppt-master/references/) | Role definitions and technical references |+| 🛠️ [Toolset](./skills/ppt-master/scripts/README.md) | Usage instructions for all tools |+| 💼 [Examples Index](./examples/README.md) | 15 projects, 229 SVG pages of examples |----## 🛠️ 常用命令+## 🛠️ Common Commands```bash-# 初始化项目-python3 skills/ppt-master/scripts/project_manager.py init <项目名> --format ppt169+# Initialize project+python3 skills/ppt-master/scripts/project_manager.py init <project_name> --format ppt169-# 将源材料归档到项目目录-python3 skills/ppt-master/scripts/project_manager.py import-sources <项目路径> <源文件或URL...>+# Archive source materials into the project folder+python3 skills/ppt-master/scripts/project_manager.py import-sources <project_path> <source_file_or_url...>-# PDF 转 Markdown-python3 skills/ppt-master/scripts/pdf_to_md.py <PDF文件>+# Note: files outside the workspace are copied by default; files already in the workspace are moved into sources/-# 后处理三步(必须按顺序执行)-python3 skills/ppt-master/scripts/total_md_split.py <项目路径>-python3 skills/ppt-master/scripts/finalize_svg.py <项目路径>-python3 skills/ppt-master/scripts/svg_to_pptx.py <项目路径> -s final+# PDF to Markdown+python3 skills/ppt-master/scripts/pdf_to_md.py <PDF_file>+# Post-processing (run in order)+python3 skills/ppt-master/scripts/total_md_split.py <project_path>+python3 skills/ppt-master/scripts/finalize_svg.py <project_path>+python3 skills/ppt-master/scripts/svg_to_pptx.py <project_path> -s final```-> 📖 完整工具说明请参阅 [脚本使用指南](./skills/ppt-master/scripts/README.md)+> 📖 For complete tool documentation, see [Tools Usage Guide](./skills/ppt-master/scripts/README.md)----## 📁 项目结构+## 📁 Project Structure```textppt-master/├── skills/-│ └── ppt-master/ # 规范源(完全自包含的单一 Skill 源)-│ ├── SKILL.md # 主入口:工作流定义与执行边界-│ ├── workflows/ # 工作流引擎脚本与独立任务-│ ├── references/ # AI 角色定义 + 技术文档规范-│ ├── scripts/ # 工具脚本集成-│ └── templates/ # 模板库(布局 + 图表 + 图标)-├── examples/ # 示例项目(包含多种生成案例)-├── projects/ # 用户项目默认工作区-├── AGENTS.md # 通用 AI 代理入口概览-└── CLAUDE.md # Claude Code CLI 专属入口概览+│ └── ppt-master/ # Main skill source+│ ├── SKILL.md # Main entry: workflow definition+│ ├── workflows/ # Workflow entry files+│ ├── references/ # Role definitions and specs+│ ├── scripts/ # Tool scripts+│ └── templates/ # Layouts, charts, icons+├── examples/ # Example projects+├── projects/ # User project workspace+├── AGENTS.md # General AI agent entry+└── CLAUDE.md # Dedicated Claude Code CLI entry```----## ❓ 常见问题+## ❓ FAQ<details>-<summary><b>Q: 生成的 PPT 可以编辑吗?</b></summary>+<summary><b>Q: Can I edit the generated presentations?</b></summary>-可以。导出的 PPTX 中每页为 SVG 格式,在 PowerPoint 中选中内容,右键选择 **"转换为形状"** (Convert to Shape) 后,所有文字、图形、颜色都可以自由编辑。需要 **Office 2016** 或更高版本。+Yes! Each page in the exported PPTX is in SVG format. In PowerPoint, select the content, right-click and choose **"Convert to Shape"** — then all text, shapes, and colors become fully editable. Requires **Office 2016** or later.</details><details>-<summary><b>Q: 三种执行师有什么区别?</b></summary>+<summary><b>Q: What's the difference between the three Executors?</b></summary>-- **Executor_General**: 通用场景,灵活布局-- **Executor_Consultant**: 一般咨询,数据可视化-- **Executor_Consultant_Top**: 顶级咨询(MBB 级),5 大核心技巧+- **Executor_General**: General scenarios, flexible layout+- **Executor_Consultant**: General consulting, data visualization+- **Executor_Consultant_Top**: Top consulting (MBB level), 5 core techniques</details><details>-<summary><b>Q: 必须使用 Optimizer_CRAP 吗?</b></summary>+<summary><b>Q: Is Optimizer_CRAP required?</b></summary>-不是必须的。仅在需要优化关键页面视觉效果时使用。+No. Only use it when you need to optimize the visual effects of key pages.</details>-> 📖 更多问题可先查看 [skills/ppt-master/SKILL.md](./skills/ppt-master/SKILL.md) 与 [AGENTS.md](./AGENTS.md)+> 📖 For more questions, see [SKILL.md](./skills/ppt-master/SKILL.md) and [AGENTS.md](./AGENTS.md)----## 🤝 贡献指南+## 🤝 Contributing-欢迎贡献!+Contributions are welcome!-1. Fork 本仓库-2. 创建分支 (`git checkout -b feature/AmazingFeature`)-3. 提交更改 (`git commit -m 'Add AmazingFeature'`)-4. 推送分支 (`git push origin feature/AmazingFeature`)-5. 开启 Pull Request+1. Fork this repository+2. Create your branch (`git checkout -b feature/AmazingFeature`)+3. Commit your changes (`git commit -m 'Add AmazingFeature'`)+4. Push to the branch (`git push origin feature/AmazingFeature`)+5. Open a Pull Request-**贡献方向**:🎨 设计模板 · 📊 图表组件 · 📝 文档完善 · 🐛 Bug 报告 · 💡 功能建议+**Contribution Areas**: 🎨 Design templates · 📊 Chart components · 📝 Documentation · 🐛 Bug reports · 💡 Feature suggestions----## 📄 开源协议+## 📄 License-本项目采用 [MIT License](LICENSE) 开源协议。+This project is licensed under the [MIT License](LICENSE).-## 🙏 致谢+## 🙏 Acknowledgments-- [SVG Repo](https://www.svgrepo.com/) - 开源图标库-- [Robin Williams](https://en.wikipedia.org/wiki/Robin_Williams_(author)) - CRAP 设计原则-- 麦肯锡、波士顿咨询、贝恩 - 设计灵感来源+- [SVG Repo](https://www.svgrepo.com/) - Open source icon library+- [Robin Williams](https://en.wikipedia.org/wiki/Robin_Williams_(author)) - CRAP design principles+- McKinsey, Boston Consulting, Bain - Design inspiration-## 📮 联系方式+## 📮 Contact- **Issue**: [GitHub Issues](https://github.com/hugohe3/ppt-master/issues)- **GitHub**: [@hugohe3](https://github.com/hugohe3)@@ -282,7 +285,7 @@ ppt-master/## 🌟 Star History-如果这个项目对你有帮助,请给一个 ⭐ Star 支持一下!+If this project helps you, please give it a ⭐ Star!<a href="https://star-history.com/#hugohe3/ppt-master&Date"><picture>@@ -296,4 +299,4 @@ ppt-master/Made with ❤️ by Hugo He-[⬆ 回到顶部](#ppt-master--ai-生成可编辑的精美演示文稿支持任意文档输入)+[⬆ Back to Top](#ppt-master--ai-generates-editable-beautifully-designed-presentations-from-any-document)diff --git a/README_CN.md b/README_CN.mdnew file mode 100644index 00000000..3b91569c--- /dev/null+++ b/README_CN.md@@ -0,0 +1,299 @@+# PPT Master — AI 生成可编辑的精美演示文稿,支持任意文档输入++[](https://github.com/hugohe3/ppt-master/releases)+[](https://opensource.org/licenses/MIT)+[](https://github.com/hugohe3/ppt-master/stargazers)++[English](./README.md) | 中文++丢进一份 PDF、网址或 Markdown,AI 自动生成**可在 PowerPoint 中直接编辑**的精美演示文稿。支持 PPT 16:9、小红书、朋友圈等 10+ 种格式。++> 💡 **架构大更新**:目前项目架构已进行重大升级(Skill-based architecture):+> 1. **大幅减少 Token 消耗与模型依赖**:现在即使不使用 Opus 模型,其他模型也能生成质量尚可的结果。+> 2. **更强的系统扩展性**:整个 `skills` 文件夹按 Agent Skills 标准组织,每个子目录都是一个完全自包含的 Skill。您可以将其直接放入支持该标准的 AI 客户端的 skills 目录中作为本地技能原生调用(例如:Claude Code 的 `.claude/skills/` 或 `~/.claude/skills/`;Antigravity 置于全局 skills 目录后经由 `.agent/workflows/` 引用;GitHub Copilot 的 `.github/skills/` 或 `~/.copilot/skills/`)。+> 3. **稳定版降级选择**:旧版多平台适配架构虽然 Token 消耗较多,但经受了更长时间的检验。如果您在使用当前新版本时遇到不稳定情况,可以随时尝试退回至老架构的最终版本:[v1.3.0](https://github.com/hugohe3/ppt-master/tree/v1.3.0)。++> **在线示例**:[GitHub Pages 在线预览](https://hugohe3.github.io/ppt-master/) — 查看实际生成效果++> **视频演示**:[YouTube](https://www.youtube.com/watch?v=jM2fHmvMwx0) | [Bilibili](https://www.bilibili.com/video/BV1ZZAFzWEPJ/)++---++## 🎴 精选示例++> **示例库**: [`examples/`](./examples/) · **15 个项目** · **229 页**++| 类别 | 项目 | 页数 | 特色 |+| --------------- | ---- | :--: | ---- |+| 🏢 **咨询风格** | [心理治疗中的依恋](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E5%BF%83%E7%90%86%E6%B2%BB%E7%96%97%E4%B8%AD%E7%9A%84%E4%BE%9D%E6%81%8B) | 32 | 顶级咨询风格,最大规模示例 |+| | [构建有效AI代理](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E6%9E%84%E5%BB%BA%E6%9C%89%E6%95%88AI%E4%BB%A3%E7%90%86_Anthropic) | 15 | Anthropic 工程博客,AI Agent 架构 |+| | [重庆市区域报告](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E9%87%8D%E5%BA%86%E5%B8%82%E5%8C%BA%E5%9F%9F%E6%8A%A5%E5%91%8A_ppt169_20251213) | 20 | 区域财政分析,企业预警通数据 |+| | [甘孜州经济财政分析](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E7%94%98%E5%AD%9C%E5%B7%9E%E7%BB%8F%E6%B5%8E%E8%B4%A2%E6%94%BF%E5%88%86%E6%9E%90) | 17 | 政务财政分析,藏区文化元素 |+| 🎨 **通用灵活** | [Debug 六步法](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%80%9A%E7%94%A8%E7%81%B5%E6%B4%BB%2B%E4%BB%A3%E7%A0%81_debug%E5%85%AD%E6%AD%A5%E6%B3%95) | 10 | 深色科技风格 |+| | [重庆大学论文格式](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%80%9A%E7%94%A8%E7%81%B5%E6%B4%BB%2B%E5%AD%A6%E6%9C%AF_%E9%87%8D%E5%BA%86%E5%A4%A7%E5%AD%A6%E8%AE%BA%E6%96%87%E6%A0%BC%E5%BC%8F%E6%A0%87%E5%87%86) | 11 | 学术规范指南 |+| ✨ **创意风格** | [地山谦卦深度研究](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E6%98%93%E7%90%86%E9%A3%8E_%E5%9C%B0%E5%B1%B1%E8%B0%A6%E5%8D%A6%E6%B7%B1%E5%BA%A6%E7%A0%94%E7%A9%B6) | 20 | 易经本体美学,阴阳爻变设计 |+| | [金刚经第一品研究](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E7%A6%85%E6%84%8F%E9%A3%8E_%E9%87%91%E5%88%9A%E7%BB%8F%E7%AC%AC%E4%B8%80%E5%93%81%E7%A0%94%E7%A9%B6) | 15 | 禅意学术,水墨留白 |+| | [Git 入门指南](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E5%83%8F%E7%B4%A0%E9%A3%8E_git_introduction) | 10 | 像素复古游戏风 |++📖 [查看完整示例文档](./examples/README.md)++---++## 🚀 快速开始++### 1. 配置环境++#### Python 环境(必需)++本项目需要 **Python 3.8+**,用于运行 PDF 转换、SVG 后处理、PPTX 导出等工具。++| 平台 | 推荐安装方式 |+|------|------------|+| **macOS** | 使用 [Homebrew](https://brew.sh/):`brew install python` |+| **Windows** | 从 [Python 官网](https://www.python.org/downloads/) 下载安装包 |+| **Linux** | 使用系统包管理器:`sudo apt install python3 python3-pip`(Ubuntu/Debian) |++> 💡 **验证安装**:运行 `python3 --version` 确认版本 ≥ 3.8++#### Node.js 环境(可选)++如需使用 `web_to_md.cjs` 工具(用于微信公众号等高防站点的网页转换),需安装 Node.js。++| 平台 | 推荐安装方式 |+|------|------------|+| **macOS** | 使用 [Homebrew](https://brew.sh/):`brew install node` |+| **Windows** | 从 [Node.js 官网](https://nodejs.org/) 下载 LTS 版本安装包 |+| **Linux** | 使用 [NodeSource](https://github.com/nodesource/distributions):`curl -fsSL https://deb.nodesource.com/setup_lts.x \| sudo -E bash - && sudo apt-get install -y nodejs` |++> 💡 **验证安装**:运行 `node --version` 确认版本 ≥ 18++### 2. 克隆仓库并安装依赖++```bash+git clone https://github.com/hugohe3/ppt-master.git+cd ppt-master+pip install -r requirements.txt+```++> 如遇权限问题,可使用 `pip install --user -r requirements.txt` 或在虚拟环境中安装。++### 3. 打开 AI 编辑器++推荐使用以下 AI 编辑器:++| 工具 | 推荐度 | 说明 |+| --------------------------------------------------- | :----: | ----------------------------------------------------------------------------- |+| **[Claude Code](https://claude.ai/)** | ⭐⭐⭐ | **强烈推荐**!Anthropic 官方 CLI,原生 Opus 支持,上下文最充裕 |+| Codebuddy IDE | ⭐⭐ | 优秀的国产 AI IDE,对 Kimi 2.5、MiniMax 2.7 等国产大模型有较好支持 |+| [Cursor](https://cursor.sh/) | ⭐⭐ | 主流 AI 编辑器,体验好但价格较高 |+| [VS Code + Copilot](https://code.visualstudio.com/) | ⭐⭐ | 微软官方方案,性价比高,但上下文窗口受限(200k,预留 35% 给输出) |+| [Antigravity](https://antigravity.dev/) | ⭐ | 免费但额度极少且不稳定,仅作备选 |++### 4. 开始创作++在 AI 编辑器中打开聊天面板,直接描述你想创作的内容:++```+用户:我有一份关于 Q3 季度业绩的报告,需要制作成 PPT++AI:好的,先确认是否使用模板;确认后我会继续八项确认并生成设计规范。+ [模板选项] [建议] B) 不使用模板;如需使用模板,我会先参考 templates/layouts/layouts_index.json 给出推荐+ [Strategist] 1. 画布格式:[建议] PPT 16:9+ [Strategist] 2. 页数范围:[建议] 8-10 页+ ...+```++> 💡 **模型推荐**:Claude Opus 效果最佳,但大部分主流模型(如 Kimi 2.5、MiniMax 2.7 等,可通过 Codebuddy IDE 使用)目前均能生成不错的内容,仅在细节排版效果上可能存在差距。因目前某些 IDE (如 Antigravity) 的 Opus 极不稳定,请优先使用其他稳定的 AI 客户端进行创作。++#### Gemini 生图 API(可选)++本项目的 `nano_banana_gen.py` 可通过 Gemini API 在 AI 客户端中直接生成高质量配图。使用前需配置环境变量:++```bash+# 必需:Gemini API Key(从 https://aistudio.google.com/apikey 获取)+export GEMINI_API_KEY="your-api-key"++# 可选:自定义 API 端点(用于代理服务)+export GEMINI_BASE_URL="https://your-proxy-url.com/v1beta"+```++> 💡 **持久化**:将上述 `export` 命令添加到 `~/.zshrc`(macOS/Linux zsh)或 `~/.bashrc`(Linux bash)中,重启终端即可永久生效。++> 💡 若使用 Antigravity 代理,调用时需传入模型参数(`-m gemini-3.1-flash-image`)。++> 💡 **AI 迷失上下文?** 可提示 AI 优先阅读 `skills/ppt-master/SKILL.md`;如需一个仓库级入口概览,再参考 `AGENTS.md`++> 💡 **AI 生成图片建议**:如需 AI 生成配图,建议在 [Gemini](https://gemini.google.com/) 中生成后选择 **Download full size** 下载,分辨率比 Antigravity 直接生成的更高。Gemini 生成的图片右下角会有星星水印,可使用 [gemini-watermark-remover](https://github.com/journey-ad/gemini-watermark-remover) 或本项目的 `skills/ppt-master/scripts/gemini_watermark_remover.py` 去除。++---++## 🏗️ 系统架构++```+用户输入 (PDF/URL/Markdown)+ ↓+[源内容转换] → pdf_to_md.py / web_to_md.py+ ↓+[创建项目] → project_manager.py init <项目名> --format <格式>+ ↓+[模板选项] A) 使用已有模板 B) 不使用模板+ ↓+[需要新模板?] → 使用 /create-template 工作流单独创建+ ↓+[Strategist] 策略师 - 八项确认与设计规范+ ↓+[Image_Generator] 图片生成师(当选择 AI 生成时)+ ↓+[Executor] 执行师 - 分阶段生成+ ├── 视觉构建阶段:连续生成所有 SVG 页面 → svg_output/+ └── 逻辑构建阶段:生成完整讲稿 → notes/total.md+ ↓+[后处理] → total_md_split.py(拆分讲稿)→ finalize_svg.py → svg_to_pptx.py+ ↓+输出: 可编辑的 PPTX(自动嵌入讲稿)+ ↓+[Optimizer_CRAP] 优化师(可选,初版后不满意再用)+ ↓+如有优化:重新运行后处理与导出+```++> 📖 详细工作流程请优先参阅 [skills/ppt-master/SKILL.md](./skills/ppt-master/SKILL.md),仓库级入口概览见 [AGENTS.md](./AGENTS.md)++> 💡 **PPT 编辑提示**:导出的 PPTX 中每页为 SVG 格式。选中页面内容,右键选择 **"转换为形状"** (Convert to Shape) 即可自由编辑所有元素。需要 **Office 2016** 或更高版本。++---++## 📚 文档导航++| 文档 | 说明 |+|------|------|+| 🧭 [AGENTS.md](./AGENTS.md) | 仓库级入口概览(适用于通用 AI 代理) |+| 📖 [SKILL.md](./skills/ppt-master/SKILL.md) | `ppt-master` 核心流程与规则源 |+| 🎨 [设计指南](./skills/ppt-master/references/design-guidelines.md) | 配色、排版、布局规范详解 |+| 📐 [画布格式](./skills/ppt-master/references/canvas-formats.md) | PPT、小红书、朋友圈等 10+ 种格式 |+| 🖼️ [图片嵌入指南](./skills/ppt-master/references/svg-image-embedding.md) | SVG 图片嵌入最佳实践 |+| 📊 [图表模板库](./skills/ppt-master/templates/charts/) | 13 种标准化图表模板 |+| 🛠️ [工具集](./skills/ppt-master/scripts/README.md) | 所有工具的使用说明 |+| 💼 [示例索引](./examples/README.md) | 15 个项目、229 页 SVG 示例 |++---++## 🛠️ 常用命令++```bash+# 初始化项目+python3 skills/ppt-master/scripts/project_manager.py init <项目名> --format ppt169++# 将源材料归档到项目目录+python3 skills/ppt-master/scripts/project_manager.py import-sources <项目路径> <源文件或URL...>++# PDF 转 Markdown+python3 skills/ppt-master/scripts/pdf_to_md.py <PDF文件>++# 后处理三步(必须按顺序执行)+python3 skills/ppt-master/scripts/total_md_split.py <项目路径>+python3 skills/ppt-master/scripts/finalize_svg.py <项目路径>+python3 skills/ppt-master/scripts/svg_to_pptx.py <项目路径> -s final++```++> 📖 完整工具说明请参阅 [脚本使用指南](./skills/ppt-master/scripts/README.md)++---++## 📁 项目结构++```text+ppt-master/+├── skills/+│ └── ppt-master/ # 规范源(完全自包含的单一 Skill 源)+│ ├── SKILL.md # 主入口:工作流定义与执行边界+│ ├── workflows/ # 工作流引擎脚本与独立任务+│ ├── references/ # AI 角色定义 + 技术文档规范+│ ├── scripts/ # 工具脚本集成+│ └── templates/ # 模板库(布局 + 图表 + 图标)+├── examples/ # 示例项目(包含多种生成案例)+├── projects/ # 用户项目默认工作区+├── AGENTS.md # 通用 AI 代理入口概览+└── CLAUDE.md # Claude Code CLI 专属入口概览+```++---++## ❓ 常见问题++<details>+<summary><b>Q: 生成的 PPT 可以编辑吗?</b></summary>++可以。导出的 PPTX 中每页为 SVG 格式,在 PowerPoint 中选中内容,右键选择 **"转换为形状"** (Convert to Shape) 后,所有文字、图形、颜色都可以自由编辑。需要 **Office 2016** 或更高版本。++</details>++<details>+<summary><b>Q: 三种执行师有什么区别?</b></summary>++- **Executor_General**: 通用场景,灵活布局+- **Executor_Consultant**: 一般咨询,数据可视化+- **Executor_Consultant_Top**: 顶级咨询(MBB 级),5 大核心技巧++</details>++<details>+<summary><b>Q: 必须使用 Optimizer_CRAP 吗?</b></summary>++不是必须的。仅在需要优化关键页面视觉效果时使用。++</details>++> 📖 更多问题可先查看 [skills/ppt-master/SKILL.md](./skills/ppt-master/SKILL.md) 与 [AGENTS.md](./AGENTS.md)++---++## 🤝 贡献指南++欢迎贡献!++1. Fork 本仓库+2. 创建分支 (`git checkout -b feature/AmazingFeature`)+3. 提交更改 (`git commit -m 'Add AmazingFeature'`)+4. 推送分支 (`git push origin feature/AmazingFeature`)+5. 开启 Pull Request++**贡献方向**:🎨 设计模板 · 📊 图表组件 · 📝 文档完善 · 🐛 Bug 报告 · 💡 功能建议++---++## 📄 开源协议++本项目采用 [MIT License](LICENSE) 开源协议。++## 🙏 致谢++- [SVG Repo](https://www.svgrepo.com/) - 开源图标库+- [Robin Williams](https://en.wikipedia.org/wiki/Robin_Williams_(author)) - CRAP 设计原则+- 麦肯锡、波士顿咨询、贝恩 - 设计灵感来源++## 📮 联系方式++- **Issue**: [GitHub Issues](https://github.com/hugohe3/ppt-master/issues)+- **GitHub**: [@hugohe3](https://github.com/hugohe3)++---++## 🌟 Star History++如果这个项目对你有帮助,请给一个 ⭐ Star 支持一下!++<a href="https://star-history.com/#hugohe3/ppt-master&Date">+ <picture>+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=hugohe3/ppt-master&type=Date&theme=dark" />+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=hugohe3/ppt-master&type=Date" />+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=hugohe3/ppt-master&type=Date" />+ </picture>+</a>++---++Made with ❤️ by Hugo He++[⬆ 回到顶部](#ppt-master--ai-生成可编辑的精美演示文稿支持任意文档输入)diff --git a/README_EN.md b/README_EN.mddeleted file mode 100644index 72b32952..00000000--- a/README_EN.md+++ /dev/null@@ -1,302 +0,0 @@-# PPT Master — AI generates editable, beautifully designed presentations from any document--[](https://github.com/hugohe3/ppt-master/releases)-[](https://opensource.org/licenses/MIT)-[](https://github.com/hugohe3/ppt-master/stargazers)--English | [中文](./README.md)--Drop in a PDF, URL, or Markdown file — AI generates **beautifully designed presentations that you can edit directly in PowerPoint**. Supports PPT 16:9, social media cards, marketing posters, and 10+ other formats.--> 💡 **Major Update**: The project architecture has undergone a massive upgrade (Skill-based architecture):-> 1. **Lower Token Consumption & Model Dependency**: Significantly reduced token consumption. Now, even non-Opus models can generate decent results.-> 2. **High Extensibility**: The `skills` folder is organized according to the Agent Skills standard, with each subdirectory being a fully self-contained Skill. It can be natively invoked by dropping it into the skills directory of compatible AI clients (e.g., `.claude/skills/` or `~/.claude/skills/` for Claude Code; global skills directory referenced via `.agent/workflows/` for Antigravity; `.github/skills/` or `~/.copilot/skills/` for GitHub Copilot).-> 3. **Stable Fallback**:Although the previous multi-platform architecture consumes more tokens, it has been more extensively tested. If you experience instability with the current version, you can always fall back to the last release of the old architecture: [v1.3.0](https://github.com/hugohe3/ppt-master/tree/v1.3.0).--> **Online Examples**: [GitHub Pages Preview](https://hugohe3.github.io/ppt-master/) — See actual generated results--> **Video Demo**: [YouTube](https://www.youtube.com/watch?v=jM2fHmvMwx0) | [Bilibili](https://www.bilibili.com/video/BV1ZZAFzWEPJ/)-------## 🎴 Featured Examples--> **Example Library**: [`examples/`](./examples/) · **15 projects** · **229 pages**--| Category | Project | Pages | Features |-| -------- | ------- | :---: | -------- |-| 🏢 **Consulting Style** | [Attachment in Psychotherapy](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E5%BF%83%E7%90%86%E6%B2%BB%E7%96%97%E4%B8%AD%E7%9A%84%E4%BE%9D%E6%81%8B) | 32 | Top consulting style, largest scale example |-| | [Building Effective AI Agents](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E6%9E%84%E5%BB%BA%E6%9C%89%E6%95%88AI%E4%BB%A3%E7%90%86_Anthropic) | 15 | Anthropic engineering blog, AI Agent architecture |-| | [Chongqing Regional Report](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E9%87%8D%E5%BA%86%E5%B8%82%E5%8C%BA%E5%9F%9F%E6%8A%A5%E5%91%8A_ppt169_20251213) | 20 | Regional fiscal analysis |-| | [Ganzi Prefecture Economic Analysis](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%A1%B6%E7%BA%A7%E5%92%A8%E8%AF%A2%E9%A3%8E_%E7%94%98%E5%AD%9C%E5%B7%9E%E7%BB%8F%E6%B5%8E%E8%B4%A2%E6%94%BF%E5%88%86%E6%9E%90) | 17 | Government fiscal analysis, Tibetan cultural elements |-| 🎨 **General Flexible** | [Debug Six-Step Method](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%80%9A%E7%94%A8%E7%81%B5%E6%B4%BB%2B%E4%BB%A3%E7%A0%81_debug%E5%85%AD%E6%AD%A5%E6%B3%95) | 10 | Dark tech style |-| | [Chongqing University Thesis Format](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E9%80%9A%E7%94%A8%E7%81%B5%E6%B4%BB%2B%E5%AD%A6%E6%9C%AF_%E9%87%8D%E5%BA%86%E5%A4%A7%E5%AD%A6%E8%AE%BA%E6%96%87%E6%A0%BC%E5%BC%8F%E6%A0%87%E5%87%86) | 11 | Academic standards guide |-| ✨ **Creative Style** | [I Ching Qian Hexagram Study](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E6%98%93%E7%90%86%E9%A3%8E_%E5%9C%B0%E5%B1%B1%E8%B0%A6%E5%8D%A6%E6%B7%B1%E5%BA%A6%E7%A0%94%E7%A9%B6) | 20 | I Ching aesthetics, Yin-Yang design |-| | [Diamond Sutra Chapter 1 Study](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E7%A6%85%E6%84%8F%E9%A3%8E_%E9%87%91%E5%88%9A%E7%BB%8F%E7%AC%AC%E4%B8%80%E5%93%81%E7%A0%94%E7%A9%B6) | 15 | Zen academic, ink wash whitespace |-| | [Git Introduction Guide](https://hugohe3.github.io/ppt-master/viewer.html?project=ppt169_%E5%83%8F%E7%B4%A0%E9%A3%8E_git_introduction) | 10 | Pixel retro game style |--📖 [View Complete Examples Documentation](./examples/README.md)-------## 🚀 Quick Start--### 1. Configure Environment--#### Python Environment (Required)--This project requires **Python 3.8+** for running PDF conversion, SVG post-processing, PPTX export, and other tools.--| Platform | Recommended Installation |-|----------|-------------------------|-| **macOS** | Use [Homebrew](https://brew.sh/): `brew install python` |-| **Windows** | Download installer from [Python Official Website](https://www.python.org/downloads/) |-| **Linux** | Use package manager: `sudo apt install python3 python3-pip` (Ubuntu/Debian) |--> 💡 **Verify Installation**: Run `python3 --version` to confirm version ≥ 3.8--#### Node.js Environment (Optional)--If you need to use the `web_to_md.cjs` tool (for converting web pages from WeChat and other high-security sites), install Node.js.--| Platform | Recommended Installation |-|----------|-------------------------|-| **macOS** | Use [Homebrew](https://brew.sh/): `brew install node` |-| **Windows** | Download LTS version from [Node.js Official Website](https://nodejs.org/) |-| **Linux** | Use [NodeSource](https://github.com/nodesource/distributions): `curl -fsSL https://deb.nodesource.com/setup_lts.x \| sudo -E bash - && sudo apt-get install -y nodejs` |--> 💡 **Verify Installation**: Run `node --version` to confirm version ≥ 18--### 2. Clone Repository and Install Dependencies--```bash-git clone https://github.com/hugohe3/ppt-master.git-cd ppt-master-pip install -r requirements.txt-```--> If you encounter permission issues, use `pip install --user -r requirements.txt` or install in a virtual environment.--### 3. Open AI Editor--Recommended AI editors:--| Tool | Rating | Description |-| --------------------------------------------------- | :----: | ----------------------------------------------------------------------------- |-| **[Claude Code](https://claude.ai/)** | ⭐⭐⭐ | **Highly Recommended**! Anthropic official CLI, native Opus support, largest context window |-| Codebuddy IDE | ⭐⭐ | Great Chinese AI IDE, good support for local models like Kimi 2.5 and MiniMax 2.7 |-| [Cursor](https://cursor.sh/) | ⭐⭐ | Mainstream AI editor, great experience but relatively expensive |-| [VS Code + Copilot](https://code.visualstudio.com/) | ⭐⭐ | Microsoft official solution, cost-effective, but limited context window (200k, 35% reserved for output) |-| [Antigravity](https://antigravity.dev/) | ⭐ | Free but very limited quota and unstable. Alternative only. |--### 4. Start Creating--Open the AI chat panel in your editor and describe what content you want to create:--```-User: I have a Q3 quarterly report that needs to be made into a PPT--AI: Sure. First we'll confirm whether to use a template; after that Strategist will- continue with the eight confirmations and generate the design spec.- [Template Option] [Recommended] B) No template- [Strategist] 1. Canvas format: [Recommended] PPT 16:9- [Strategist] 2. Page count: [Recommended] 8-10 pages- ...-```--> 💡 **Model Recommendation**: Claude Opus works best, but most mainstream models today (like Kimi 2.5 and MiniMax 2.7, tested via Codebuddy IDE) can also generate decent results with only minor gaps in layout details. Due to the instability of Opus on some IDEs (like Antigravity), trying other stable AI clients is recommended.--#### Gemini Image Generation API (Optional)--The `nano_banana_gen.py` tool can generate high-quality images via the Gemini API directly within AI clients. Configure the following environment variables before use:--```bash-# Required: Gemini API Key (obtain from https://aistudio.google.com/apikey)-export GEMINI_API_KEY="your-api-key"--# Optional: Custom API endpoint (for proxy services)-export GEMINI_BASE_URL="https://your-proxy-url.com/v1beta"-```--> 💡 **Persist settings**: Add the `export` commands above to `~/.zshrc` (macOS/Linux zsh) or `~/.bashrc` (Linux bash), then restart your terminal.--> 💡 If using the Antigravity proxy, pass the model parameter (`-m gemini-3.1-flash-image`).--> 💡 **AI Lost Context?** Ask the AI to read `skills/ppt-master/SKILL.md` first; use `AGENTS.md` as the repository-level entry overview.--> 💡 **AI Image Generation Tip**: For AI-generated images, we recommend generating them in [Gemini](https://gemini.google.com/) and selecting **Download full size** for higher resolution. Gemini images have a star watermark in the bottom right corner, which can be removed using [gemini-watermark-remover](https://github.com/journey-ad/gemini-watermark-remover) or this project's `skills/ppt-master/scripts/gemini_watermark_remover.py`.-------## 🏗️ System Architecture--```-User Input (PDF/URL/Markdown)- ↓-[Source Content Conversion] → pdf_to_md.py / web_to_md.py- ↓-[Create Project] → project_manager.py init <project_name> --format <format>- ↓-[Template Option] A) Use existing template B) No template- ↓-[Need New Template?] → Use /create-template workflow separately- ↓-[Strategist] - Eight Confirmations & Design Specifications- ↓-[Image_Generator] (When AI generation is selected)- ↓-[Executor] - Two-Phase Generation- ├── Visual Construction Phase: Generate all SVG pages → svg_output/- └── Logic Construction Phase: Generate complete speaker notes → notes/total.md- ↓-[Post-processing] → total_md_split.py (split notes) → finalize_svg.py → svg_to_pptx.py- ↓-Output: Editable PPTX (auto-embeds speaker notes)- ↓-[Optimizer_CRAP] (Optional, only if the first draft is unsatisfactory)- ↓-If optimized: re-run post-processing and export-```--> 📖 For the full workflow, start with [SKILL.md](./skills/ppt-master/SKILL.md). For a repository-level overview, see [AGENTS.md](./AGENTS.md).--> 💡 **PPT Editing Tip**: Each page in the exported PPTX is in SVG format. Select the page content in PowerPoint, right-click and choose **"Convert to Shape"** to freely edit all elements. Requires **Office 2016** or later.-------## 📚 Documentation Navigation--| Document | Description |-|----------|-------------|-| 🧭 [AGENTS.md](./AGENTS.md) | Repository-level entry overview for general AI agents |-| 📖 [SKILL.md](./skills/ppt-master/SKILL.md) | Canonical `ppt-master` workflow and rules |-| 🎨 [Design Guidelines](./skills/ppt-master/references/design-guidelines.md) | Colors, typography, and layout specifications |-| 📐 [Canvas Formats](./skills/ppt-master/references/canvas-formats.md) | PPT, Xiaohongshu (RED), WeChat Moments, and 10+ formats |-| 🖼️ [Image Embedding Guide](./skills/ppt-master/references/svg-image-embedding.md) | SVG image embedding best practices |-| 📊 [Chart Template Library](./skills/ppt-master/templates/charts/) | Standardized chart templates |-| 🔧 [Role Definitions](./skills/ppt-master/references/) | Role definitions and technical references |-| 🛠️ [Toolset](./skills/ppt-master/scripts/README.md) | Usage instructions for all tools |-| 💼 [Examples Index](./examples/README.md) | 15 projects, 229 SVG pages of examples |-------## 🛠️ Common Commands--```bash-# Initialize project-python3 skills/ppt-master/scripts/project_manager.py init <project_name> --format ppt169--# Archive source materials into the project folder-python3 skills/ppt-master/scripts/project_manager.py import-sources <project_path> <source_file_or_url...>--# Note: files outside the workspace are copied by default; files already in the workspace are moved into sources/--# PDF to Markdown-python3 skills/ppt-master/scripts/pdf_to_md.py <PDF_file>--# Post-processing (run in order)-python3 skills/ppt-master/scripts/total_md_split.py <project_path>-python3 skills/ppt-master/scripts/finalize_svg.py <project_path>-python3 skills/ppt-master/scripts/svg_to_pptx.py <project_path> -s final-```--> 📖 For complete tool documentation, see [Tools Usage Guide](./skills/ppt-master/scripts/README.md)-------## 📁 Project Structure--```text-ppt-master/-├── skills/-│ └── ppt-master/ # Main skill source-│ ├── SKILL.md # Main entry: workflow definition-│ ├── workflows/ # Workflow entry files-│ ├── references/ # Role definitions and specs-│ ├── scripts/ # Tool scripts-│ └── templates/ # Layouts, charts, icons-├── examples/ # Example projects-├── projects/ # User project workspace-├── AGENTS.md # General AI agent entry-└── CLAUDE.md # Dedicated Claude Code CLI entry-```-------## ❓ FAQ--<details>-<summary><b>Q: Can I edit the generated presentations?</b></summary>--Yes! Each page in the exported PPTX is in SVG format. In PowerPoint, select the content, right-click and choose **"Convert to Shape"** — then all text, shapes, and colors become fully editable. Requires **Office 2016** or later.--</details>--<details>-<summary><b>Q: What's the difference between the three Executors?</b></summary>--- **Executor_General**: General scenarios, flexible layout-- **Executor_Consultant**: General consulting, data visualization-- **Executor_Consultant_Top**: Top consulting (MBB level), 5 core techniques--</details>--<details>-<summary><b>Q: Is Optimizer_CRAP required?</b></summary>--No. Only use it when you need to optimize the visual effects of key pages.--</details>--> 📖 For more questions, see [SKILL.md](./skills/ppt-master/SKILL.md) and [AGENTS.md](./AGENTS.md)-------## 🤝 Contributing--Contributions are welcome!--1. Fork this repository-2. Create your branch (`git checkout -b feature/AmazingFeature`)-3. Commit your changes (`git commit -m 'Add AmazingFeature'`)-4. Push to the branch (`git push origin feature/AmazingFeature`)-5. Open a Pull Request--**Contribution Areas**: 🎨 Design templates · 📊 Chart components · 📝 Documentation · 🐛 Bug reports · 💡 Feature suggestions-------## 📄 License--This project is licensed under the [MIT License](LICENSE).--## 🙏 Acknowledgments--- [SVG Repo](https://www.svgrepo.com/) - Open source icon library-- [Robin Williams](https://en.wikipedia.org/wiki/Robin_Williams_(author)) - CRAP design principles-- McKinsey, Boston Consulting, Bain - Design inspiration--## 📮 Contact--- **Issue**: [GitHub Issues](https://github.com/hugohe3/ppt-master/issues)-- **GitHub**: [@hugohe3](https://github.com/hugohe3)-------## 🌟 Star History--If this project helps you, please give it a ⭐ Star!--<a href="https://star-history.com/#hugohe3/ppt-master&Date">- <picture>- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=hugohe3/ppt-master&type=Date&theme=dark" />- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=hugohe3/ppt-master&type=Date" />- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=hugohe3/ppt-master&type=Date" />- </picture>-</a>-------Made with ❤️ by Hugo He--[⬆ Back to Top](#ppt-master--ai-generates-editable-beautifully-designed-presentations-from-any-document)diff --git a/projects/README.md b/projects/README.mdindex b01e9d18..7aa2a45b 100644--- a/projects/README.md+++ b/projects/README.md@@ -1,25 +1,25 @@-# 用户项目工作区+# User Project Workspace-此目录用于存放进行中的项目。+This directory is used for storing in-progress projects.-## 创建新项目+## Create a New Project```bashpython3 skills/ppt-master/scripts/project_manager.py init my_project --format ppt169```-## 目录结构+## Directory Structure-一个典型项目通常包含以下内容:+A typical project usually contains the following:```project_name_format_YYYYMMDD/├── README.md-├── 设计规范与内容大纲.md+├── design_spec.md├── sources/-│ ├── 原始文件 / URL 归档 / 转换后的 Markdown-│ └── *_files/ # Markdown 配套资源目录(如图片)-├── images/ # 项目使用的图片资源+│ ├── Raw files / URL archives / Converted Markdown+│ └── *_files/ # Markdown companion resource directory (e.g., images)+├── images/ # Image assets used by the project├── notes/│ ├── 01_xxx.md│ ├── 02_xxx.md@@ -30,19 +30,19 @@ project_name_format_YYYYMMDD/├── svg_final/│ ├── 01_xxx.svg│ └── ...-├── templates/ # 项目级模板(如有)+├── templates/ # Project-level templates (if any)├── *.pptx-└── image_analysis.csv # 可选,图片扫描分析结果+└── image_analysis.csv # Optional, image scan analysis results```-项目可以停留在不同阶段,不一定一次性具备全部产物。例如:+Projects can remain at different stages and do not necessarily have all artifacts at once. For example:-- 仅完成 `sources/` 归档和《设计规范与内容大纲》-- 已生成 `svg_output/`,但尚未执行后处理-- 已完成 `svg_final/`、`notes/` 和 `*.pptx`+- Only `sources/` archiving and the Design Specification & Content Outline (design_spec) are complete+- `svg_output/` has been generated, but post-processing has not yet been executed+- `svg_final/`, `notes/`, and `*.pptx` are all complete-## 注意事项+## Notes-- 此目录下的内容已被 `.gitignore` 排除-- 完成的项目可以移动到 `examples/` 目录分享-- 工作空间外文件默认复制;工作空间内文件会直接移动到项目 `sources/`+- Contents under this directory are excluded by `.gitignore`+- Completed projects can be moved to the `examples/` directory for sharing+- Files outside the workspace are copied by default; files within the workspace are moved directly to the project's `sources/`diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.mdindex 4b9419e3..25f2c914 100644--- a/skills/ppt-master/SKILL.md+++ b/skills/ppt-master/SKILL.md@@ -9,289 +9,289 @@ description: ># PPT Master Skill-> AI 驱动的多格式 SVG 内容生成系统。通过多角色协作将源文档转化为高质量 SVG 页面并导出 PPTX。+> AI-driven multi-format SVG content generation system. Converts source documents into high-quality SVG pages through multi-role collaboration and exports to PPTX.-**核心流程**:`源文档 → 创建项目 → 模板选项 → Strategist → [Image_Generator] → Executor → 后处理 → 导出`+**Core Pipeline**: `Source Document → Create Project → Template Option → Strategist → [Image_Generator] → Executor → Post-processing → Export`> [!CAUTION]-> ## 🚨 全局执行纪律(MANDATORY)+> ## 🚨 Global Execution Discipline (MANDATORY)>-> **本工作流为严格串行流程。以下规则具有最高优先级,违反任何一条即为执行失败:**+> **This workflow is a strict serial pipeline. The following rules have the highest priority — violating any one of them constitutes execution failure:**>-> 1. **SERIAL EXECUTION** — 步骤必须按顺序执行,前一步的产出是后一步的输入。非 BLOCKING 的相邻步骤在前置条件满足时可以连续执行,无需等待用户说"继续"-> 2. **BLOCKING = HARD STOP** — 标记为 ⛔ BLOCKING 的步骤,必须停下来等待用户明确回复后才能继续,AI 不得代替用户做出任何决定-> 3. **NO CROSS-PHASE BUNDLING** — 禁止跨阶段打包执行。(注:但当用户确认八项原则后,可连续自动生成设计规范、生成大纲、生成 SVG、生成备注以及进入后处理流程,只要前置条件就绪即可无缝衔接,无需等待用户确认即可推进)-> 4. **GATE BEFORE ENTRY** — 每个 Step 开头标注了前置条件(🚧 GATE),必须先验证前置条件满足后才能开始该 Step-> 5. **NO SPECULATIVE EXECUTION** — 禁止"预先准备"后续 Step 的内容(如在 Strategist 阶段就开始写 SVG 代码)--## 主流程脚本--| 脚本 | 用途 |-|------|------|-| `${SKILL_DIR}/scripts/pdf_to_md.py` | PDF 转 Markdown |-| `${SKILL_DIR}/scripts/web_to_md.py` | 网页转 Markdown |-| `${SKILL_DIR}/scripts/web_to_md.cjs` | 微信/高防站点转 Markdown |-| `${SKILL_DIR}/scripts/project_manager.py` | 项目初始化/验证/管理 |-| `${SKILL_DIR}/scripts/analyze_images.py` | 图片分析 |-| `${SKILL_DIR}/scripts/nano_banana_gen.py` | AI 图片生成(Gemini API) |-| `${SKILL_DIR}/scripts/svg_quality_checker.py` | SVG 质量检查 |-| `${SKILL_DIR}/scripts/total_md_split.py` | 演讲备注拆分 |-| `${SKILL_DIR}/scripts/finalize_svg.py` | SVG 后处理(统一入口) |-| `${SKILL_DIR}/scripts/svg_to_pptx.py` | 导出 PPTX |--完整工具说明见 `${SKILL_DIR}/scripts/README.md`。--## 模板索引--| 索引 | 路径 | 用途 |-|------|------|------|-| 布局模板索引 | `${SKILL_DIR}/templates/layouts/layouts_index.json` | 查询可用页面布局模板 |-| 图表模板索引 | `${SKILL_DIR}/templates/charts/charts_index.json` | 查询可用图表 SVG 模板 |-| 图标库索引 | `${SKILL_DIR}/templates/icons/icons_index.json` | 查询可用图标名称与分类 |--## 独立工作流--| 工作流 | 路径 | 用途 |-|--------|------|------|-| `create-template` | `workflows/create-template.md` | 独立模板创建流程 |+> 1. **SERIAL EXECUTION** — Steps MUST be executed in order; the output of each step is the input for the next. Non-BLOCKING adjacent steps may proceed continuously once prerequisites are met, without waiting for the user to say "continue"+> 2. **BLOCKING = HARD STOP** — Steps marked ⛔ BLOCKING require a full stop; the AI MUST wait for an explicit user response before proceeding and MUST NOT make any decisions on behalf of the user+> 3. **NO CROSS-PHASE BUNDLING** — Cross-phase bundling is FORBIDDEN. (Note: once the user confirms the Eight Confirmations, the AI may automatically and continuously generate the design spec, outline, SVGs, speaker notes, and proceed into post-processing — as long as prerequisites are met, seamless progression is allowed without waiting for user confirmation)+> 4. **GATE BEFORE ENTRY** — Each Step has prerequisites (🚧 GATE) listed at the top; these MUST be verified before starting that Step+> 5. **NO SPECULATIVE EXECUTION** — "Pre-preparing" content for subsequent Steps is FORBIDDEN (e.g., writing SVG code during the Strategist phase)++## Main Pipeline Scripts++| Script | Purpose |+|--------|---------|+| `${SKILL_DIR}/scripts/pdf_to_md.py` | PDF to Markdown |+| `${SKILL_DIR}/scripts/web_to_md.py` | Web page to Markdown |+| `${SKILL_DIR}/scripts/web_to_md.cjs` | WeChat / high-security sites to Markdown |+| `${SKILL_DIR}/scripts/project_manager.py` | Project init / validate / manage |+| `${SKILL_DIR}/scripts/analyze_images.py` | Image analysis |+| `${SKILL_DIR}/scripts/nano_banana_gen.py` | AI image generation (Gemini API) |+| `${SKILL_DIR}/scripts/svg_quality_checker.py` | SVG quality check |+| `${SKILL_DIR}/scripts/total_md_split.py` | Speaker notes splitting |+| `${SKILL_DIR}/scripts/finalize_svg.py` | SVG post-processing (unified entry) |+| `${SKILL_DIR}/scripts/svg_to_pptx.py` | Export to PPTX |++For complete tool documentation, see `${SKILL_DIR}/scripts/README.md`.++## Template Index++| Index | Path | Purpose |+|-------|------|---------|+| Layout templates | `${SKILL_DIR}/templates/layouts/layouts_index.json` | Query available page layout templates |+| Chart templates | `${SKILL_DIR}/templates/charts/charts_index.json` | Query available chart SVG templates |+| Icon library | `${SKILL_DIR}/templates/icons/icons_index.json` | Query available icon names and categories |++## Standalone Workflows++| Workflow | Path | Purpose |+|----------|------|---------|+| `create-template` | `workflows/create-template.md` | Standalone template creation workflow |----## 工作流+## Workflow-### Step 1: 源内容处理+### Step 1: Source Content Processing-🚧 **GATE**:用户已提供源材料(PDF / URL / Markdown 文件 / 文本描述 / 对话内容等任意形式均可)。+🚧 **GATE**: User has provided source material (PDF / URL / Markdown file / text description / conversation content — any form is acceptable).-当用户提供非 Markdown 内容时,必须立即转换:+When the user provides non-Markdown content, convert immediately:-| 用户提供 | 命令 |-|----------|------|-| PDF 文件 | `python3 ${SKILL_DIR}/scripts/pdf_to_md.py <文件>` |-| 网页链接 | `python3 ${SKILL_DIR}/scripts/web_to_md.py <URL>` |-| 微信/高防站 | `node ${SKILL_DIR}/scripts/web_to_md.cjs <URL>` |-| Markdown | 直接读取 |+| User Provides | Command |+|---------------|---------|+| PDF file | `python3 ${SKILL_DIR}/scripts/pdf_to_md.py <file>` |+| Web link | `python3 ${SKILL_DIR}/scripts/web_to_md.py <URL>` |+| WeChat / high-security site | `node ${SKILL_DIR}/scripts/web_to_md.cjs <URL>` |+| Markdown | Read directly |-**✅ 检查点 — 确认源内容已就绪,继续 Step 2。**+**✅ Checkpoint — Confirm source content is ready, proceed to Step 2.**----### Step 2: 项目初始化+### Step 2: Project Initialization-🚧 **GATE**:Step 1 已完成,源内容已就绪(Markdown 文件、用户提供的文本、或对话中的需求描述均可)。+🚧 **GATE**: Step 1 complete; source content is ready (Markdown file, user-provided text, or requirements described in conversation are all valid).```bash-python3 ${SKILL_DIR}/scripts/project_manager.py init <项目名> --format <格式>+python3 ${SKILL_DIR}/scripts/project_manager.py init <project_name> --format <format>```-格式选项:`ppt169`(默认)、`ppt43`、`xhs`、`story` 等。完整格式列表见 `references/canvas-formats.md`。+Format options: `ppt169` (default), `ppt43`, `xhs`, `story`, etc. For the full format list, see `references/canvas-formats.md`.-导入源内容(根据实际情况选择):+Import source content (choose based on the situation):-| 情况 | 操作 |-|------|------|-| 有源文件(PDF/MD等) | `python3 ${SKILL_DIR}/scripts/project_manager.py import-sources <项目路径> <源文件...> --move` |-| 用户在对话中直接提供文本 | 无需导入,内容已在对话上下文中,后续步骤直接引用即可 |+| Situation | Action |+|-----------|--------|+| Has source files (PDF/MD/etc.) | `python3 ${SKILL_DIR}/scripts/project_manager.py import-sources <project_path> <source_files...> --move` |+| User provided text directly in conversation | No import needed — content is already in conversation context; subsequent steps can reference it directly |-> ⚠️ **必须使用 `--move`**:所有源文件(原始 PDF / MD / 图片等)必须**移动**(而非复制)到 `sources/` 中归档。-> - Step 1 转换生成的 Markdown 文件、原始 PDF、原始 MD,**全部**通过 `import-sources --move` 移入项目-> - 转换中间产物(如 `_files/` 目录)由 `import-sources` 自动处理-> - 执行后,源文件在原始位置不再存在+> ⚠️ **MUST use `--move`**: All source files (original PDF / MD / images) MUST be **moved** (not copied) into `sources/` for archiving.+> - Markdown files generated in Step 1, original PDFs, original MDs — **all** must be moved into the project via `import-sources --move`+> - Intermediate artifacts (e.g., `_files/` directories) are handled automatically by `import-sources`+> - After execution, source files no longer exist at their original location-**✅ 检查点 — 确认项目结构已创建成功、`sources/` 中包含所有源文件、源转换物已就绪,继续 Step 3。**+**✅ Checkpoint — Confirm project structure created successfully, `sources/` contains all source files, converted materials are ready. Proceed to Step 3.**----### Step 3: 模板选择+### Step 3: Template Selection-🚧 **GATE**:Step 2 已完成,项目目录结构已就绪。+🚧 **GATE**: Step 2 complete; project directory structure is ready.-⛔ **BLOCKING**:如果用户尚未明确表达是否使用模板,则必须向用户展示选项并**等待用户明确回复**后才能继续。若用户在此前已经明确表示过“不使用模板”或指定了具体模板,则可跳过此询问直接执行结论。+⛔ **BLOCKING**: If the user has not yet clearly expressed whether to use a template, you MUST present options and **wait for an explicit user response** before proceeding. If the user has previously stated "no template" or specified a particular template, skip this prompt and proceed directly.-查询 `${SKILL_DIR}/templates/layouts/layouts_index.json`,列出可用模板及其风格描述。-**向用户展示选项时,必须结合当前的 PPT 主题和内容,给出你的专业建议(建议使用某个具体模板,或建议不使用模板而是自由设计,并说明原因)**,然后再询问用户:+Query `${SKILL_DIR}/templates/layouts/layouts_index.json` to list available templates and their style descriptions.+**When presenting options, you MUST provide a professional recommendation based on the current PPT topic and content** (recommend a specific template or free design, with reasoning), then ask the user:-> 💡 **AI 建议**:根据您的内容主题(简述),我建议您选择 **[某一具体模板 / 自由设计]**,因为...->-> 请问您希望使用哪种方式?-> **A) 使用已有模板**(请告知模板名称或风格偏好)-> **B) 不使用模板**,自由设计+> 💡 **AI Recommendation**: Based on your content topic (brief summary), I recommend **[specific template / free design]** because...+>+> Which approach would you prefer?+> **A) Use an existing template** (please specify template name or style preference)+> **B) No template** — free design-用户确认选 A 后,复制模板文件到项目目录:+After the user confirms option A, copy template files to the project directory:```bash-cp ${SKILL_DIR}/templates/layouts/<模板名>/*.svg <项目路径>/templates/-cp ${SKILL_DIR}/templates/layouts/<模板名>/design_spec.md <项目路径>/templates/-cp ${SKILL_DIR}/templates/layouts/<模板名>/*.png <项目路径>/images/ 2>/dev/null || true-cp ${SKILL_DIR}/templates/layouts/<模板名>/*.jpg <项目路径>/images/ 2>/dev/null || true+cp ${SKILL_DIR}/templates/layouts/<template_name>/*.svg <project_path>/templates/+cp ${SKILL_DIR}/templates/layouts/<template_name>/design_spec.md <project_path>/templates/+cp ${SKILL_DIR}/templates/layouts/<template_name>/*.png <project_path>/images/ 2>/dev/null || true+cp ${SKILL_DIR}/templates/layouts/<template_name>/*.jpg <project_path>/images/ 2>/dev/null || true```-用户确认选 B 后,直接进入 Step 4。+After the user confirms option B, proceed directly to Step 4.-> 如需创建新模板,Read `references/template-designer.md`+> To create a new template, Read `references/template-designer.md`-**✅ 检查点 — 用户已回复模板选择,模板文件已复制(若选 A),继续 Step 4。**+**✅ Checkpoint — User has responded with template selection, template files copied (if option A). Proceed to Step 4.**----### Step 4: Strategist 阶段(必须,不可跳过)+### Step 4: Strategist Phase (MANDATORY — cannot be skipped)-🚧 **GATE**:Step 3 已完成,用户已确认模板选择。+🚧 **GATE**: Step 3 complete; user has confirmed template selection.-先读取角色定义:+First, read the role definitions:```Read references/strategist.mdRead references/shared-standards.md```-**必须完成八项确认**(参考 `templates/design_spec_reference.md` 模板内容):+**Must complete the Eight Confirmations** (refer to `templates/design_spec_reference.md` for the template structure):-⛔ **BLOCKING**:八项确认必须以**打包问题的方式向用户呈现建议,等待用户回复确认或修改**后,才能输出《设计规范与内容大纲》。这是流程中仅有的两个核心确认点之一(另一个是模板选择)。一旦确认,后续所有脚本执行与幻灯片生成均应全自动连贯执行。+⛔ **BLOCKING**: The Eight Confirmations MUST be presented to the user as a bundled set of recommendations, and you MUST **wait for the user to confirm or modify** before outputting the Design Specification & Content Outline. This is one of only two core confirmation points in the workflow (the other is template selection). Once confirmed, all subsequent script execution and slide generation should proceed fully automatically.-1. 画布格式-2. 页数范围-3. 目标受众-4. 风格目标-5. 配色方案-6. 图标使用方式-7. 图片使用方式-8. 排版方案+1. Canvas format+2. Page count range+3. Target audience+4. Style objective+5. Color scheme+6. Icon usage approach+7. Image usage approach+8. Typography plan-如用户提供了图片:+If the user has provided images:```bash-python3 ${SKILL_DIR}/scripts/analyze_images.py <项目路径>/images+python3 ${SKILL_DIR}/scripts/analyze_images.py <project_path>/images```-**输出**:`<项目路径>/设计规范与内容大纲.md`+**Output**: `<project_path>/design_spec.md`-**✅ 检查点 — 本阶段产出完毕,自动进入下一步**:+**✅ Checkpoint — Phase deliverables complete, auto-proceed to next step**:```markdown-## ✅ Strategist 阶段完成-- [x] 已完成八项确认(用户已回复确认)-- [x] 已生成《设计规范与内容大纲》-- [ ] **下一步**: 自动进入 [Image_Generator / Executor] 环节+## ✅ Strategist Phase Complete+- [x] Eight Confirmations completed (user confirmed)+- [x] Design Specification & Content Outline generated+- [ ] **Next**: Auto-proceed to [Image_Generator / Executor] phase```----### Step 5: Image_Generator 阶段(条件触发)+### Step 5: Image_Generator Phase (Conditional)-🚧 **GATE**:Step 4 已完成,《设计规范与内容大纲》已生成且用户已确认。+🚧 **GATE**: Step 4 complete; Design Specification & Content Outline generated and user confirmed.-> **触发条件**:图片方式包含「AI 生成」。若不触发,直接跳到 Step 6(但仍需满足 Step 6 的 GATE)。+> **Trigger condition**: Image approach includes "AI generation". If not triggered, skip directly to Step 6 (Step 6 GATE must still be satisfied).Read `references/image-generator.md`-1. 从设计规范中提取所有「状态=待生成」的图片-2. 生成提示词文档 → `<项目路径>/images/image_prompts.md`-3. 生成图片(推荐命令行工具):+1. Extract all images with status "pending generation" from the design spec+2. Generate prompt document → `<project_path>/images/image_prompts.md`+3. Generate images (CLI tool recommended):```bash- python3 ${SKILL_DIR}/scripts/nano_banana_gen.py "提示词" --aspect_ratio 16:9 --image_size 1K -o <项目路径>/images+ python3 ${SKILL_DIR}/scripts/nano_banana_gen.py "prompt" --aspect_ratio 16:9 --image_size 1K -o <project_path>/images```-**✅ 检查点 — 确认所有图片已就绪,继续 Step 6**:+**✅ Checkpoint — Confirm all images are ready, proceed to Step 6**:```markdown-## ✅ Image_Generator 阶段完成-- [x] 提示词文档已创建-- [x] 所有图片已保存到 images/+## ✅ Image_Generator Phase Complete+- [x] Prompt document created+- [x] All images saved to images/```----### Step 6: Executor 阶段+### Step 6: Executor Phase-🚧 **GATE**:Step 4(及 Step 5,如触发)已完成,所有前置产出已就绪。+🚧 **GATE**: Step 4 (and Step 5 if triggered) complete; all prerequisite deliverables are ready.-根据风格选择读取角色定义:+Read the role definition based on the selected style:```-Read references/executor-base.md # 必读:公共准则-Read references/executor-general.md # 通用灵活风格-Read references/executor-consultant.md # 咨询风格-Read references/executor-consultant-top.md # 顶级咨询风格(MBB级)+Read references/executor-base.md # REQUIRED: common guidelines+Read references/executor-general.md # General flexible style+Read references/executor-consultant.md # Consulting style+Read references/executor-consultant-top.md # Top consulting style (MBB level)```-> 只需读 executor-base + 一个风格文件即可。+> Only need to read executor-base + one style file.-**视觉构建阶段**:-- 批量生成 SVG 页面 → `<项目路径>/svg_output/`+**Visual Construction Phase**:+- Batch-generate SVG pages → `<project_path>/svg_output/`-**逻辑构建阶段**:-- 生成演讲备注 → `<项目路径>/notes/total.md`+**Logic Construction Phase**:+- Generate speaker notes → `<project_path>/notes/total.md`-**✅ 检查点 — 确认所有 SVG 和 notes 已完整生成。直接进入 Step 7 后处理命令**:+**✅ Checkpoint — Confirm all SVGs and notes are fully generated. Proceed directly to Step 7 post-processing**:```markdown-## ✅ Executor 阶段完成-- [x] 所有 SVG 已生成到 svg_output/-- [x] 演讲备注已生成 notes/total.md+## ✅ Executor Phase Complete+- [x] All SVGs generated to svg_output/+- [x] Speaker notes generated at notes/total.md```----### Step 7: 后处理与导出+### Step 7: Post-processing & Export-🚧 **GATE**:Step 6 已完成,所有 SVG 已生成到 `svg_output/`,演讲备注 `notes/total.md` 已生成。+🚧 **GATE**: Step 6 complete; all SVGs generated to `svg_output/`; speaker notes `notes/total.md` generated.-> ⚠️ 以下三个子步骤必须**逐条单独执行**,每条命令执行完毕并确认成功后,才能执行下一条。-> ❌ **禁止**将三条命令写在同一个代码块或同一次 shell 调用中一次性执行。+> ⚠️ The following three sub-steps MUST be **executed individually one at a time**. Each command must complete and be confirmed successful before running the next.+> ❌ **NEVER** put all three commands in a single code block or single shell invocation.-**Step 7.1** — 拆分演讲备注:+**Step 7.1** — Split speaker notes:```bash-python3 ${SKILL_DIR}/scripts/total_md_split.py <项目路径>+python3 ${SKILL_DIR}/scripts/total_md_split.py <project_path>```-**Step 7.2** — SVG 后处理(图标嵌入/图片裁剪嵌入/文本扁平化/圆角转 Path):+**Step 7.2** — SVG post-processing (icon embedding / image crop & embed / text flattening / rounded rect to path):```bash-python3 ${SKILL_DIR}/scripts/finalize_svg.py <项目路径>+python3 ${SKILL_DIR}/scripts/finalize_svg.py <project_path>```-**Step 7.3** — 导出 PPTX(默认嵌入演讲备注):+**Step 7.3** — Export PPTX (embeds speaker notes by default):```bash-python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <项目路径> -s final+python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path> -s final```-> ❌ **禁止**用 `cp` 替代 `finalize_svg.py`,该工具执行多项关键处理-> ❌ **禁止**从 `svg_output/` 直接导出,必须用 `-s final` 从 `svg_final/` 导出-> ❌ **禁止**添加 `--only` 等额外参数+> ❌ **NEVER** use `cp` as a substitute for `finalize_svg.py` — it performs multiple critical processing steps+> ❌ **NEVER** export directly from `svg_output/` — MUST use `-s final` to export from `svg_final/`+> ❌ **NEVER** add extra flags like `--only`----### Step 8: Optimizer 阶段(可选)+### Step 8: Optimizer Phase (Optional)-🚧 **GATE**:Step 7 已完成。+🚧 **GATE**: Step 7 complete.-> **触发条件**:用户要求优化,或设计质量需要提升+> **Trigger condition**: User requests optimization, or design quality needs improvementRead `references/optimizer-crap.md`-优化后需**从 Step 7.1 开始重新执行**全部后处理子步骤(7.1 → 7.2 → 7.3),不可跳过。+After optimization, you MUST **re-run all post-processing sub-steps starting from Step 7.1** (7.1 → 7.2 → 7.3) — skipping is NOT allowed.----## 角色切换协议+## Role Switching Protocol-切换角色前**必须先读取**对应的 reference 文件,禁止跳过。输出标记:+Before switching roles, you **MUST first read** the corresponding reference file — skipping is FORBIDDEN. Output marker:```markdown-## 【角色切换:[角色名称]】-📖 阅读角色定义: references/[文件名].md-📋 当前任务: [简述]+## [Role Switch: <Role Name>]+📖 Reading role definition: references/<filename>.md+📋 Current task: <brief description>```----## 参考资源+## Reference Resources-| 资源 | 路径 |-|------|------|-| 公共技术约束 | `references/shared-standards.md` |-| 画布格式规范 | `references/canvas-formats.md` |-| 设计指南 | `references/design-guidelines.md` |-| 图片布局规范 | `references/image-layout-spec.md` |-| SVG 图片嵌入 | `references/svg-image-embedding.md` |+| Resource | Path |+|----------|------|+| Shared technical constraints | `references/shared-standards.md` |+| Canvas format specification | `references/canvas-formats.md` |+| Design guidelines | `references/design-guidelines.md` |+| Image layout specification | `references/image-layout-spec.md` |+| SVG image embedding | `references/svg-image-embedding.md` |----## 注意事项+## Notes-- 后处理三步不要添加 `--only` 等额外参数,直接运行即可-- 如果执行了 Optimizer 优化,需重新运行后处理与导出-- 本地预览:`python3 -m http.server -d <项目路径>/svg_final 8000`+- Do NOT add extra flags like `--only` to the post-processing commands — run them as-is+- If Optimizer optimization was performed, re-run post-processing and export+- Local preview: `python3 -m http.server -d <project_path>/svg_final 8000`diff --git a/skills/ppt-master/references/canvas-formats.md b/skills/ppt-master/references/canvas-formats.mdindex 4430fc04..33ac7ead 100644--- a/skills/ppt-master/references/canvas-formats.md+++ b/skills/ppt-master/references/canvas-formats.md@@ -1,73 +1,73 @@-# 画布格式规范+# Canvas Format Specification-> 📎 SVG 基础规则见 shared-standards.md+> See shared-standards.md for SVG basic rules.-## 格式速查表+## Format Quick Reference-| 格式 | viewBox | 比例 | 适用场景 |-|------|---------|------|---------|-| PPT 16:9 | `0 0 1280 720` | 16:9 | 商业演示、会议汇报 |-| PPT 4:3 | `0 0 1024 768` | 4:3 | 传统投影、学术演讲 |-| 小红书 | `0 0 1242 1660` | 3:4 | 图文分享、知识帖 |-| 朋友圈/IG | `0 0 1080 1080` | 1:1 | 方形海报、品牌展示 |-| Story/抖音 | `0 0 1080 1920` | 9:16 | 竖屏快拍、短视频封面 |-| 公众号头图 | `0 0 900 383` | 2.35:1 | 微信公众号文章配图 |-| 横版Banner | `0 0 1920 1080` | 16:9 | 网页Banner、电子屏 |-| 竖版海报 | `0 0 1080 1920` | 9:16 | 手机屏幕、电梯广告 |-| A4 打印 | `0 0 1240 1754` | 1:√2 | 打印海报、宣传单页 |+| Format | viewBox | Ratio | Use Case |+|--------|---------|-------|----------|+| PPT 16:9 | `0 0 1280 720` | 16:9 | Business presentations, meetings |+| PPT 4:3 | `0 0 1024 768` | 4:3 | Traditional projectors, academic talks |+| Xiaohongshu (RED) | `0 0 1242 1660` | 3:4 | Image-text sharing, knowledge posts |+| WeChat Moments / IG | `0 0 1080 1080` | 1:1 | Square posters, brand showcases |+| Story / TikTok | `0 0 1080 1920` | 9:16 | Vertical stories, short video covers |+| WeChat Article Header | `0 0 900 383` | 2.35:1 | WeChat article cover images |+| Landscape Banner | `0 0 1920 1080` | 16:9 | Web banners, digital screens |+| Portrait Poster | `0 0 1080 1920` | 9:16 | Phone screens, elevator ads |+| A4 Print | `0 0 1240 1754` | 1:sqrt(2) | Print posters, flyers |-## 格式选择决策树+## Format Selection Decision Tree```-内容用途?-├─ 演示汇报-│ ├─ 现代设备 → PPT 16:9 (1280×720)-│ └─ 传统设备 → PPT 4:3 (1024×768)-├─ 社交分享-│ ├─ 小红书 → 1242×1660-│ ├─ 朋友圈/IG → 1080×1080-│ └─ Story/抖音 → 1080×1920-└─ 营销物料- ├─ 公众号头图 → 900×383- ├─ Banner → 1920×1080- └─ 打印 → 1240×1754+Content purpose?+├── Presentation+│ ├── Modern devices → PPT 16:9 (1280x720)+│ └── Traditional devices → PPT 4:3 (1024x768)+├── Social sharing+│ ├── Xiaohongshu (RED) → 1242x1660+│ ├── WeChat Moments / IG → 1080x1080+│ └── Story / TikTok → 1080x1920+└── Marketing materials+ ├── WeChat Article Header → 900x383+ ├── Banner → 1920x1080+ └── Print → 1240x1754```-## 布局原则+## Layout Principles-### 横屏 (16:9, 4:3, 2.35:1)-- 视觉动线:Z字型,从左到右-- 边距:40-80px-- 布局:多栏、左右分割、网格-- 卡片尺寸(16:9):单行 530-600px,双行 265-295px+### Landscape (16:9, 4:3, 2.35:1)+- Visual flow: Z-pattern, left to right+- Margins: 40-80px+- Layouts: multi-column, left-right split, grid+- Card dimensions (16:9): single-row 530-600px, double-row 265-295px-### 竖屏 (3:4, 9:16)-- 视觉动线:从上到下-- 边距:60-120px-- 布局:单栏、上下分割、卡片堆叠-- 卡片尺寸(3:4):高度 400-600px,间距 40-60px+### Portrait (3:4, 9:16)+- Visual flow: top to bottom+- Margins: 60-120px+- Layouts: single-column, top-bottom split, card stacking+- Card dimensions (3:4): height 400-600px, gap 40-60px-### 正方形 (1:1)-- 视觉动线:中心辐射-- 边距:60-100px-- 核心区域:约 800×800px+### Square (1:1)+- Visual flow: center-radiating+- Margins: 60-100px+- Core area: ~800x800px-## 格式特定设计+## Format-specific Design-| 格式 | 标题区 | 内容区 | 特殊注意 |-|------|--------|--------|---------|-| PPT | 80-100px | 充分利用宽度 | 页码右下角 |-| 小红书 | 180-240px(加粗) | 上下留白充足 | 底部品牌区 120-160px |-| 朋友圈 | 200-280px | 中心 500-600px | 底部二维码区 150-200px |-| Story | — | 中部 1500px | 顶部安全区 120px,底部 180px |-| 公众号头图 | 居中/左对齐 48-72px | — | 配图右侧或背景 |+| Format | Title Area | Content Area | Special Notes |+|--------|-----------|--------------|---------------|+| PPT | 80-100px | Full width utilization | Page number bottom-right |+| Xiaohongshu (RED) | 180-240px (bold) | Generous top/bottom whitespace | Brand area at bottom 120-160px |+| WeChat Moments | 200-280px | Center 500-600px | QR code area at bottom 150-200px |+| Story | — | Middle 1500px | Top safe zone 120px, bottom 180px |+| WeChat Article Header | Center/left-aligned 48-72px | — | Image on right or as background |-## ViewBox 示例+## ViewBox Examples```xml<svg width="1280" height="720" viewBox="0 0 1280 720"> <!-- PPT 16:9 -->-<svg width="1242" height="1660" viewBox="0 0 1242 1660"> <!-- 小红书 -->-<svg width="1080" height="1080" viewBox="0 0 1080 1080"> <!-- 朋友圈 -->+<svg width="1242" height="1660" viewBox="0 0 1242 1660"> <!-- Xiaohongshu -->+<svg width="1080" height="1080" viewBox="0 0 1080 1080"> <!-- WeChat Moments --><svg width="1080" height="1920" viewBox="0 0 1080 1920"> <!-- Story -->-<svg width="900" height="383" viewBox="0 0 900 383"> <!-- 公众号头图 -->+<svg width="900" height="383" viewBox="0 0 900 383"> <!-- WeChat Article Header -->```diff --git a/skills/ppt-master/references/design-guidelines.md b/skills/ppt-master/references/design-guidelines.mdindex c280db80..b824ec11 100644--- a/skills/ppt-master/references/design-guidelines.md+++ b/skills/ppt-master/references/design-guidelines.md@@ -1,356 +1,356 @@-> 📎 公共技术约束见 shared-standards.md+> See shared-standards.md for common technical constraints.-# 设计指南+# Design Guidelines-PPT Master 系统的详细设计指南和最佳实践。+Detailed design guidelines and best practices for the PPT Master system.----## 颜色系统+## Color System-### 主色调选择+### Primary Color Selection-#### 咨询风格+#### Consulting Style```-德勤蓝: #0076A8 - 专业、可靠-麦肯锡蓝: #005587 - 权威、深度-BCG深蓝: #003F6C - 稳重、信任-普华永道橙: #D04A02 - 活力、创新-安永黄: #FFE600 - 乐观、清晰+Deloitte Blue: #0076A8 - Professional, reliable+McKinsey Blue: #005587 - Authoritative, deep+BCG Dark Blue: #003F6C - Stable, trustworthy+PwC Orange: #D04A02 - Energetic, innovative+EY Yellow: #FFE600 - Optimistic, clear```-#### 通用灵活风格+#### General Versatile Style```-科技蓝: #2196F3 - 现代、创新-活力橙: #FF9800 - 热情、积极-成长绿: #4CAF50 - 健康、增长-专业紫: #9C27B0 - 创意、高端-警示红: #F44336 - 紧急、重要+Tech Blue: #2196F3 - Modern, innovative+Vibrant Orange: #FF9800 - Passionate, positive+Growth Green: #4CAF50 - Healthy, growth+Professional Purple: #9C27B0 - Creative, premium+Alert Red: #F44336 - Urgent, important```-### 辅助色系+### Secondary Colors-#### 数据可视化配色+#### Data Visualization Colors```-积极趋势(绿色系):- 深绿: #2E7D32 | 中绿: #4CAF50 | 浅绿: #81C784+Positive trend (green):+ Dark: #2E7D32 | Medium: #4CAF50 | Light: #81C784-警示趋势(黄色系):- 深黄: #F57C00 | 中黄: #FFA726 | 浅黄: #FFD54F+Warning trend (yellow):+ Dark: #F57C00 | Medium: #FFA726 | Light: #FFD54F-负面趋势(红色系):- 深红: #C62828 | 中红: #EF5350 | 浅红: #E57373+Negative trend (red):+ Dark: #C62828 | Medium: #EF5350 | Light: #E57373```-#### 中性色系+#### Neutral Colors```-文本层级:- 主文本: #212121 (黑色, 87% opacity)- 副文本: #757575 (灰色, 60% opacity)- 辅助文本: #9E9E9E (浅灰, 38% opacity)+Text hierarchy:+ Primary text: #212121 (black, 87% opacity)+ Secondary text: #757575 (gray, 60% opacity)+ Tertiary text: #9E9E9E (light gray, 38% opacity)-背景层级:- 主背景: #FFFFFF- 次背景: #F5F5F5- 卡片背景: #FAFAFA- 边框: #E0E0E0+Background hierarchy:+ Primary bg: #FFFFFF+ Secondary bg: #F5F5F5+ Card bg: #FAFAFA+ Border: #E0E0E0```-### 对比度要求+### Contrast Requirements-遵循 WCAG 2.1 AA 级标准:-- 正文文本:至少 4.5:1-- 大号文本(24px+):至少 3:1-- 重要数据:至少 7:1(AAA 级)+Following WCAG 2.1 AA standards:+- Body text: at least 4.5:1+- Large text (24px+): at least 3:1+- Important data: at least 7:1 (AAA level)----## 排版规范+## Typography Specification-### 字体层级+### Font Hierarchy-> 以正文字号为 1x 基准,其他层级按比例推导。字号选择取决于内容密度,而非设计风格。+> Use body font size as 1x baseline; derive other levels proportionally. Font size selection depends on content density, not design style.-#### 内容宽松(正文基准 24px)+#### Relaxed Content (body baseline 24px)-适用:演讲型 PPT、培训课件、每页要点少(3-5 条)+Suitable for: Keynote-style PPTs, training materials, few points per page (3-5)```-H1 - 封面标题: 60-72px, Bold (2.5-3x)-H2 - 页面标题: 42-48px, Bold (1.75-2x)-H3 - 章节标题: 32-36px, SemiBold (1.3-1.5x)-正文 - 主要内容: 24px, Regular (1x 基准)-小字 - 注释说明: 18-20px, Regular (0.75-0.85x)+H1 - Cover title: 60-72px, Bold (2.5-3x)+H2 - Page title: 42-48px, Bold (1.75-2x)+H3 - Section title: 32-36px, SemiBold (1.3-1.5x)+Body - Main content: 24px, Regular (1x baseline)+Small - Annotations: 18-20px, Regular (0.75-0.85x)```-#### 内容密集(正文基准 18px)+#### Dense Content (body baseline 18px)-适用:数据报告、咨询分析、每页要点多(6+ 条)+Suitable for: Data reports, consulting analysis, many points per page (6+)```-H1 - 封面标题: 45-54px, Bold (2.5-3x)-H2 - 页面标题: 27-36px, Bold (1.5-2x)-H3 - 章节标题: 22-27px, SemiBold (1.2-1.5x)-正文 - 主要内容: 18px, Regular (1x 基准)-小字 - 注释说明: 14-15px, Regular (0.75-0.85x)+H1 - Cover title: 45-54px, Bold (2.5-3x)+H2 - Page title: 27-36px, Bold (1.5-2x)+H3 - Section title: 22-27px, SemiBold (1.2-1.5x)+Body - Main content: 18px, Regular (1x baseline)+Small - Annotations: 14-15px, Regular (0.75-0.85x)```-### 字体选择+### Font Selection-#### 中文字体+#### Chinese Fonts-| 类别 | 代号 | 可选字体 | 适用场景 |-|------|:----:|---------|----------|-| 无衬线黑体 | A | 微软雅黑、黑体、幼圆、华文细黑 | 现代商务、正文(默认) |-| 衬线宋体 | B | 宋体、新宋体、仿宋、华文宋体 | 政务公文、正式报告 |-| 书法楷体 | C | 楷体、华文楷体、华文行楷 | 文化艺术、人文类 |-| 标题黑体 | D | 黑体、华文中宋、思源黑体 Bold | 大标题、强调 |-| 手写艺术 | E | 华文行楷、华文新魏、隶书 | 创意、个性化 |+| Category | Code | Options | Suitable Scenarios |+|----------|:----:|---------|-------------------|+| Sans-serif | A | Microsoft YaHei, SimHei, YouYuan, STXihei | Modern business, body text (default) |+| Serif | B | SimSun, NSimSun, FangSong, STSong | Government docs, formal reports |+| Calligraphic | C | KaiTi, STKaiti, STXingkai | Culture, arts, humanities |+| Display | D | SimHei, STZhongsong, Source Han Sans Bold | Large titles, emphasis |+| Handwritten | E | STXingkai, STXinwei, LiSu | Creative, personalized |-#### 英文字体+#### English Fonts-| 类别 | 代号 | 可选字体 | 适用场景 |-|------|:----:|---------|----------|-| 无衬线现代 | F | Arial, Calibri, Segoe UI, Helvetica | 现代商务(默认) |-| 衬线经典 | G | Times New Roman, Georgia, Cambria | 正式文档、学术 |-| 标题展示 | H | Impact, Arial Black, Bebas Neue | 大标题、海报 |-| 手写风格 | I | Comic Sans MS, Segoe Script, Ink Free | 轻松活泼 |-| 等宽代码 | J | Consolas, Cascadia Code, Courier New | 数据、代码 |+| Category | Code | Options | Suitable Scenarios |+|----------|:----:|---------|-------------------|+| Sans-serif modern | F | Arial, Calibri, Segoe UI, Helvetica | Modern business (default) |+| Serif classic | G | Times New Roman, Georgia, Cambria | Formal documents, academic |+| Display | H | Impact, Arial Black, Bebas Neue | Large titles, posters |+| Handwritten | I | Comic Sans MS, Segoe Script, Ink Free | Casual, playful |+| Monospace | J | Consolas, Cascadia Code, Courier New | Data, code |-#### 推荐 font-family+#### Recommended font-family```css-/* 中文字体 */-"Microsoft YaHei", "微软雅黑", sans-serif /* A: 微软雅黑 */-"SimHei", "黑体", sans-serif /* A/D: 黑体 */-"SimSun", "宋体", serif /* B: 宋体 */-"FangSong", "仿宋", serif /* B: 仿宋 */-"KaiTi", "楷体", serif /* C: 楷体 */-"STXingkai", "华文行楷", cursive /* C/E: 华文行楷 */+/* Chinese fonts */+"Microsoft YaHei", sans-serif /* A: Microsoft YaHei */+"SimHei", sans-serif /* A/D: SimHei */+"SimSun", serif /* B: SimSun */+"FangSong", serif /* B: FangSong */+"KaiTi", serif /* C: KaiTi */+"STXingkai", cursive /* C/E: STXingkai */-/* 英文字体 */-"Arial", sans-serif /* F: Arial */-"Calibri", sans-serif /* F: Calibri */-"Times New Roman", serif /* G: Times */-"Georgia", serif /* G: Georgia */-"Impact", sans-serif /* H: Impact */-"Consolas", monospace /* J: 等宽 */+/* English fonts */+"Arial", sans-serif /* F: Arial */+"Calibri", sans-serif /* F: Calibri */+"Times New Roman", serif /* G: Times */+"Georgia", serif /* G: Georgia */+"Impact", sans-serif /* H: Impact */+"Consolas", monospace /* J: Monospace */```-#### 中英文混排推荐+#### Chinese-English Mixed Typesetting Recommendations-| 场景 | 中文字体 | 英文字体 |-|------|---------|---------|-| 现代商务 | 微软雅黑 (A) | Calibri / Arial (F) |-| 政务公文 | 宋体 (B) | Times New Roman (G) |-| 文化艺术 | 楷体 (C) | Georgia (G) |-| 科技互联网 | 黑体 (D) | Segoe UI (F) |+| Scenario | Chinese Font | English Font |+|----------|-------------|-------------|+| Modern business | Microsoft YaHei (A) | Calibri / Arial (F) |+| Government docs | SimSun (B) | Times New Roman (G) |+| Culture & arts | KaiTi (C) | Georgia (G) |+| Tech / Internet | SimHei (D) | Segoe UI (F) |-#### 字体角色+#### Font Roles-| 角色 | 用途 | 中文推荐 | 英文推荐 |-|------|------|----------|----------|-| 标题字体 | H1/H2 大标题 | A/C/D/E | F/G/H |-| 正文字体 | 段落、要点 | A/B | F/G |-| 强调字体 | KPI、关键词 | D | H/J |-| 注释字体 | 脚注、说明 | A/B | F/G |+| Role | Purpose | Chinese Recommended | English Recommended |+|------|---------|--------------------|--------------------|+| Title font | H1/H2 large titles | A/C/D/E | F/G/H |+| Body font | Paragraphs, bullet points | A/B | F/G |+| Emphasis font | KPIs, keywords | D | H/J |+| Annotation font | Footnotes, captions | A/B | F/G |-### 行高和间距+### Line Height and Spacing```-标题行高: 1.2-1.3-正文行高: 1.5-1.6-段落间距: 1.5-2em-列表间距: 0.5-1em+Title line height: 1.2-1.3+Body line height: 1.5-1.6+Paragraph spacing: 1.5-2em+List spacing: 0.5-1em```-### 文本换行与扁平化+### Text Wrapping & Flattening-- 生成阶段:采用 `<tspan>` 手动换行,通过 `x`/`dy` 控制行起点与行距-- 后处理:使用 `python3 scripts/finalize_svg.py <项目路径>`,包含文本扁平化功能-- 校验:对比 `svg_output` 与 `svg_final`,核对行序、样式与定位一致;目标文件中不应残留 `<tspan>`+- Generation phase: Use `<tspan>` for manual line breaks, control line start and spacing via `x`/`dy`+- Post-processing: Use `python3 scripts/finalize_svg.py <project_path>`, includes text flattening+- Verification: Compare `svg_output` with `svg_final`; check line order, styles, and positioning match; target files should not contain residual `<tspan>`----## 布局原则+## Layout Principles-### 16:9 画布规范+### 16:9 Canvas Specification```-画布尺寸: 1280x720px-安全区域: 1200x640px (留40px边距)-标题区: 1200x100px-内容区: 1200x500px-页脚区: 1200x40px+Canvas size: 1280x720px+Safe area: 1200x640px (40px margins)+Title area: 1200x100px+Content area: 1200x500px+Footer area: 1200x40px```-### 网格系统+### Grid System-#### 单栏布局+#### Single Column Layout```-适用: 封面、结束页、单一主题-内容宽度: 800-1000px,水平居中+Suitable for: Covers, ending pages, single topics+Content width: 800-1000px, horizontally centered```-#### 双栏布局+#### Two-Column Layout```-适用: 对比分析、左图右文-栏宽比例: 1:1 或 3:2,栏间距: 40-60px+Suitable for: Comparative analysis, left-image right-text+Column ratio: 1:1 or 3:2, column gap: 40-60px```-#### 三栏布局+#### Three-Column Layout```-适用: 并列要点、流程步骤-栏宽比例: 1:1:1,栏间距: 30-40px+Suitable for: Parallel points, process steps+Column ratio: 1:1:1, column gap: 30-40px```-#### 四象限布局+#### Four-Quadrant Layout```-适用: 矩阵分析、分类展示-象限尺寸: 560x250px (含间距),间距: 20-30px+Suitable for: Matrix analysis, classification display+Quadrant size: 560x250px (including gap), gap: 20-30px```-### 卡片设计+### Card Design-#### 尺寸规范(强制)+#### Dimension Specifications (Mandatory)```-单行卡片: 高度 530-600px-双行卡片: 每行 265-295px-三栏卡片: 每栏宽度 360-380px+Single-row card: height 530-600px+Double-row card: each row 265-295px+Three-column card: each column width 360-380px```-#### 内边距+#### Internal Padding```-标题区: 20-30px-内容区: 30-40px-图表区: 20-30px+Title area: 20-30px+Content area: 30-40px+Chart area: 20-30px```-#### 圆角半径+#### Border Radius```-小卡片: 8-12px-大卡片: 12-16px-图表: 8px-按钮: 6-8px+Small cards: 8-12px+Large cards: 12-16px+Charts: 8px+Buttons: 6-8px```----## 图片布局规范+## Image Layout Specification-含图片页面的布局需根据图片比例动态计算。详细规范见 image-layout-spec.md。+Pages with images need dynamic layout calculation based on image ratio. See image-layout-spec.md for details.-**快速规则**:-- 比例 > 2.0 (超宽) → 上下布局-- 比例 1.5-2.0 (宽幅) → 优先上下,文字区不足则改左右-- 比例 1.2-1.5 (标准横图) → 左右布局-- 比例 0.8-1.2 (方形) → 左右布局-- 比例 < 0.8 (竖图) → 左右布局+**Quick rules**:+- Ratio > 2.0 (ultra-wide) → Top-bottom layout+- Ratio 1.5-2.0 (wide) → Prefer top-bottom; switch to left-right if text area insufficient+- Ratio 1.2-1.5 (standard landscape) → Left-right layout+- Ratio 0.8-1.2 (square) → Left-right layout+- Ratio < 0.8 (portrait) → Left-right layout----## 图表设计+## Chart Design-### 常用图表类型+### Common Chart Types-#### KPI 卡片+#### KPI Cards```-布局: 2x2 或 1x4-元素: 大号数字 (48-56px) + 指标名称 (18-20px) + 趋势图标/百分比 + 同比/环比说明+Layout: 2x2 or 1x4+Elements: Large number (48-56px) + metric name (18-20px) + trend icon/percentage + YoY/MoM note```-#### 柱状图+#### Bar Charts```-柱子数量: 3-8个,柱宽: 40-60px,间距: 柱宽的50-80%,显示数值标签+Bar count: 3-8, bar width: 40-60px, gap: 50-80% of bar width, show data labels```-#### 折线图+#### Line Charts```-线条: 2-3px,数据点: 圆形 半径 4-6px,网格线: 1px 浅灰色,图例: 右上角或底部+Line: 2-3px, data points: circle radius 4-6px, grid lines: 1px light gray, legend: top-right or bottom```-#### 饼图/环形图+#### Pie/Donut Charts```-分块: 3-6个,起始角度: -90度 (12点方向),环形宽度: 40-60px,显示百分比标签+Segments: 3-6, start angle: -90° (12 o'clock), ring width: 40-60px, show percentage labels```-#### 矩阵图+#### Matrix Charts```-2x2布局,轴线: 2px实线,象限标签清晰,数据点大小统一+2x2 layout, axis lines: 2px solid, quadrant labels clear, data point sizes uniform```-### 图表配色+### Chart Colors-| 方案 | 适用场景 | 示例 |-|------|---------|------|-| 单色渐变 | 同类数据比较 | #1976D2 → #42A5F5 → #90CAF9 |-| 对比色组 | 不同类别数据 | #2196F3 / #FF9800 / #4CAF50 |-| 顺序色 | 等级/强度展示 | #4CAF50 → #FFC107 → #F44336 |+| Scheme | Suitable Scenarios | Example |+|--------|-------------------|---------|+| Monochromatic gradient | Same-category data comparison | #1976D2 → #42A5F5 → #90CAF9 |+| Contrasting set | Different category data | #2196F3 / #FF9800 / #4CAF50 |+| Sequential | Level/intensity display | #4CAF50 → #FFC107 → #F44336 |----## 图标使用+## Icon Usage-### 项目内置图标库(推荐)+### Built-in Icon Library (Recommended)-位于 `templates/icons/`,包含 640+ 个 SVG 图标。+Located in `templates/icons/`, containing 640+ SVG icons.```-完整索引: templates/icons/FULL_INDEX.md-程序化查询: templates/icons/icons_index.json-使用方式: templates/icons/README.md+Full index: templates/icons/FULL_INDEX.md+Programmatic query: templates/icons/icons_index.json+Usage guide: templates/icons/README.md```-**分类概览**:-- 通用:home, settings, search, user, calendar, mail...-- 数据:trending-up, chart-bar, database, file-text...-- 业务:rocket, target, lightbulb, trophy, star...-- 箭头:arrow-right/left/up/down, chevron-right...-- 状态:check, check-circle, x-circle, alert-circle...-- 工具:edit, trash, download, upload, share...+**Category overview**:+- General: home, settings, search, user, calendar, mail...+- Data: trending-up, chart-bar, database, file-text...+- Business: rocket, target, lightbulb, trophy, star...+- Arrows: arrow-right/left/up/down, chevron-right...+- Status: check, check-circle, x-circle, alert-circle...+- Tools: edit, trash, download, upload, share...-### 图标规范+### Icon Specifications```-尺寸: 小 16-20px | 常规 24-32px | 大 40-48px-线宽: 2px (统一)-颜色: 与主色调协调-间距: 图标大小的 50%+Size: Small 16-20px | Regular 24-32px | Large 40-48px+Stroke width: 2px (uniform)+Color: Coordinate with primary color+Spacing: 50% of icon size```----## 常见模式+## Common Patterns-### 封面页-- 顶部:公司Logo(可选),中部:演示标题 (H1),副标题,底部:日期、演讲人-- 简洁大气,主色调背景或图片,文字居中或偏左+### Cover Page+- Top: Company logo (optional), Center: Presentation title (H1), subtitle, Bottom: Date, presenter+- Clean and impressive; primary color background or image; text centered or left-aligned-### 内容页-- 标准结构:页面标题 (H2) → 主要内容 → 页码/注释-- 变体:左标题右内容、上下分割、多栏布局+### Content Page+- Standard structure: Page title (H2) → Main content → Page number / notes+- Variants: Left-title right-content, top-bottom split, multi-column layout-### 数据页-- 数据可视化为主,关键数字突出,提供数据来源,添加趋势说明-- 布局:大图表+要点、多小图表组合、KPI仪表盘+### Data Page+- Data visualization as primary; highlight key numbers; provide data sources; add trend notes+- Layouts: Large chart + key points, multiple small chart combinations, KPI dashboard-### 总结页-- 3-5个核心要点 + 行动号召 (CTA) + 下一步计划-- 列表或编号,图标辅助,简洁明了+### Summary Page+- 3-5 core takeaways + Call to Action (CTA) + Next steps+- Lists or numbering, icon-assisted, clean and clear----## 常见问题+## Common Issues-| 问题 | 解决方案 |-|------|---------|-| 内容太多放不下 | 分多页、用更小字号(>=16px)、精简文字、用图表代替 |-| 颜色搭配不协调 | 限制主色<=3种、增加中性色占比、参考成功案例 |-| 布局不平衡 | 检查对齐、调整间距、使用网格系统、平衡视觉重量 |+| Problem | Solution |+|---------|----------|+| Too much content to fit | Split across pages, use smaller font (>=16px), condense text, use charts instead |+| Colors don't match | Limit primary colors to <=3, increase neutral color proportion, reference successful cases |+| Unbalanced layout | Check alignment, adjust spacing, use grid system, balance visual weight |diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex c2e5ba6b..06b4f84e 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -1,163 +1,163 @@-# Executor 公共规范+# Executor Common Guidelines-> 各风格差异化内容见对应 `executor-{style}.md`。+> Style-specific content is in the corresponding `executor-{style}.md`. Technical constraints are in shared-standards.md.----## 1. 模板遵循规则+## 1. Template Adherence Rules-如果项目 `templates/` 目录中存在模板文件,必须遵循模板结构:+If template files exist in the project's `templates/` directory, the template structure must be followed:-| 页面类型 | 对应模板 | 遵循规则 |-|---|---|---|-| 封面 | `01_cover.svg` | 继承背景、装饰元素、布局结构,替换占位符内容 |-| 章节页 | `02_chapter.svg` | 继承编号样式、标题位置、装饰元素 |-| 内容页 | `03_content.svg` | 继承页眉页脚样式,**内容区可自由布局** |-| 结束页 | `04_ending.svg` | 继承背景、感谢语位置、联系信息布局 |-| 目录页 | `02_toc.svg` | **可选**:继承目录标题、列表样式 |+| Page Type | Corresponding Template | Adherence Rules |+|-----------|----------------------|-----------------|+| Cover | `01_cover.svg` | Inherit background, decorative elements, layout structure; replace placeholder content |+| Chapter | `02_chapter.svg` | Inherit numbering style, title position, decorative elements |+| Content | `03_content.svg` | Inherit header/footer styles; **content area may be freely laid out** |+| Ending | `04_ending.svg` | Inherit background, thank-you message position, contact info layout |+| TOC | `02_toc.svg` | **Optional**: Inherit TOC title, list styles |-### 页面-模板对应声明(必须输出)+### Page-Template Mapping Declaration (Required Output)-开始生成每一页之前,必须明确输出该页使用的模板或"自由生成":+Before generating each page, you must explicitly output which template (or "free design") is used:```-📝 **模板对应**: `templates/01_cover.svg`(或"无(自由生成)")-🎯 **遵循规则/布局策略**: [具体说明]+📝 **Template mapping**: `templates/01_cover.svg` (or "None (free design)")+🎯 **Adherence rules / layout strategy**: [specific description]```-- **内容页**:模板只定义页眉和页脚,内容区域由 Executor 自由布局-- **无模板时**:完全按照《设计规范与内容大纲》自由生成+- **Content pages**: Templates only define header and footer; the content area is freely laid out by the Executor+- **No template**: Generate entirely per the Design Specification & Content Outline----## 2. 设计参数确认(强制步骤)+## 2. Design Parameter Confirmation (Mandatory Step)-> 在生成第一页 SVG 之前,**必须先回顾《设计规范与内容大纲》中的关键设计参数**,确保后续生成严格遵循规范。+> Before generating the first SVG page, you **must review the key design parameters from the Design Specification & Content Outline** to ensure all subsequent generation strictly follows the spec.-必须输出确认,包含:画布尺寸、正文字号、配色方案(主导/辅助/强调色 HEX)、字体方案。+Must output confirmation including: canvas dimensions, body font size, color scheme (primary/secondary/accent HEX values), font plan.-**为什么必须做这一步?** 防止"规范是规范,执行是执行"的脱节问题。+**Why is this step mandatory?** Prevents the "spec says one thing, execution does another" disconnect.----## 3. 执行准则+## 3. Execution Guidelines-- **绝对遵循规范**:严格按照规范中的色彩、布局、画布格式、排版参数设计-- **遵循模板结构**:如有模板,继承模板的视觉框架-- **分阶段批量生成**(推荐):- 1. **视觉构建阶段**:连续生成所有 SVG 页面,确保设计风格和布局坐标的高度一致性(Visual Consistency)- 2. **逻辑构建阶段**:SVG 全部定稿后,再批量生成演讲备注,确保叙事逻辑连贯(Narrative Continuity)-- **技术规范**:详见 [shared-standards.md](shared-standards.md) 中的 SVG 技术约束与 PPT 兼容性规则+- **Absolute spec adherence**: Strictly follow the color, layout, canvas format, and typography parameters in the spec+- **Follow template structure**: If templates exist, inherit the template's visual framework+- **Phased batch generation** (recommended):+ 1. **Visual Construction Phase**: Generate all SVG pages continuously, ensuring high consistency in design style and layout coordinates (Visual Consistency)+ 2. **Logic Construction Phase**: After all SVGs are finalized, batch-generate speaker notes to ensure narrative coherence (Narrative Continuity)+- **Technical specifications**: See [shared-standards.md](shared-standards.md) for SVG technical constraints and PPT compatibility rules-### SVG 文件命名规范+### SVG File Naming Convention-文件命名格式:`<序号>_<页面名称>.svg`+File naming format: `<number>_<page_name>.svg`-- **中文内容** → 中文命名:`01_封面.svg`、`02_目录.svg`、`03_核心优势.svg`-- **英文内容** → 英文命名:`01_cover.svg`、`02_agenda.svg`、`03_key_benefits.svg`-- **序号规则**:两位数字,从 01 开始递增-- **页面名称**:简洁描述性,与《设计规范与内容大纲》中的页面标题一致+- **Chinese content** → Chinese naming: `01_封面.svg`, `02_目录.svg`, `03_核心优势.svg`+- **English content** → English naming: `01_cover.svg`, `02_agenda.svg`, `03_key_benefits.svg`+- **Number rules**: Two-digit numbers, starting from 01+- **Page name**: Concise and descriptive, matching the page title in the Design Specification & Content Outline----## 4. 图标使用+## 4. Icon Usage-四种方式:**A: Emoji**(`<text>🚀</text>`)| **B: AI 生成**(SVG 基本元素)| **C: 内置库**(`templates/icons/` 640+ 图标,推荐)| **D: 自定义**(用户指定)+Four approaches: **A: Emoji** (`<text>🚀</text>`) | **B: AI-generated** (SVG basic shapes) | **C: Built-in library** (`templates/icons/` 640+ icons, recommended) | **D: Custom** (user-specified)-**内置图标 - 占位符方式(推荐)**:+**Built-in icons — Placeholder method (recommended)**:```xml<use data-icon="chart-bar" x="100" y="200" width="48" height="48" fill="#005587"/>```-> 无需手动运行 `embed_icons.py`,`finalize_svg.py` 后处理工具会自动嵌入图标。+> No need to manually run `embed_icons.py`; `finalize_svg.py` post-processing tool will auto-embed icons.-**常用图标**:`chart-bar` `arrow-trend-up` `users` `cog` `circle-checkmark` `target` `clock` `file` `dollar` `lightbulb`+**Common icons**: `chart-bar` `arrow-trend-up` `users` `cog` `circle-checkmark` `target` `clock` `file` `dollar` `lightbulb`-完整索引:`templates/icons/README.md`+Full index: `templates/icons/README.md`----## 5. 图片处理+## 5. Image Handling-根据设计规范「图片资源清单」中的状态处理:+Handle images based on their status in the Design Specification's "Image Resource List":-| 状态 | 来源 | 处理方式 |-|---|---|---|-| **已有** | 用户提供 | 直接引用 `../images/` 目录中的图片 |-| **AI 生成** | Image_Generator 生成 | 图片已在 `../images/`,直接引用 |-| **占位符** | 暂未准备 | 使用虚线框占位 |+| Status | Source | Handling |+|--------|--------|----------|+| **Existing** | User-provided | Reference images directly from `../images/` directory |+| **AI-generated** | Generated by Image_Generator | Images already in `../images/`, reference directly |+| **Placeholder** | Not yet prepared | Use dashed border placeholder |-**引用**:`<image href="../images/xxx.png" ... preserveAspectRatio="xMidYMid slice"/>`+**Reference**: `<image href="../images/xxx.png" ... preserveAspectRatio="xMidYMid slice"/>`-**占位符**:虚线框 `<rect stroke-dasharray="8,4" .../>` + 描述文本+**Placeholder**: Dashed border `<rect stroke-dasharray="8,4" .../>` + description text----## 6. 字体使用+## 6. Font Usage-根据《设计规范与内容大纲》中的字体方案,为不同文本角色应用对应字体:+Apply corresponding fonts for different text roles based on the font plan in the Design Specification & Content Outline:-| 角色 | 中文推荐 | 英文推荐 |-|---|---|---|-| 标题字体 | 微软雅黑/楷体/黑体 | Arial/Georgia |-| 正文字体 | 微软雅黑/宋体 | Calibri/Times |-| 强调字体 | 黑体 | Arial Black/Consolas |-| 注释字体 | 微软雅黑/宋体 | Arial/Times |+| Role | Chinese Recommended | English Recommended |+|------|--------------------|--------------------|+| Title font | Microsoft YaHei / KaiTi / SimHei | Arial / Georgia |+| Body font | Microsoft YaHei / SimSun | Calibri / Times |+| Emphasis font | SimHei | Arial Black / Consolas |+| Annotation font | Microsoft YaHei / SimSun | Arial / Times |-详细参见 `references/design-guidelines.md`。+See `references/design-guidelines.md` for details.----## 7. 演讲备注生成框架+## 7. Speaker Notes Generation Framework-### 任务 1. 生成完整演讲备注文稿+### Task 1. Generate Complete Speaker Notes Document-在**所有 SVG 页面生成完成并定稿后**,进入"逻辑构建阶段",在 `notes/total.md` 中生成完整的演讲备注文稿。+After **all SVG pages are generated and finalized**, enter the "Logic Construction Phase" and generate the complete speaker notes document in `notes/total.md`.-**为什么不一页一页生成?** 批量写备注能像写剧本一样规划转场语(Transition),确保演讲逻辑通顺。+**Why not generate page-by-page?** Batch-writing notes allows planning transitions like a script, ensuring coherent presentation logic.-**格式**:每页以 `# <序号>_<页面标题>` 开头,页间用 `---` 分隔。每页包含:讲稿正文(2-5 句)、`要点:①② ③`、`时长:X 分钟`。首页除外,每页正文以 `[过渡]` 转场语开头。+**Format**: Each page starts with `# <number>_<page_title>`, separated by `---` between pages. Each page includes: script text (2-5 sentences), `Key points: ① ② ③`, `Duration: X minutes`. Except for the first page, each page's text starts with a `[Transition]` phrase.-**基础控场标记**(所有风格通用):+**Basic stage direction markers** (common to all styles):-| 标记 | 用途 |-|---|---|-| `[停顿]` | 关键内容后留白,让观众消化 |-| `[过渡]` | 段首单独成段,放在每页正文开头,承上启下 |+| Marker | Purpose |+|--------|---------|+| `[Pause]` | Whitespace after key content, letting the audience absorb |+| `[Transition]` | Standalone paragraph at the start of each page's text, bridging from the previous page |-> 各风格可扩展额外标记(`[互动]`/`[数据]`/`[环视]`/`[对标]` 等),见 `executor-{style}.md`。+> Each style may extend with additional markers (`[Interactive]`/`[Data]`/`[Scan Room]`/`[Benchmark]` etc.), see `executor-{style}.md`.-**要求**:+**Requirements**:-- 讲稿应口语化、自然流畅-- 突出页面核心信息和演讲要点-- 用户可在 `notes/` 目录手动编辑覆盖+- Notes should be conversational and flow naturally+- Highlight each page's core information and presentation key points+- Users can manually edit and override in the `notes/` directory-### 任务 2. 拆分写入各页备注文件+### Task 2. Split Into Per-Page Note Files-将 `notes/total.md` 自动拆分,写入 `notes/` 目录下的演讲备注文件中。+Automatically split `notes/total.md` into individual speaker note files in the `notes/` directory.-**文件命名规范**:+**File naming convention**:-- **推荐**:与 SVG 同名(如 `01_封面.svg` → `notes/01_封面.md`)-- **兼容**:也支持 `slide01.md` 格式(向后兼容)+- **Recommended**: Match SVG names (e.g., `01_cover.svg` → `notes/01_cover.md`)+- **Compatible**: Also supports `slide01.md` format (backward compatibility)----## 8. 完成后下一步+## 8. Next Steps After Completion-> **自动衔接**:视觉构建阶段(SVG 页数)和逻辑构建阶段(备注页数)完成后,Executor 会直接开始执行后处理流程。+> **Auto-continuation**: After Visual Construction Phase (all SVG pages) and Logic Construction Phase (all notes) are complete, the Executor proceeds directly to the post-processing pipeline.-**后处理与导出**(详见 [shared-standards.md](shared-standards.md)):+**Post-processing & Export** (see [shared-standards.md](shared-standards.md)):```bash-# 1. 拆分讲稿-python3 scripts/total_md_split.py <项目路径>+# 1. Split speaker notes+python3 scripts/total_md_split.py <project_path>-# 2. SVG 后处理(自动嵌入图标、图片等)-python3 scripts/finalize_svg.py <项目路径>+# 2. SVG post-processing (auto-embed icons, images, etc.)+python3 scripts/finalize_svg.py <project_path>-# 3. 导出 PPTX-python3 scripts/svg_to_pptx.py <项目路径> -s final+# 3. Export PPTX+python3 scripts/svg_to_pptx.py <project_path> -s final```diff --git a/skills/ppt-master/references/executor-consultant-top.md b/skills/ppt-master/references/executor-consultant-top.mdindex 1bf0df5e..36f822cb 100644--- a/skills/ppt-master/references/executor-consultant-top.md+++ b/skills/ppt-master/references/executor-consultant-top.md@@ -1,218 +1,218 @@-# Executor Consultant Top -- 顶级咨询风格 (MBB 级)+# Executor Consultant Top — Top-tier Consulting Style (MBB Level)-> 基础准则见 executor-base.md,技术约束见 shared-standards.md+> Common guidelines: executor-base.md. Technical constraints: shared-standards.md.----## 角色定位+## Role Definition-MBB 级(McKinsey / Bain / BCG)顶级咨询风格的 SVG 设计执行师。适用于战略规划、董事会汇报、投融资路演、高管决策支持等**高端咨询**场景。核心特征:数据驱动洞察、金字塔结构叙事、极致简洁,输出面向 C-level 决策者。+An MBB-level (McKinsey / Bain / BCG) top-tier consulting style SVG design executor. Suitable for strategic planning, board presentations, investment roadshows, C-suite decision support, and other **premium consulting** scenarios. Core characteristics: data-driven insights, pyramid-structured narrative, extreme simplicity. Output targets C-level decision-makers.----## SCQA 框架(叙事结构)+## SCQA Framework (Narrative Structure)-每份 MBB 级演示都遵循 SCQA 叙事结构:+Every MBB-level presentation follows the SCQA narrative structure:-| 元素 | 作用 | 典型页面 |-|------|------|---------|-| **S - Situation** | 设定共识背景 | 封面 / 第 1-2 页 |-| **C - Complication** | 引入问题/张力 | 第 2-3 页 |-| **Q - Question** | 隐含或明确的待解决问题 | 过渡页 |-| **A - Answer** | 核心解决方案 | 正文所有页 |+| Element | Purpose | Typical Pages |+|---------|---------|---------------|+| **S - Situation** | Establish shared context | Cover / Pages 1-2 |+| **C - Complication** | Introduce the problem / tension | Pages 2-3 |+| **Q - Question** | The implicit or explicit question to solve | Transition page |+| **A - Answer** | Core solution | All body pages |-**页面编排**:封面体现 S+C -> Executive Summary 回答 Q -> 章节展开 A -> 结尾回扣 S+**Page sequencing**: Cover embodies S+C → Executive Summary answers Q → Chapters develop A → Closing revisits S-**标题写法**:+**Title writing**:-| SCQA 元素 | 弱标题 | MBB 级标题 |-|-----------|--------|-----------|-| S | "行业背景" | "数字化渗透率突破 60%,行业进入深水区" |-| C | "面临挑战" | "然而三大结构性矛盾制约了规模化落地" |-| Q | "战略问题" | "如何在 18 个月内实现从试点到全面部署?" |-| A | "解决方案" | "三步走路径:聚焦、扩展、规模化" |+| SCQA Element | Weak Title | MBB-level Title |+|-------------|------------|-----------------|+| S | "Industry Background" | "Digital penetration surpasses 60%, industry enters deep waters" |+| C | "Challenges Faced" | "Yet three structural contradictions constrain scaled deployment" |+| Q | "Strategic Question" | "How to move from pilot to full deployment within 18 months?" |+| A | "Solution" | "Three-phase path: Focus, Expand, Scale" |----## 数据情境化(永不孤立呈现数据)+## Data Contextualization (Never Present Data in Isolation)-> **黄金法则**:永远不会孤立展示单一数据点。每个数字都需要上下文。+> **Golden Rule**: Never display a single data point in isolation. Every number needs context.-| 方法 | 模式 | 视觉实现 |-|------|------|---------|-| **时间对比** | "从 X 到 Y" | 折线图 + 箭头标注变化幅度 |-| **基准对标** | "X vs 行业均值 Y" | 柱状图中加灰色虚线基准线 |-| **竞品对比** | "我方 X vs 竞品 Y" | 并列柱状图,高亮自身数据 |-| **目标差距** | "实际 X / 目标 Y" | 进度条 + 差距标注 |-| **排名定位** | "位列第 N / 共 M" | 横向柱状图 + 高亮标记 |+| Method | Pattern | Visual Implementation |+|--------|---------|----------------------|+| **Time comparison** | "From X to Y" | Line chart + arrow annotating magnitude of change |+| **Benchmark** | "X vs industry average Y" | Bar chart with gray dashed baseline |+| **Competitive comparison** | "Us X vs Competitor Y" | Side-by-side bar chart, highlight own data |+| **Target gap** | "Actual X / Target Y" | Progress bar + gap annotation |+| **Ranking** | "Ranked #N of M" | Horizontal bar chart + highlight marker |-**数据标注三要素**:每个数据可视化必须包含 (1)数值本身(大字号粗体) (2)对比参照(基准线/同期/竞品) (3)含义解读("So what?")+**Data annotation three essentials**: Every data visualization must include (1) The value itself (large bold font) (2) Comparison reference (baseline / prior period / competitor) (3) Meaning interpretation ("So what?")```xml<text x="160" y="280" text-anchor="middle" font-size="42" font-weight="bold" fill="#1E293B">97.3%</text>-<text x="160" y="310" text-anchor="middle" font-size="13" fill="#64748B">行业均值 82% | 竞品 A 89%</text>-<text x="160" y="335" text-anchor="middle" font-size="12" fill="#059669">领先行业 15.3 个百分点</text>+<text x="160" y="310" text-anchor="middle" font-size="13" fill="#64748B">Industry avg 82% | Competitor A 89%</text>+<text x="160" y="335" text-anchor="middle" font-size="12" fill="#059669">Leading industry by 15.3 percentage points</text>```----## 金字塔原则(结论先行)+## Pyramid Principle (Conclusion First)-> 高管不关心你的*过程*,只关心*结果*。+> Executives don't care about your *process* — they care about *results*.```- ┌─────────────┐- │ 核心结论 │ ← 页面标题 / Takeaway- └──────┬──────┘- ┌─────────┼─────────┐- ┌───┴───┐ ┌───┴───┐ ┌───┴───┐- │论据 1 │ │论据 2 │ │论据 3 │ ← 主要支撑点- └───────┘ └───────┘ └───────┘+ ┌─────────────────┐+ │ Core Conclusion │ ← Page title / Takeaway+ └────────┬────────┘+ ┌───────────┼───────────┐+ ┌───┴───┐ ┌───┴───┐ ┌───┴───┐+ │ Arg 1 │ │ Arg 2 │ │ Arg 3 │ ← Key supporting points+ └───────┘ └───────┘ └───────┘```-| 层级 | 位置 | 字号 |-|------|------|------|-| 核心结论 | Takeaway Box | 16-18px 粗体 |-| 论据 | 内容区主体 | 14-16px |-| 支撑数据 | 图表/卡片 | 12-14px |+| Level | Position | Font Size |+|-------|----------|-----------|+| Core conclusion | Takeaway Box | 16-18px bold |+| Arguments | Content area body | 14-16px |+| Supporting data | Charts / cards | 12-14px |-**对比**:标题"市场调研结果"(错) -> "元宇宙需要 5-10 年才能规模化"(对);正文"我们调研了...发现了..."(错) -> "三个论据:(1)... (2)... (3)..."(对)+**Contrast**: Title "Market Research Results" (wrong) → "Metaverse needs 5-10 years to reach scale" (right); Body "We researched... and found..." (wrong) → "Three arguments: (1)... (2)... (3)..." (right)----## MBB 级布局模式+## MBB-level Layout Patterns-### 内容页标准结构(1280x720)+### Content Page Standard Structure (1280x720)```┌──────────────────────────────────┐-│ 渐变顶条 (0,0 → 1280,6) │+│ Gradient top bar (0,0 → 1280,6) │├──────────────────────────────────┤-│ 观点性标题 (x=40, y=50, 24px) │+│ Assertion title (x=40, y=50, 24px)│├──────────────────────────────────┤-│ Takeaway Box (x=40, y=75, │ ← 深色背景+白字,一句话结论+│ Takeaway Box (x=40, y=75, │ ← Dark background + white text, one-sentence conclusion│ w=1200, h=45) │├──────────────────────────────────┤-│ 内容区 (x=40, y=140, │ ← 图表/数据/分析+│ Content area (x=40, y=140, │ ← Charts / data / analysis│ w=1200, h=520) │├──────────────────────────────────┤-│ 来源 | CONFIDENTIAL | 页码 │ ← y=700, 10px+│ Source | CONFIDENTIAL | Page # │ ← y=700, 10px└──────────────────────────────────┘```-### 战略路径图+### Strategic Roadmap-三阶段横排,`<rect rx="8">` + 标题 + 举措列表,`<polygon>` 箭头连接:+Three phases laid out horizontally, `<rect rx="8">` + title + action list, `<polygon>` arrows connecting:```-聚焦核心(0-6月) ──> 扩展能力(6-12月) ──> 规模化(12-18月)-x=40,w=380 x=450,w=380 x=860,w=380+Focus Core (0-6mo) ──> Expand Capability (6-12mo) ──> Scale Up (12-18mo)+x=40,w=380 x=450,w=380 x=860,w=380```-### 对标分析矩阵+### Benchmarking Matrix-横向表格,我方行主题色高亮,其他灰色。领先指标绿色标记,落后红色标记。用 `<circle>` 或 `<rect>` 构建评分点。+Horizontal table; own row highlighted in theme color, others in gray. Leading indicators marked green, lagging marked red. Use `<circle>` or `<rect>` to build score points.-### 瀑布图(变化归因)+### Waterfall Chart (Change Attribution)-起点 -> 增减因素 -> 终点。正向因素绿色柱,负向红色柱,起止点深色柱,累计线虚线连接。+Start → increase/decrease factors → End. Positive factors green bars, negative factors red bars, start/end points dark bars, cumulative line as dashed connector.----## 颜色的战略性使用+## Strategic Use of Color-MBB 级配色极度克制,颜色为信息服务:+MBB-level color usage is extremely restrained — color serves information:-| 用途 | 方法 |-|------|------|-| **聚焦** | 目标数据主题色,其他全灰 |-| **降低认知负荷** | 同系列同色深浅区分(`fill-opacity` 1.0/0.6/0.3) |-| **语义** | 绿=正向,红=负向,灰=基准 |-| **品牌** | 渐变顶条/装饰线用品牌色 |+| Purpose | Method |+|---------|--------|+| **Focus** | Target data in theme color, everything else gray |+| **Reduce cognitive load** | Same series differentiated by opacity (`fill-opacity` 1.0/0.6/0.3) |+| **Semantics** | Green = positive, Red = negative, Gray = baseline |+| **Branding** | Gradient top bar / decorative lines in brand color |-**戒律**:主色调不超过 3 种;强调色全文仅 2-3 处;数据系列同色系深浅而非不同颜色;背景白色或极浅灰。+**Commandments**: No more than 3 primary colors; accent color used at most 2-3 places globally; data series use same-hue depth variations, not different colors; background white or very light gray.----## 图表 vs 表格选择矩阵+## Chart vs Table Selection Matrix-| 场景 | 推荐形式 | 原因 |-|------|---------|------|-| 比较 2-7 个类别 | **柱状图** | 视觉对比直观 |-| 时间趋势 | **折线图** | 时间序列清晰 |-| 精确数值/大量排名 | **表格** | 50 个点用柱状图会乱 |-| 占比构成 | **环形图** | 比饼图更现代 |-| 双维度定位 | **2x2 矩阵** | 战略象限分析 |-| 变化归因 | **瀑布图** | 因素拆解 |+| Scenario | Recommended Form | Reason |+|----------|-----------------|--------|+| Comparing 2-7 categories | **Bar chart** | Visual comparison is intuitive |+| Time trends | **Line chart** | Time series clarity |+| Precise values / large rankings | **Table** | 50 data points in a bar chart would be chaotic |+| Proportional composition | **Donut chart** | More modern than pie charts |+| Two-dimensional positioning | **2x2 matrix** | Strategic quadrant analysis |+| Change attribution | **Waterfall chart** | Factor decomposition |----## 演讲备注风格+## Speaker Notes Style-### 叙事基调+### Narrative Tone-面向**高管/决策者**,金字塔结构,每句话都有信息量。语气沉稳、权威、有洞察力。+Targeting **executives / decision-makers**. Pyramid structure — every sentence carries information. Composed, authoritative, and insightful tone.-### 控场标记+### Stage Direction Markers-| 标记 | 用途 | 示例 |-|------|------|------|-| `[停顿]` | 关键洞察后留白,让高管消化 | "这意味着我们正在错失千亿级市场。[停顿]" |-| `[环视]` | 观察决策者反应,判断是否展开 | "[环视] 各位如有疑问,我可以展开。" |-| `[数据]` | 数字口语化表达 | "[数据] 63% -> 将近三分之二" |-| `[对标]` | 强调对比基准 | "[对标] 相比行业均值 12%,我们 23% 几乎翻倍" |-| `[过渡]` | 段首承上启下,放在每页正文开头 | "[过渡] 承接战略框架,深入看实施路径。" |+| Marker | Purpose | Example |+|--------|---------|---------|+| `[Pause]` | Silence after key insight, let executives absorb | "This means we are missing a billion-dollar market. [Pause]" |+| `[Scan Room]` | Observe decision-makers' reactions, decide whether to elaborate | "[Scan Room] If there are questions, I can elaborate." |+| `[Data]` | Conversational number delivery | "[Data] 63% → nearly two-thirds" |+| `[Benchmark]` | Emphasize comparison baseline | "[Benchmark] Compared to the industry average of 12%, our 23% is nearly double" |+| `[Transition]` | Bridge from previous page, at start of each page's text | "[Transition] Building on the strategic framework, let's drill into the implementation path." |-### 备注写作要点+### Notes Writing Guidelines-- **金字塔结构**:结论 -> 论据 -> 细节-- **数据情境化**:每个数字有对比参照-- **高管语言**:"战略意义在于..."、"核心洞察是..."-- **备选机制**:标注"时间紧张可略过的内容",支持弹性时长-- **要点结构**:`要点:(1)核心洞察 (2)数据支撑 (3)战略意义`+- **Pyramid structure**: Conclusion → Arguments → Details+- **Data contextualization**: Every number has a comparison reference+- **Executive language**: "The strategic implication is...", "The core insight is..."+- **Flex mechanism**: Annotate "content that can be skipped if time is tight" for flexible duration+- **Key points structure**: `Key points: (1) Core insight (2) Data support (3) Strategic implication`-### 备注示例+### Notes Example```markdown-# 03_战略路径+# 03_strategic_path-[过渡] 明确了问题和机会之后,接下来是最关键的——我们的应对路径。+[Transition] Having clarified the problem and the opportunity, now comes the most critical part — our response path.-我们建议三步走策略。[停顿]+We recommend a three-phase strategy. [Pause]-第一步,聚焦。未来六个月集中资源攻克华东市场。-[数据] 华东贡献了将近三分之二的行业增量,[对标] 但我们渗透率仅为竞品 A 的一半。[停顿]+Phase one: Focus. Over the next six months, concentrate resources on conquering the Eastern China market.+[Data] Eastern China contributes nearly two-thirds of industry growth, [Benchmark] yet our penetration rate is only half of Competitor A's. [Pause]-第二步,扩展。以华东为样板,复制到华南和华北。-第三步,规模化。借助数字化平台实现全国覆盖。+Phase two: Expand. Use Eastern China as a template, replicate to Southern and Northern China.+Phase three: Scale. Leverage a digital platform for nationwide coverage.-[环视] 第一步的资源配置详见附录,需要现在展开吗?+[Scan Room] The resource allocation for phase one is in the appendix — would you like me to walk through it now?-要点:(1)聚焦-扩展-规模化三步走 (2)华东优先的数据支撑 (3)18 个月全面部署-时长:3 分钟-备选:[时间紧张可跳过二三步细节,直接到财务影响]+Key points: (1) Focus-Expand-Scale three-phase approach (2) Data-backed Eastern China priority (3) 18-month full deployment+Duration: 3 minutes+Flex: [If time is tight, skip phase two and three details and go straight to financial impact]```----## MBB 级质量检查补充+## MBB-level Quality Checklist Supplement-### 内容层面+### Content Level-- [ ] **SCQA 完整**:整体遵循情境-复杂性-问题-答案结构-- [ ] **数据情境化**:每个数据点有对比参照-- [ ] **结论先行**:每页 Takeaway Box 有一句话结论-- [ ] **MECE 原则**:分类分析互斥穷尽+- [ ] **SCQA complete**: Overall follows Situation-Complication-Question-Answer structure+- [ ] **Data contextualized**: Every data point has a comparison reference+- [ ] **Conclusion first**: Every page's Takeaway Box has a one-sentence conclusion+- [ ] **MECE principle**: Categorized analysis is mutually exclusive and collectively exhaustive-### 视觉层面+### Visual Level-- [ ] **颜色有意图**:配色服务于信息传达-- [ ] **留白充足**:不拥挤,让信息"呼吸"-- [ ] **视觉层次**:结论 > 论据 > 细节,字号/粗细区分-- [ ] **品牌一致**:渐变顶条、页脚全文统一+- [ ] **Color with intent**: Colors serve information delivery+- [ ] **Ample whitespace**: Not crowded; information can "breathe"+- [ ] **Visual hierarchy**: Conclusion > Arguments > Details, differentiated by font size/weight+- [ ] **Brand consistency**: Gradient top bar and footer unified throughout-### 备注层面+### Notes Level-- [ ] **金字塔结构**:每页结论先行-- [ ] **控场标记完整**:关键位置有 [停顿][环视]-- [ ] **备选内容标注**:支持弹性时长+- [ ] **Pyramid structure**: Every page is conclusion-first+- [ ] **Stage markers complete**: [Pause] and [Scan Room] at key positions+- [ ] **Flex content annotated**: Supports flexible durationdiff --git a/skills/ppt-master/references/executor-consultant.md b/skills/ppt-master/references/executor-consultant.mdindex 49522b53..cdb833ce 100644--- a/skills/ppt-master/references/executor-consultant.md+++ b/skills/ppt-master/references/executor-consultant.md@@ -1,197 +1,197 @@-# Executor Consultant -- 咨询风格+# Executor Consultant — Consulting Style-> 基础准则见 executor-base.md,技术约束见 shared-standards.md+> Common guidelines: executor-base.md. Technical constraints: shared-standards.md.----## 角色定位+## Role Definition-数据驱动的咨询风格 SVG 设计执行师。适用于商业分析报告、市场调研、运营复盘、战略建议等**一般咨询**场景。强调信息的结构化呈现与数据可视化,风格简洁、清晰、专业。+A data-driven, consulting-style SVG design executor. Suitable for business analysis reports, market research, operational reviews, strategic recommendations, and other **general consulting** scenarios. Emphasizes structured information presentation and data visualization; clean, clear, and professional style.----## Consultant 特有的数据可视化技巧+## Consultant-specific Data Visualization Techniques-### 1. KPI 仪表盘设计+### 1. KPI Dashboard Design-KPI 卡片是咨询报告最常用的元素,标准布局(1280x720):+KPI cards are the most common element in consulting reports. Standard layout (1280x720):```-4 卡片布局:每卡 280x180,间距 30- 卡片 1: x=45, y=160- 卡片 2: x=355, y=160- 卡片 3: x=665, y=160- 卡片 4: x=975, y=160+4-card layout: each card 280x180, gap 30+ Card 1: x=45, y=160+ Card 2: x=355, y=160+ Card 3: x=665, y=160+ Card 4: x=975, y=160```-**卡片内部结构**(自上而下):+**Card internal structure** (top to bottom):-| 区域 | 内容 | 字号 | 样式 |-|------|------|------|------|-| 图标行 | data-icon 图标 | 32x32 | 主题色 |-| 指标名 | "月活跃用户" | 14px | 灰色 #64748B |-| 核心数字 | "1.2M" | 36-42px | 粗体,深色 |-| 趋势标注 | "+12.3% vs 上月" | 12px | 绿色=增/红色=降 |+| Area | Content | Font Size | Style |+|------|---------|-----------|-------|+| Icon row | data-icon icon | 32x32 | Theme color |+| Metric name | "Monthly Active Users" | 14px | Gray #64748B |+| Core number | "1.2M" | 36-42px | Bold, dark color |+| Trend annotation | "+12.3% vs last month" | 12px | Green=up / Red=down |-**趋势箭头规范**:-- 上升:`arrow-trend-up` 图标 + 绿色文字-- 下降:`arrow-trend-down` 图标 + 红色文字-- 持平:横线图标 + 灰色文字+**Trend arrow conventions**:+- Up: `arrow-trend-up` icon + green text+- Down: `arrow-trend-down` icon + red text+- Flat: horizontal line icon + gray text-### 2. 图表配色规范+### 2. Chart Color Conventions-咨询风格图表使用**同色系深浅渐变**,而非彩虹色:+Consulting-style charts use **monochromatic depth gradients** rather than rainbow colors:```-主系列: 主题色 100% opacity-对比系列: 主题色 60% opacity-基准线: #94A3B8(灰色虚线)-高亮: 强调色(仅用于关键数据点)+Primary series: Theme color 100% opacity+Comparison series: Theme color 60% opacity+Baseline: #94A3B8 (gray dashed line)+Highlight: Accent color (only for key data points)```-### 3. 数据标注原则+### 3. Data Annotation Principles-- **数据标签直接标注**:柱状图顶部放数值,无需图例-- **趋势线加注释**:关键拐点处添加文字说明("政策调整"、"产品上线")-- **对比基准线**:行业均值/目标值用灰色虚线标注-- **单位统一**:同一图表中保持一致的数值单位和精度+- **Direct data labels**: Place values at the top of bar charts — no legend needed+- **Annotated trend lines**: Add text notes at key inflection points ("Policy change", "Product launch")+- **Comparison baselines**: Mark industry average / target values with gray dashed lines+- **Consistent units**: Maintain the same numeric units and precision within a chart-### 4. 表格设计+### 4. Table Design-咨询报告经常使用表格呈现精确数据:+Consulting reports frequently use tables for precise data:-| 设计要素 | 规范 |-|----------|------|-| 表头 | 深色背景 + 白色文字,font-weight="bold" |-| 斑马纹 | 奇偶行交替使用 `fill-opacity="0.05"` 的浅色底 |-| 数值对齐 | 数字右对齐,文本左对齐 |-| 高亮行 | 用强调色 `fill-opacity="0.1"` 标记重点行 |-| 边框 | 仅用水平线分隔行,避免完整网格线 |+| Design Element | Specification |+|----------------|---------------|+| Header | Dark background + white text, font-weight="bold" |+| Zebra striping | Alternate rows with `fill-opacity="0.05"` light background |+| Number alignment | Numbers right-aligned, text left-aligned |+| Highlighted row | Mark key rows with accent color `fill-opacity="0.1"` |+| Borders | Use horizontal lines only to separate rows; avoid full grid lines |----## 咨询专用布局模式+## Consulting-specific Layout Patterns-### MECE 分解图+### MECE Decomposition Tree-主干居左,分支向右展开,互斥穷尽:+Main trunk on the left, branches expanding rightward — mutually exclusive, collectively exhaustive:```-主指标 ──┬── 分支 A(占比 45%)- ├── 分支 B(占比 30%)- ├── 分支 C(占比 20%)- └── 分支 D(占比 5%)+Main metric ──┬── Branch A (45%)+ ├── Branch B (30%)+ ├── Branch C (20%)+ └── Branch D (5%)```-- 使用 `<line>` 连接主干与分支-- 每个分支配 `<rect>` 容器 + 百分比标注-- 总和必须 = 100%(或明确标注"其他")+- Use `<line>` to connect trunk to branches+- Each branch has a `<rect>` container + percentage annotation+- Sum must = 100% (or explicitly label "Other")-### 驱动因素树+### Driver Factor Tree-顶层指标 -> 分解因素 -> 措施,适合业绩归因分析:+Top-level metric → decomposed factors → actions. Ideal for performance attribution analysis:```-收入增长 15%- ├── 客单价 +8% → 高端产品线扩展- ├── 客户数 +5% → 新渠道获客- └── 复购率 +2% → 会员体系优化+Revenue growth 15%+ ├── Average order value +8% → Premium product line expansion+ ├── Customer count +5% → New channel acquisition+ └── Repurchase rate +2% → Loyalty program optimization```-### 左图右文(图表解读)+### Left-chart Right-text (Chart Interpretation)-咨询报告核心版式:左侧放图表,右侧放关键解读:+Core consulting report layout: chart on the left, key insights on the right:```-图表区: x=40, y=120, w=700, h=480-解读区: x=780, y=120, w=460, h=480- - 核心结论(粗体,16px)- - 3-5 条 bullet points(14px)- - 数据来源(12px,灰色)+Chart area: x=40, y=120, w=700, h=480+Insight area: x=780, y=120, w=460, h=480+ - Core conclusion (bold, 16px)+ - 3-5 bullet points (14px)+ - Data source (12px, gray)```----## 专业表达规范+## Professional Expression Standards-### 页面标题+### Page Titles-咨询风格的页面标题应是**观点性标题**(Assertion Headline),而非描述性标题:+Consulting-style page titles should be **assertion headlines**, not descriptive titles:-| 类型 | 描述性(避免) | 观点性(推荐) |-|------|---------------|---------------|-| 市场 | "市场概况" | "国内市场年增速 23%,显著领先全球均值" |-| 竞品 | "竞品分析" | "三大竞品在渠道覆盖上存在明显短板" |-| 财务 | "财务数据" | "毛利率连续四季度提升,突破行业天花板" |+| Type | Descriptive (avoid) | Assertion (recommended) |+|------|---------------------|------------------------|+| Market | "Market Overview" | "Domestic market grows 23% YoY, significantly outpacing global average" |+| Competition | "Competitive Analysis" | "Three major competitors show clear weaknesses in channel coverage" |+| Finance | "Financial Data" | "Gross margin improved for four consecutive quarters, breaking industry ceiling" |-### 数据源标注+### Data Source Attribution-每个含数据的页面底部必须标注来源:+Every data-containing page must include a source note at the bottom:```xml<text x="40" y="700" font-size="10" fill="#94A3B8">- 来源:国家统计局 2025 年年报;团队内部分析+ Source: National Bureau of Statistics 2025 Annual Report; Internal team analysis</text>```-### 核心观点区+### Key Takeaway Box-咨询风格内容页应在标题下方设置**核心观点区**(Takeaway Box):+Consulting-style content pages should include a **Takeaway Box** below the title:```-位置: x=40, y=80, w=1200, h=50-背景: 浅色主题色底(fill-opacity="0.08")-文本: 14-16px,一句话总结本页核心观点+Position: x=40, y=80, w=1200, h=50+Background: Light theme color (fill-opacity="0.08")+Text: 14-16px, one-sentence summary of the page's core takeaway```----## 演讲备注风格+## Speaker Notes Style-### 叙事基调+### Narrative Tone-Consultant 风格的演讲备注采用**结论驱动**的表达,先说结论再展开论据。语气专业、精炼、有说服力。+Consultant-style speaker notes use a **conclusion-driven** approach — state the conclusion first, then present supporting evidence. Professional, concise, and persuasive tone.-### 控场标记+### Stage Direction Markers-| 标记 | 用途 | 示例 |-|------|------|------|-| `[停顿]` | 关键结论后留白,让听众消化 | "这意味着我们的市场份额正在被蚕食。[停顿]" |-| `[数据]` | 提示将数字口语化表达 | "[数据] 85% -> 超过八成客户反馈了这个问题" |-| `[过渡]` | 段首承上启下,必须放在每页正文开头 | "[过渡] 基于刚才的分析,我们来看具体建议。" |+| Marker | Purpose | Example |+|--------|---------|---------|+| `[Pause]` | Silence after key conclusions, let the audience absorb | "This means our market share is being eroded. [Pause]" |+| `[Data]` | Cue to verbalize numbers conversationally | "[Data] 85% → more than eight out of ten customers reported this issue" |+| `[Transition]` | Bridge from previous page, must be at start of each page's text | "[Transition] Based on that analysis, let's look at specific recommendations." |-### 备注写作要点+### Notes Writing Guidelines-- **结论先行**:每页备注第一句即为核心观点-- **数据口语化**:30% -> "约三成",85% -> "超过八成",2.5x -> "两倍半"-- **论据紧跟**:结论后立即给出 2-3 个支撑数据/事实-- **专业措辞**:使用"洞察"、"驱动因素"、"核心抓手"等咨询术语-- **要点结构**:`要点:(1)核心结论 (2)支撑数据 (3)下一步建议`+- **Conclusion first**: The first sentence of each page's notes is the core takeaway+- **Conversational data**: 30% → "roughly one-third", 85% → "more than eight out of ten", 2.5x → "two and a half times"+- **Evidence follows immediately**: After the conclusion, provide 2-3 supporting data points/facts+- **Professional terminology**: Use terms like "insight", "driver", "key lever" etc.+- **Key points structure**: `Key points: (1) Core conclusion (2) Supporting data (3) Next steps`-### 备注示例+### Notes Example```markdown-# 03_关键发现+# 03_key_findings-[过渡] 基于前面的市场扫描,我们提炼出三个关键发现。+[Transition] Based on our market scan, we have distilled three key findings.-第一,用户增长的主要驱动力正在从获客转向留存。-[数据] 新客获取成本同比上涨了将近四成,但复购率提升贡献了超过六成的收入增量。[停顿]+First, the primary growth driver is shifting from acquisition to retention.+[Data] New customer acquisition cost rose nearly 40% year-over-year, yet improved repurchase rates contributed over 60% of revenue growth. [Pause]-第二,下沉市场的增速显著高于一二线城市。-第三,25-35 岁女性用户群的 ARPU 值是整体均值的 1.8 倍。+Second, lower-tier market growth significantly outpaces tier-1 and tier-2 cities.+Third, the 25-35 female user segment has an ARPU 1.8x the overall average.-要点:(1)增长引擎从获客转向留存 (2)下沉市场机会窗口 (3)高价值人群画像-时长:2 分钟+Key points: (1) Growth engine shifting from acquisition to retention (2) Lower-tier market opportunity window (3) High-value user persona+Duration: 2 minutes```----## 自检补充(Consultant 特有)+## Self-check Supplement (Consultant-specific)-- [ ] 数据与源数据一致,无编造-- [ ] 每个数据页底部有来源标注-- [ ] 页面标题是观点性而非描述性-- [ ] KPI 卡片有趋势箭头和对比标注-- [ ] 图表配色统一,使用同色系而非彩虹色-- [ ] 备注结论先行,数据口语化+- [ ] Data matches source data — no fabrication+- [ ] Every data page has a source attribution at the bottom+- [ ] Page titles are assertion-based, not descriptive+- [ ] KPI cards have trend arrows and comparison annotations+- [ ] Chart colors are unified, using monochromatic scheme rather than rainbow+- [ ] Notes are conclusion-first with conversational datadiff --git a/skills/ppt-master/references/executor-general.md b/skills/ppt-master/references/executor-general.mdindex 7a54f1af..d594e15c 100644--- a/skills/ppt-master/references/executor-general.md+++ b/skills/ppt-master/references/executor-general.md@@ -1,122 +1,122 @@-# Executor General -- 创意通用风格+# Executor General — Creative Versatile Style-> 基础准则见 executor-base.md,技术约束见 shared-standards.md+> Common guidelines: executor-base.md. Technical constraints: shared-standards.md.----## 角色定位+## Role Definition-创意型、通用风格的 SVG 设计执行师。适用于产品介绍、培训讲义、方案汇报、营销宣传等**非咨询类**场景。强调视觉表现力与信息趣味性,在专业与亲和之间取得平衡。+A creative, versatile-style SVG design executor. Suitable for product introductions, training materials, proposal presentations, marketing campaigns, and other **non-consulting** scenarios. Emphasizes visual impact and information engagement, striking a balance between professionalism and approachability.----## General 特有布局技巧+## General-specific Layout Techniques-### 1. 灵活多变的版式+### 1. Flexible and Varied Layouts-General 风格不拘泥于固定模板,可根据内容自由选择版式:+The General style is not confined to fixed templates; layouts can be freely chosen based on content:-| 版式 | 适用场景 | 布局要点(1280x720) |-|------|----------|---------------------|-| 全图背景+文字叠加 | 封面、情感渲染页 | `<image>` 铺满画布 + 半透明遮罩 + 居中标题 |-| 左右分栏(图文混排) | 功能介绍、对比说明 | 左 x=40,w=580 / 右 x=660,w=580 |-| 三栏卡片 | 特性罗列、团队介绍 | x=40,450,860 各 w=380,等高卡片 |-| 上下分区 | 时间线、流程展示 | 上区标题+说明 h=250 / 下区图表+内容 h=420 |-| 中心辐射 | 核心概念、生态图 | 中心元素 + 4-6 个周围节点,连线指向中心 |-| 瀑布流/Z 字型 | 故事叙述、案例展示 | 内容块交替左右排列,引导视线 Z 字移动 |+| Layout | Use Case | Layout Details (1280x720) |+|--------|----------|--------------------------|+| Full-image background + text overlay | Covers, emotional pages | `<image>` fills canvas + semi-transparent overlay + centered title |+| Left-right split (image-text mix) | Feature introductions, comparisons | Left x=40,w=580 / Right x=660,w=580 |+| Three-column cards | Feature lists, team introductions | x=40,450,860 each w=380, equal-height cards |+| Top-bottom split | Timelines, process flows | Top area: title+description h=250 / Bottom area: charts+content h=420 |+| Center-radiating | Core concepts, ecosystem diagrams | Center element + 4-6 surrounding nodes, lines pointing to center |+| Waterfall / Z-pattern | Storytelling, case studies | Content blocks alternate left-right, guiding the eye in a Z-pattern |-### 2. 视觉节奏控制+### 2. Visual Rhythm Control-- **信息密度交替**:高密度数据页之后接一页"呼吸页"(大图/金句/过渡),避免观众疲劳-- **视觉重量平衡**:深色/大面积元素为"重",浅色/小元素为"轻",左右/上下应均衡-- **重复与变化**:同一章节内保持版式一致性,不同章节间适当变化以维持新鲜感+- **Information density alternation**: Follow a data-heavy page with a "breathing page" (large image / quote / transition) to prevent audience fatigue+- **Visual weight balance**: Dark/large-area elements are "heavy", light/small elements are "light" — balance left-right/top-bottom+- **Repetition and variation**: Maintain layout consistency within a chapter; vary between chapters to maintain freshness-### 3. 装饰元素运用+### 3. Decorative Element Usage-| 元素 | 用法 | 注意事项 |-|------|------|---------|-| 渐变色块 | 背景分区、标题底色 | 使用 `<linearGradient>` / `<radialGradient>`,限 2-3 色 |-| 圆角矩形卡片 | 内容容器、功能模块 | `rx="12"` 配合轻投影(用浅色 rect 模拟) |-| 图标点缀 | 列表项前缀、功能标识 | 使用 `data-icon` 占位符,大小 32-48px |-| 编号圆圈 | 步骤流程、排名列表 | `<circle>` + 居中 `<text>`,主题色填充 |-| 分隔线 | 内容分区 | `<line>` 或 `<rect height="2">`,opacity 0.2-0.3 |+| Element | Usage | Notes |+|---------|-------|-------|+| Gradient blocks | Background zones, title backing | Use `<linearGradient>` / `<radialGradient>`, limit to 2-3 colors |+| Rounded rectangle cards | Content containers, feature modules | `rx="12"` with light shadow (simulate with lighter rect) |+| Icon accents | List item prefixes, feature markers | Use `data-icon` placeholders, size 32-48px |+| Numbered circles | Step flows, ranked lists | `<circle>` + centered `<text>`, theme color fill |+| Divider lines | Content separation | `<line>` or `<rect height="2">`, opacity 0.2-0.3 |----## 视觉策略+## Visual Strategy-### 色彩运用+### Color Usage-- **主题色大胆使用**:封面、章节页可大面积使用主题色背景-- **渐变增强层次**:标题栏、卡片背景可使用同色系渐变-- **对比创造焦点**:关键数字/词汇使用强调色,与周围内容形成反差-- **配色情绪匹配**:科技感用冷色调,活力感用暖色调,稳重感用深色调+- **Bold use of theme color**: Covers and chapter pages can use large areas of theme color background+- **Gradients enhance depth**: Title bars and card backgrounds can use same-hue gradients+- **Contrast creates focus**: Key numbers/words use accent color, creating contrast with surroundings+- **Color-mood matching**: Cool tones for tech feel, warm tones for energy, dark tones for gravitas-### 图片处理策略+### Image Handling Strategy-| 场景 | 策略 | SVG 实现 |-|------|------|---------|-| 全屏背景图 | 图片铺满 + 暗色渐变遮罩 | `preserveAspectRatio="xMidYMid slice"` + 渐变 rect |-| 竖图展示 | 左侧/右侧放置,保持原比例 | 控制宽度,高度自适应 |-| 多图拼接 | 网格排列,统一尺寸 | 等宽等高的 `<image>` 矩阵 |-| 人物照片 | 圆形裁切效果 | `<circle>` 背景 + 方形图片叠加(后处理裁剪) |+| Scenario | Strategy | SVG Implementation |+|----------|----------|-------------------|+| Full-screen background | Image fills + dark gradient overlay | `preserveAspectRatio="xMidYMid slice"` + gradient rect |+| Portrait image display | Place left/right, maintain original ratio | Control width, height adapts |+| Multi-image grid | Grid arrangement, uniform sizing | Equal-width equal-height `<image>` matrix |+| Person photo | Circular crop effect | `<circle>` background + square image overlay (post-processing crops) |-### 排版层次+### Typography Hierarchy```-标题层 → 28-36px,粗体,主题色或白色-副标题层 → 20-24px,中等粗细,次要色-正文层 → 16-18px,常规,深灰色-注释层 → 12-14px,浅灰色,底部对齐+Title layer → 28-36px, bold, theme color or white+Subtitle layer → 20-24px, medium weight, secondary color+Body layer → 16-18px, regular, dark gray+Annotation layer → 12-14px, light gray, bottom-aligned```----## 演讲备注风格+## Speaker Notes Style-### 叙事基调+### Narrative Tone-General 风格的演讲备注采用**口语化叙述**,像在和观众对话,而非宣读报告。语气自然、有节奏感,适当加入修辞手法。+General style speaker notes use **conversational narration** — like talking with the audience, not reading a report. Natural tone with rhythm, using rhetorical devices where appropriate.-### 控场标记+### Stage Direction Markers-| 标记 | 用途 | 示例 |-|------|------|------|-| `[停顿]` | 关键展示后留白,让观众消化信息 | "这个数字意味着什么?[停顿] 意味着每 3 个用户中就有 1 个..." |-| `[互动]` | 提问或引导观众参与,激活注意力 | "[互动] 在座各位有多少人体验过这个功能?" |-| `[过渡]` | 段首承上启下,必须放在每页正文开头 | "[过渡] 了解了背景之后,我们来看看具体怎么做。" |+| Marker | Purpose | Example |+|--------|---------|---------|+| `[Pause]` | Silence after key reveal, letting the audience absorb | "What does this number mean? [Pause] It means 1 in every 3 users..." |+| `[Interactive]` | Ask questions or guide audience participation | "[Interactive] How many of you have used this feature?" |+| `[Transition]` | Bridge from previous page, must be at start of each page's text | "[Transition] Now that we understand the context, let's see how it works." |-### 备注写作要点+### Notes Writing Guidelines-- **讲故事**:用"场景-冲突-解决"结构组织每页叙事-- **用比喻**:将抽象概念具象化("这就像给系统装了一个涡轮增压器")-- **设悬念**:适时抛出问题,下一页给出答案-- **口语化数据**:30% -> "将近三分之一",2.5 倍 -> "翻了一番还多"-- **要点结构**:`要点:(1)核心信息 (2)支撑论据 (3)行动呼吁`+- **Tell stories**: Use "scenario-conflict-resolution" structure for each page's narrative+- **Use metaphors**: Make abstract concepts tangible ("It's like adding a turbocharger to the system")+- **Create suspense**: Pose questions at the right time, answer on the next page+- **Conversational data**: 30% → "nearly one-third", 2.5x → "more than doubled"+- **Key points structure**: `Key points: (1) Core message (2) Supporting evidence (3) Call to action`-### 备注示例+### Notes Example```markdown-# 03_核心优势+# 03_key_advantages-[过渡] 说完了市场的现状,大家可能会问:那我们的机会在哪里?+[Transition] Having covered the market landscape, you might be wondering: where is our opportunity?-我们的核心优势可以用三个词概括:快、准、省。-快——部署时间从 3 个月缩短到 2 周;[停顿]-准——识别准确率达到 97.3%,远超行业平均的 82%;-省——综合成本降低将近三分之一。+Our core advantages can be summed up in three words: Fast, Accurate, Efficient.+Fast — deployment time cut from 3 months to 2 weeks; [Pause]+Accurate — recognition accuracy at 97.3%, far exceeding the industry average of 82%;+Efficient — overall costs reduced by nearly one-third.-[互动] 如果你是决策者,这三个数字中哪个最打动你?+[Interactive] If you were the decision-maker, which of these three numbers would impress you most?-要点:(1)三大差异化优势 (2)量化数据支撑 (3)引导思考-时长:2 分钟+Key points: (1) Three differentiating advantages (2) Quantitative data support (3) Prompt for reflection+Duration: 2 minutes```----## 自检补充(General 特有)+## Self-check Supplement (General-specific)-- [ ] 视觉节奏合理:信息密集页与呼吸页交替-- [ ] 装饰元素适度:服务于内容而非喧宾夺主-- [ ] 图文比例恰当:非纯文字堆砌,有视觉亮点-- [ ] 备注口语化:读出来像说话,而非念稿+- [ ] Visual rhythm is reasonable: data-dense pages alternate with breathing pages+- [ ] Decorative elements are moderate: serving content, not overshadowing it+- [ ] Image-text ratio is appropriate: not just text walls, visual highlights present+- [ ] Notes are conversational: reads like speaking, not reading a scriptdiff --git a/skills/ppt-master/references/image-generator.md b/skills/ppt-master/references/image-generator.mdindex 63f15794..31c051f5 100644--- a/skills/ppt-master/references/image-generator.md+++ b/skills/ppt-master/references/image-generator.md@@ -1,417 +1,417 @@-# Image_Generator 参考手册+# Image_Generator Reference Manual-> 本文件为 Image_Generator 角色的精简参考。通用标准(SVG 技术约束、画布格式、后处理流程等)见 [shared-standards.md](./shared-standards.md)。+> This file is the streamlined reference for the Image_Generator role. Common standards (SVG technical constraints, canvas formats, post-processing pipeline, etc.) are in [shared-standards.md](./shared-standards.md).-## 核心使命+## Core Mission-接收 Strategist 输出的《设计规范与内容大纲》中的「图片资源清单」,为每张待生成的图片创建优化提示词,并通过 AI 工具生成图片,保存到项目 `images/` 目录。+Receive the "Image Resource List" from the Design Specification & Content Outline output by the Strategist, create optimized prompts for each image pending generation, generate images via AI tools, and save them to the project's `images/` directory.-**触发条件**: 需要生成 AI 图片时(独立使用或流程中调用)+**Trigger condition**: When AI image generation is needed (standalone use or invoked within pipeline)-| 模式 | 触发方式 | 说明 |-|------|----------|------|-| **独立使用** | 直接说明图片需求 | 生成单张或多张 AI 图片 |-| **流程中使用** | `generate-ppt` 选择 AI 生成图片 | 为项目批量生成图片资源 |+| Mode | Trigger | Description |+|------|---------|-------------|+| **Standalone** | Directly describe image needs | Generate single or multiple AI images |+| **In-pipeline** | `generate-ppt` with AI image generation selected | Batch-generate image assets for a project |-> 流程中下一步:Executor 生成 SVG+> Next step in pipeline: Executor generates SVGs----## 1. 输入与输出+## 1. Input & Output-### 输入+### Input-- **设计规范与内容大纲**(来自 Strategist):项目主题、目标受众、设计风格、配色方案、画布格式-- **图片资源清单**(关键输入):+- **Design Specification & Content Outline** (from Strategist): project theme, target audience, design style, color scheme, canvas format+- **Image Resource List** (key input):- | 文件名 | 尺寸 | 用途 | 类型 | 状态 | 生成描述 |- |--------|------|------|------|------|----------|- | cover_bg.png | 1920x1080 | 封面背景 | 背景图 | 待生成 | 现代科技感抽象背景,深蓝渐变 |+ | Filename | Dimensions | Purpose | Type | Status | Generation Description |+ |----------|-----------|---------|------|--------|----------------------|+ | cover_bg.png | 1920x1080 | Cover background | Background | Pending | Modern tech abstract background, deep blue gradient |-### 输出+### Output-| 产出物 | 路径/说明 | 要求 |-|--------|-----------|------|-| 提示词文档 | `项目/images/image_prompts.md` | **必须**用文件写入工具保存,不能仅在对话中输出 |-| 优化提示词 | 每张图片独立提示词 | 可直接用于 AI 图像生成工具,兼做 alt 文本 |-| 图片文件 | `项目/images/` 目录 | 按清单文件名命名 |-| 更新后的清单 | 状态变更 | 「待生成」→「已生成」 |+| Deliverable | Path / Description | Requirements |+|------------|-------------------|--------------|+| Prompt document | `project/images/image_prompts.md` | **Must** be saved using file write tool — cannot just be output in conversation |+| Optimized prompts | Individual prompt per image | Directly usable with AI image generation tools; doubles as alt text |+| Image files | `project/images/` directory | Named per the resource list filenames |+| Updated list | Status changes | "Pending" → "Generated" |----## 2. 统一提示词结构+## 2. Unified Prompt Structure-### 2.1 标准输出格式+### 2.1 Standard Output Format-每张图片必须按以下格式输出:+Every image must be output in the following format:```markdown-### 图片 N: {文件名}+### Image N: {filename}-| 属性 | 值 |-| -------- | ------------------------------------ |-| 用途 | {在哪页/承担什么功能} |-| 类型 | {背景图/插画/实景照片/图表/装饰图案} |-| 尺寸 | {宽}x{高} ({宽高比}) |-| 原始描述 | {用户在清单中提供的描述} |+| Attribute | Value |+| --------- | ----- |+| Purpose | {which page / what function} |+| Type | {Background / Illustration / Photography / Diagram / Decorative} |+| Dimensions | {width}x{height} ({aspect ratio}) |+| Original description | {description provided by user in the list} |-**提示词 (Prompt)**:-{主体描述}, {风格指令}, {色彩指令}, {构图指令}, {质量指令}+**Prompt**:+{subject description}, {style directive}, {color directive}, {composition directive}, {quality directive}-**负面提示词 (Negative Prompt)**:-{需要排除的元素}+**Negative Prompt**:+{elements to exclude}-**图片描述 (Alt Text)**:-> {中文描述,用于无障碍访问和图片说明}+**Alt Text**:+> {Description for accessibility and image captions}```-### 2.2 提示词组成要素+### 2.2 Prompt Components-| 要素 | 说明 | 示例 |-|------|------|------|-| 主体描述 | 核心内容 | `Abstract geometric shapes`, `Team collaboration scene` |-| 风格指令 | 视觉风格 | `flat design`, `3D isometric`, `watercolor style` |-| 色彩指令 | 配色方案 | `color palette: navy blue (#1E3A5F), gold (#D4AF37)` |-| 构图指令 | 布局比例 | `16:9 aspect ratio`, `centered composition` |-| 质量指令 | 分辨率质量 | `high quality`, `4K resolution`, `sharp details` |-| 负面提示词 | 排除元素 | `text, watermark, blurry, low quality` |+| Component | Description | Example |+|-----------|-------------|---------|+| Subject description | Core content | `Abstract geometric shapes`, `Team collaboration scene` |+| Style directive | Visual style | `flat design`, `3D isometric`, `watercolor style` |+| Color directive | Color scheme | `color palette: navy blue (#1E3A5F), gold (#D4AF37)` |+| Composition directive | Layout ratio | `16:9 aspect ratio`, `centered composition` |+| Quality directive | Resolution quality | `high quality`, `4K resolution`, `sharp details` |+| Negative prompt | Exclude elements | `text, watermark, blurry, low quality` |-### 2.3 风格关键词速查+### 2.3 Style Keywords Quick Reference-| 设计风格 | 推荐图片风格 | 核心关键词 |-|----------|-------------|------------|-| 通用灵活 | 现代插画、扁平设计 | `modern`, `flat design`, `gradient`, `vibrant colors` |-| 一般咨询 | 简洁专业、商务风 | `professional`, `clean`, `corporate`, `minimalist` |-| 顶级咨询 | 高端简约、抽象几何 | `premium`, `sophisticated`, `geometric`, `abstract`, `elegant` |+| Design Style | Recommended Image Style | Core Keywords |+|-------------|------------------------|---------------|+| General Versatile | Modern illustration, flat design | `modern`, `flat design`, `gradient`, `vibrant colors` |+| General Consulting | Clean professional, corporate | `professional`, `clean`, `corporate`, `minimalist` |+| Top Consulting | Premium minimal, abstract geometric | `premium`, `sophisticated`, `geometric`, `abstract`, `elegant` |-### 2.4 色彩整合方法+### 2.4 Color Integration Method-从设计规范提取配色,转换为提示词:+Extract colors from design spec, convert to prompt directives:```-主导色: #1E3A5F (深海蓝) → "deep navy blue (#1E3A5F)"-辅助色: #F8F9FA (浅灰) → "light gray (#F8F9FA)"-强调色: #D4AF37 (金) → "gold accent (#D4AF37)"+Primary: #1E3A5F (Deep Navy) → "deep navy blue (#1E3A5F)"+Secondary: #F8F9FA (Light Gray) → "light gray (#F8F9FA)"+Accent: #D4AF37 (Gold) → "gold accent (#D4AF37)"-完整指令: "color palette: deep navy blue (#1E3A5F), light gray (#F8F9FA), gold accent (#D4AF37)"+Full directive: "color palette: deep navy blue (#1E3A5F), light gray (#F8F9FA), gold accent (#D4AF37)"```-### 2.5 画布格式与宽高比+### 2.5 Canvas Format & Aspect Ratio-| 画布格式 | 背景图宽高比 | 建议分辨率 |-|----------|-------------|------------|-| PPT 16:9 | 16:9 | 1920x1080 或 2560x1440 |+| Canvas Format | Background Aspect Ratio | Recommended Resolution |+|--------------|------------------------|----------------------|+| PPT 16:9 | 16:9 | 1920x1080 or 2560x1440 || PPT 4:3 | 4:3 | 1600x1200 |-| 小红书 | 3:4 | 1242x1660 |-| 朋友圈 | 1:1 | 1080x1080 |+| Xiaohongshu (RED) | 3:4 | 1242x1660 |+| WeChat Moments | 1:1 | 1080x1080 || Story | 9:16 | 1080x1920 |-> Nano Banana 支持的宽高比:`1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`+> Nano Banana supported aspect ratios: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`----## 3. 图片类型分类与处理+## 3. Image Type Classification & Handling-### 类型判断流程+### Type Determination Flow-1. 全页/大面积铺底 → **背景图** (3.1)-2. 真实场景/人物/产品 → **实景照片** (3.2)-3. 扁平/插画/卡通风格 → **插画配图** (3.3)-4. 流程/架构/关系 → **图表/架构图** (3.4)-5. 局部装饰/纹理 → **装饰图案** (3.5)+1. Full-page / large-area backdrop → **Background** (3.1)+2. Real scenes / people / products → **Photography** (3.2)+3. Flat / illustration / cartoon style → **Illustration** (3.3)+4. Process / architecture / relationships → **Diagram** (3.4)+5. Partial decoration / texture → **Decorative Pattern** (3.5)-### 3.1 背景图 (Background)+### 3.1 Background-**识别特征**: 封面、章节页的全页背景,需承载文字叠加+**Identifying characteristics**: Full-page background for covers or chapter pages; must support text overlay-| 要点 | 说明 |-|------|------|-| 强调背景属性 | 添加 `background`, `backdrop` |-| 预留文字区域 | `negative space in center for text overlay` |-| 避免强主体 | 使用抽象、渐变、几何元素 |-| 低对比细节 | `subtle`, `soft`, `muted` |+| Key Point | Description |+|-----------|-------------|+| Emphasize background nature | Add `background`, `backdrop` |+| Reserve text area | `negative space in center for text overlay` |+| Avoid strong subjects | Use abstract, gradient, geometric elements |+| Low-contrast details | `subtle`, `soft`, `muted` |-**模板**: `Abstract {主题元素} background, {风格} style, {主色} to {辅色} gradient, subtle {装饰元素}, clean negative space in center for text overlay, {宽高比} aspect ratio, high resolution, professional presentation background`+**Template**: `Abstract {theme element} background, {style} style, {primary color} to {secondary color} gradient, subtle {decorative elements}, clean negative space in center for text overlay, {aspect ratio} aspect ratio, high resolution, professional presentation background`-**负面提示词**: `text, letters, watermark, faces, busy patterns, high contrast details`+**Negative prompt**: `text, letters, watermark, faces, busy patterns, high contrast details`-### 3.2 实景照片 (Photography)+### 3.2 Photography-**识别特征**: 真实场景、人物、产品、建筑等照片质感+**Identifying characteristics**: Real scenes, people, products, architecture — photographic quality-| 要点 | 说明 |-|------|------|-| 强调真实感 | `photography`, `photorealistic`, `real photo` |-| 光影效果 | `natural lighting`, `soft shadows`, `studio lighting` |-| 背景处理 | `white background` / `blurred background` / `contextual setting` |-| 人物多样性 | `diverse`, `professional attire` |+| Key Point | Description |+|-----------|-------------|+| Emphasize realism | `photography`, `photorealistic`, `real photo` |+| Lighting effects | `natural lighting`, `soft shadows`, `studio lighting` |+| Background handling | `white background` / `blurred background` / `contextual setting` |+| People diversity | `diverse`, `professional attire` |-**模板**: `{主体描述}, professional photography, {光影类型} lighting, {背景类型} background, color grading matching {配色方案}, high quality, sharp focus, 8K resolution`+**Template**: `{subject description}, professional photography, {lighting type} lighting, {background type} background, color grading matching {color scheme}, high quality, sharp focus, 8K resolution`-**负面提示词**: `watermark, text overlay, artificial, CGI, illustration, cartoon, distorted faces`+**Negative prompt**: `watermark, text overlay, artificial, CGI, illustration, cartoon, distorted faces`-### 3.3 插画配图 (Illustration)+### 3.3 Illustration-**识别特征**: 扁平设计、矢量风格、卡通、概念图解+**Identifying characteristics**: Flat design, vector style, cartoon, concept diagrams-| 要点 | 说明 |-|------|------|-| 明确风格 | `flat design`, `isometric`, `vector style`, `hand-drawn` |-| 简化细节 | `simplified`, `clean lines`, `minimal details` |-| 统一色板 | 严格使用设计规范配色 |-| 背景选择 | `white background` 或 `transparent background` |+| Key Point | Description |+|-----------|-------------|+| Specify style | `flat design`, `isometric`, `vector style`, `hand-drawn` |+| Simplify details | `simplified`, `clean lines`, `minimal details` |+| Unified palette | Strictly use design spec colors |+| Background choice | `white background` or `transparent background` |-**模板**: `{主体描述}, {插画风格} illustration style, {细节程度} with clean lines, color palette: {配色列表}, {背景类型} background, professional {用途} illustration`+**Template**: `{subject description}, {illustration style} illustration style, {detail level} with clean lines, color palette: {color list}, {background type} background, professional {purpose} illustration`-**负面提示词**: `realistic, photography, 3D render, complex textures, watermark`+**Negative prompt**: `realistic, photography, 3D render, complex textures, watermark`-### 3.4 图表/架构图 (Diagram)+### 3.4 Diagram-**识别特征**: 流程图、架构图、概念关系图、数据可视化+**Identifying characteristics**: Flowcharts, architecture diagrams, concept relationship maps, data visualizations-| 要点 | 说明 |-|------|------|-| 清晰结构 | `clear structure`, `organized layout`, `logical flow` |-| 连接表示 | `arrows indicating flow`, `connecting lines` |-| 学术/专业感 | `suitable for academic publication`, `professional diagram` |-| 浅色背景 | `white background` 或 `light gray background` |+| Key Point | Description |+|-----------|-------------|+| Clear structure | `clear structure`, `organized layout`, `logical flow` |+| Connection representation | `arrows indicating flow`, `connecting lines` |+| Academic / professional feel | `suitable for academic publication`, `professional diagram` |+| Light background | `white background` or `light gray background` |-**模板**: `{图表类型} diagram showing {内容描述}, {组件描述} connected by {连接方式}, {风格} style with {配色方案}, white background, clear labels, professional technical diagram`+**Template**: `{diagram type} diagram showing {content description}, {component description} connected by {connection method}, {style} style with {color scheme}, white background, clear labels, professional technical diagram`-**负面提示词**: `cluttered, messy, overlapping elements, dark background, realistic, photography`+**Negative prompt**: `cluttered, messy, overlapping elements, dark background, realistic, photography`-### 3.5 装饰图案 (Decorative Pattern)+### 3.5 Decorative Pattern-**识别特征**: 局部装饰、纹理、边框、分隔元素+**Identifying characteristics**: Partial decoration, textures, borders, divider elements-| 要点 | 说明 |-|------|------|-| 可重复性 | `seamless`, `tileable`, `repeatable`(如需要) |-| 低调辅助 | `subtle`, `understated`, `supporting element` |-| 透明友好 | `transparent background` 或 `isolated element` |-| 小尺寸适用 | 考虑在小尺寸下的可识别性 |+| Key Point | Description |+|-----------|-------------|+| Repeatability | `seamless`, `tileable`, `repeatable` (if needed) |+| Understated support | `subtle`, `understated`, `supporting element` |+| Transparency-friendly | `transparent background` or `isolated element` |+| Small-size readability | Consider legibility at small dimensions |-**模板**: `{图案类型} decorative pattern, {风格} style, {配色方案}, {背景类型} background, subtle and elegant, suitable for {用途}`+**Template**: `{pattern type} decorative pattern, {style} style, {color scheme}, {background type} background, subtle and elegant, suitable for {purpose}`-**负面提示词**: `busy, cluttered, high contrast, distracting, photorealistic`+**Negative prompt**: `busy, cluttered, high contrast, distracting, photorealistic`----## 4. 图片生成工作流+## 4. Image Generation Workflow-### 4.1 分析阶段+### 4.1 Analysis Phase-1. 阅读设计规范,理解项目整体风格-2. 提取配色方案、画布格式、目标受众-3. 逐一分析图片资源清单中的每张图片-4. 判断每张图片的类型(参考第 3 节)+1. Read the design spec; understand overall project style+2. Extract color scheme, canvas format, target audience+3. Analyze each image in the resource list individually+4. Determine each image's type (refer to Section 3)-### 4.2 提示词生成阶段+### 4.2 Prompt Generation Phase-对每张「待生成」状态的图片:+For each image with "Pending" status:-1. **判断类型** → 背景图/实景照片/插画/图表/装饰-2. **理解用途** → 在哪页?承担什么功能?-3. **分析原始描述** → 用户「生成描述」中的信息-4. **应用类型要点** → 参考对应类型的表格-5. **生成优化提示词** → 使用 2.1 统一输出格式-6. **保存提示词文档** → **必须**写入 `项目/images/image_prompts.md`+1. **Determine type** → Background / Photography / Illustration / Diagram / Decorative+2. **Understand purpose** → Which page? What function?+3. **Analyze original description** → Information from the user's "Generation description"+4. **Apply type-specific key points** → Reference the corresponding type's table+5. **Generate optimized prompt** → Use the 2.1 standard output format+6. **Save prompt document** → **Must** write to `project/images/image_prompts.md`-### 4.3 图片生成阶段+### 4.3 Image Generation Phase-> 前置条件:必须先完成 4.2,确保 `images/image_prompts.md` 已创建+> Prerequisite: Section 4.2 must be complete; `images/image_prompts.md` must exist-#### 方式一:Nano Banana 命令行工具(推荐)+#### Method 1: Nano Banana CLI Tool (Recommended)```bash-python3 scripts/nano_banana_gen.py "你的提示词" \+python3 scripts/nano_banana_gen.py "your prompt" \--aspect_ratio 16:9 --image_size 1K \- --output 项目/images --filename cover_bg+ --output project/images --filename cover_bg```-**参数列表**:+**Parameters**:-| 参数 | 简写 | 说明 | 默认值 |-|------|------|------|--------|-| `prompt` | - | 正向提示词(位置参数) | `Nano Banana` |-| `--negative_prompt` | `-n` | 负面提示词 | 无 |-| `--aspect_ratio` | - | 图片宽高比 | `1:1` |-| `--image_size` | - | 尺寸 (`1K`/`2K`/`4K`) | `1K` |-| `--output` | `-o` | 输出目录 | 当前目录 |-| `--filename` | `-f` | 输出文件名(不含扩展名) | 自动命名 |+| Parameter | Short | Description | Default |+|-----------|-------|-------------|---------|+| `prompt` | - | Positive prompt (positional arg) | `Nano Banana` |+| `--negative_prompt` | `-n` | Negative prompt | None |+| `--aspect_ratio` | - | Image aspect ratio | `1:1` |+| `--image_size` | - | Size (`1K`/`2K`/`4K`) | `1K` |+| `--output` | `-o` | Output directory | Current directory |+| `--filename` | `-f` | Output filename (no extension) | Auto-named |-**环境变量**: 必需 `GEMINI_API_KEY`,可选 `GEMINI_BASE_URL`+**Environment variables**: Required: `GEMINI_API_KEY`. Optional: `GEMINI_BASE_URL`-**生成节奏控制(强制)**:-- 每次只执行一个生成命令,等待确认文件落盘后再执行下一条-- 建议每张间隔 2-5 秒,避免并发导致失败-- 如出现失败/无输出,先停止队列,检查环境变量与输出目录,再继续+**Generation pacing (mandatory)**:+- Execute only one generation command at a time; wait for file confirmation before the next+- Recommend 2-5 second intervals between images to avoid concurrency failures+- If failure/no output occurs, halt the queue, check environment variables and output directory, then resume-#### 方式二:自动生成+#### Method 2: Auto-generation-直接调用图像生成 API,下载并保存到 `项目/images/` 目录。+Directly call image generation API, download and save to `project/images/` directory.-#### 方式三:Gemini 网页版+#### Method 3: Gemini Web Interface-1. 在 [Gemini](https://gemini.google.com/) 中生成图片-2. 选择 **Download full size** 下载高分辨率版本-3. 去水印:`python3 scripts/gemini_watermark_remover.py <图片路径>`-4. 将处理后的图片放入 `项目/images/` 目录+1. Generate images in [Gemini](https://gemini.google.com/)+2. Select **Download full size** for high-resolution version+3. Remove watermark: `python3 scripts/gemini_watermark_remover.py <image_path>`+4. Place processed images in `project/images/` directory-#### 方式四:手动生成(其他 AI 平台)+#### Method 4: Manual Generation (Other AI Platforms)-提示词已保存在 `images/image_prompts.md`,告知用户文件位置。用户自行到 Midjourney、DALL-E、Stable Diffusion、文心一格、通义万相等平台生成,将图片放入 `项目/images/` 目录。+Prompts are saved in `images/image_prompts.md`; inform the user of the file location. User generates on Midjourney, DALL-E, Stable Diffusion, etc. and places images in `project/images/` directory.-### 4.4 验证阶段+### 4.4 Verification Phase-- 确认所有图片已保存到 `images/` 目录-- 检查文件名与清单一致-- 更新图片资源清单状态为「已生成」+- Confirm all images are saved to `images/` directory+- Check filenames match the resource list+- Update image resource list status to "Generated"----## 5. 提示词文档模板+## 5. Prompt Document Template-创建 `项目/images/image_prompts.md` 时使用以下结构:+Use the following structure when creating `project/images/image_prompts.md`:```markdown-# 图片生成提示词+# Image Generation Prompts-> 项目: {项目名称}-> 生成时间: {日期}-> 配色方案: 主导色 {#HEX} | 辅助色 {#HEX} | 强调色 {#HEX}+> Project: {project_name}+> Generated: {date}+> Color scheme: Primary {#HEX} | Secondary {#HEX} | Accent {#HEX}----## 图片清单总览+## Image List Overview-| # | 文件名 | 类型 | 尺寸 | 状态 |-|---|--------|------|------|------|-| 1 | cover_bg.png | 背景图 | 1920x1080 | 待生成 |+| # | Filename | Type | Dimensions | Status |+|---|----------|------|-----------|--------|+| 1 | cover_bg.png | Background | 1920x1080 | Pending |----## 详细提示词+## Detailed Prompts-### 图片 1: cover_bg.png+### Image 1: cover_bg.png-| 属性 | 值 |-|------|----|-| 用途 | 封面背景 |-| 类型 | 背景图 |-| 尺寸 | 1920x1080 (16:9) |-| 原始描述 | 现代科技感抽象背景,深蓝渐变 |+| Attribute | Value |+|-----------|-------|+| Purpose | Cover background |+| Type | Background |+| Dimensions | 1920x1080 (16:9) |+| Original description | Modern tech abstract background, deep blue gradient |-**提示词 (Prompt)**:+**Prompt**:Abstract futuristic background with flowing digital waves...-**图片描述 (Alt Text)**:-> 现代科技感抽象背景,深蓝色渐变配合数字波浪和粒子效果+**Alt Text**:+> Modern tech abstract background with deep blue gradient, digital waves, and particle effects----## 使用说明+## Usage Instructions-1. 复制上方「提示词」到 AI 图像生成工具-2. 推荐平台: Midjourney / DALL-E 3 / Gemini / Stable Diffusion-3. 生成后将图片重命名为对应文件名-4. 放入 `images/` 目录+1. Copy the "Prompt" above into an AI image generation tool+2. Recommended platforms: Midjourney / DALL-E 3 / Gemini / Stable Diffusion+3. Rename generated images to the corresponding filenames+4. Place in the `images/` directory```----## 6. 负面提示词速查+## 6. Negative Prompt Quick Reference-### 按图片类型+### By Image Type-| 类型 | 推荐负面提示词 |-|------|---------------|-| 背景图 | `text, letters, watermark, faces, busy patterns, high contrast details` |-| 实景照片 | `watermark, text overlay, artificial, CGI, illustration, cartoon, distorted faces` |-| 插画配图 | `realistic, photography, 3D render, complex textures, watermark` |-| 图表/架构图 | `cluttered, messy, overlapping elements, dark background, realistic` |-| 装饰图案 | `busy, cluttered, high contrast, distracting, photorealistic` |+| Type | Recommended Negative Prompt |+|------|---------------------------|+| Background | `text, letters, watermark, faces, busy patterns, high contrast details` |+| Photography | `watermark, text overlay, artificial, CGI, illustration, cartoon, distorted faces` |+| Illustration | `realistic, photography, 3D render, complex textures, watermark` |+| Diagram | `cluttered, messy, overlapping elements, dark background, realistic` |+| Decorative pattern | `busy, cluttered, high contrast, distracting, photorealistic` |-### 通用负面提示词+### Universal Negative Prompts-- **标准版**: `text, watermark, signature, blurry, distorted, low quality`-- **扩展版**(人物场景): `text, watermark, signature, blurry, low quality, distorted, extra fingers, mutated hands, poorly drawn face, bad anatomy, extra limbs, disfigured, deformed`+- **Standard**: `text, watermark, signature, blurry, distorted, low quality`+- **Extended** (people scenarios): `text, watermark, signature, blurry, low quality, distorted, extra fingers, mutated hands, poorly drawn face, bad anatomy, extra limbs, disfigured, deformed`----## 7. 常见问题+## 7. Common Issues-### 无「生成描述」时的默认推断+### Default Inference When No "Generation Description" Provided-| 用途 | 默认推断 |-|------|----------|-| 封面背景 | 抽象渐变背景,预留中央文字区域 |-| 章节页背景 | 简洁几何图案,侧重单色调 |-| 团队介绍页 | 团队协作场景插图(扁平风格) |-| 数据展示页 | 简洁几何图案或纯色背景 |-| 产品展示 | 产品实拍风格,白底或渐变背景 |+| Purpose | Default Inference |+|---------|------------------|+| Cover background | Abstract gradient background, reserve central text area |+| Chapter page background | Clean geometric pattern, monochrome focus |+| Team introduction page | Team collaboration scene illustration (flat style) |+| Data display page | Clean geometric pattern or solid color background |+| Product showcase | Product photography style, white or gradient background |-### 图片不满意时+### When Images Are Unsatisfactory-提供提示词变体供用户选择:变体 A(更抽象)、变体 B(更具象)、变体 C(不同色调)。+Provide prompt variants for user selection: Variant A (more abstract), Variant B (more concrete), Variant C (different color tone).----## 8. 角色协作+## 8. Role Collaboration-### 与 Strategist 的衔接+### Handoff with Strategist-| 方向 | 内容 |-|------|------|-| 接收 | 设计规范与内容大纲(含图片资源清单) |-| 触发条件 | 用户在「图片使用」中选择包含「C) AI 生成」 |-| 关键信息 | 配色方案、设计风格、画布格式 |+| Direction | Content |+|-----------|---------|+| Receives | Design Specification & Content Outline (with image resource list) |+| Trigger condition | User selected "C) AI generation" in "Image usage" |+| Key information | Color scheme, design style, canvas format |-### 与 Executor 的衔接+### Handoff with Executor-| 方向 | 内容 |-|------|------|-| 交付 | 所有图片已放入 `项目/images/` 目录 |-| Executor 引用 | `<image href="../images/xxx.png" .../>` |-| 路径说明 | SVG 在 `svg_output/`,图片在 `images/`,使用相对路径 `../images/` |+| Direction | Content |+|-----------|---------|+| Delivers | All images placed in `project/images/` directory |+| Executor reference | `<image href="../images/xxx.png" .../>` |+| Path note | SVGs in `svg_output/`, images in `images/`; use relative path `../images/` |----## 9. 任务完成检查点+## 9. Task Completion Checkpoint-### 必须完成项+### Must-complete Items-- [ ] 已创建提示词文档 `项目/images/image_prompts.md`-- [ ] 每张图片都有:类型判断 + 优化提示词 + 负面提示词 + Alt Text-- [ ] 使用统一输出格式(2.1 标准格式)-- [ ] 已输出阶段完成确认+- [ ] Created prompt document `project/images/image_prompts.md`+- [ ] Each image has: type determination + optimized prompt + negative prompt + Alt Text+- [ ] Uses unified output format (2.1 standard format)+- [ ] Phase completion confirmation output-### 图片就绪项(至少满足一项)+### Image Readiness (at least one must be satisfied)-- [ ] 所有图片已保存到 `项目/images/` 目录-- [ ] 或:已明确告知用户使用 `image_prompts.md` 自行生成+- [ ] All images saved to `project/images/` directory+- [ ] Or: User clearly informed to self-generate using `image_prompts.md`-### 流程流转+### Pipeline Flow-- [ ] 已提示用户进入下一步(切换到 Executor 角色)+- [ ] User prompted to proceed to next step (switch to Executor role)-> **关键检查**: 如果 `images/image_prompts.md` 未创建,或输出格式不符合 2.1 标准,任务未完成。+> **Critical check**: If `images/image_prompts.md` was not created, or the output format does not comply with 2.1 standard, the task is NOT complete.-### 完成确认输出格式+### Completion Confirmation Output Format```markdown-## Image_Generator 阶段完成+## Image_Generator Phase Complete-- [x] 已创建提示词文档 `项目/images/image_prompts.md`-- [x] 已为 X 张图片生成优化提示词-- [x] 所有图片已保存到 `images/` 目录-- [x] 已更新图片资源清单状态+- [x] Created prompt document `project/images/image_prompts.md`+- [x] Generated optimized prompts for X images+- [x] All images saved to `images/` directory+- [x] Updated image resource list status-**图片状态汇总**:+**Image Status Summary**:-| 文件名 | 类型 | 尺寸 | 状态 |-|--------|------|------|------|-| cover_bg.png | 背景图 | 1920x1080 | 已生成 |+| Filename | Type | Dimensions | Status |+|----------|------|-----------|--------|+| cover_bg.png | Background | 1920x1080 | Generated |-**下一步**: 切换到 Executor 角色开始生成 SVG+**Next step**: Switch to Executor role to begin SVG generation```diff --git a/skills/ppt-master/references/image-layout-spec.md b/skills/ppt-master/references/image-layout-spec.mdindex ae1f3cdf..a61ddf69 100644--- a/skills/ppt-master/references/image-layout-spec.md+++ b/skills/ppt-master/references/image-layout-spec.md@@ -1,125 +1,125 @@-> 📎 公共技术约束见 shared-standards.md+> See shared-standards.md for common technical constraints.-# 图片布局规范(强制执行)+# Image Layout Specification (Mandatory)-含图片页面的布局规则。Strategist 规划阶段、Executor 生成阶段都必须遵循。+Layout rules for pages containing images. Both the Strategist planning phase and Executor generation phase must follow these rules.-**核心原则:根据图片原始比例计算布局,确保图片完整展示,杜绝留白或裁切。**+**Core principle: Calculate layout based on the image's original aspect ratio, ensuring the image is displayed completely without excess whitespace or cropping.**----## 布局决策流程+## Layout Decision Flow```-1. 获取图片原始尺寸 → 计算比例 (宽/高)-2. 根据比例选择布局类型-3. 计算图片最大展示尺寸-4. 分配剩余空间给文字区域-5. 将结果填入《设计规范与内容大纲》的图片资源清单+1. Get image original dimensions → Calculate ratio (width/height)+2. Select layout type based on ratio+3. Calculate maximum display size for the image+4. Allocate remaining space for text area+5. Fill results into the Design Specification's image resource list```-**执行时机**:若图片方案包含「B) 用户提供」,在 Strategist 阶段完成八项确认后、进入内容分析与大纲编制之前,必须运行扫描并填充图片资源清单。+**When to execute**: If the image approach includes "B) User-provided", after the Strategist completes the Eight Confirmations and before content analysis and outlining, the scan must be run and the image resource list populated.----## 布局类型选择(强制)+## Layout Type Selection (Mandatory)-| 图片比例 | 布局类型 | 图片位置 | 说明 |-|----------|----------|----------|------|-| > 2.0 (超宽) | 上下分栏 | 上方通栏 | 图片占画布宽度,高度按比例 |-| 1.5-2.0 (宽幅) | 上下分栏 | 上方 | 图片宽度=内容区宽度,高度按比例 |-| 1.2-1.5 (标准) | 左右分栏 | 左侧 | 图片高度优先适配,宽度按比例 |-| 0.8-1.2 (方形) | 左右分栏 | 左侧 | 图片取内容区高度,宽度按比例 |-| < 0.8 (竖图) | 左右分栏 | 左侧 | 图片高度=内容区高度,宽度按比例 |+| Image Ratio | Layout Type | Image Position | Description |+|-------------|-------------|----------------|-------------|+| > 2.0 (ultra-wide) | Top-bottom split | Top full-width | Image spans canvas width, height proportional |+| 1.5-2.0 (wide) | Top-bottom split | Top | Image width = content area width, height proportional |+| 1.2-1.5 (standard) | Left-right split | Left | Image height-first fit, width proportional |+| 0.8-1.2 (square) | Left-right split | Left | Image takes content area height, width proportional |+| < 0.8 (portrait) | Left-right split | Left | Image height = content area height, width proportional |-> 边界情况:比例处于边界值时(如 1.5),根据文字量判断。文字多选左右,文字少选上下。+> Edge cases: When ratio is at a boundary (e.g., 1.5), decide based on text volume. More text → left-right; less text → top-bottom.----## 尺寸计算公式+## Dimension Calculation Formulas-### PPT 16:9 (1280x720) 画布参数+### PPT 16:9 (1280x720) Canvas Parameters```-画布: 1280 x 720 px-内容区: 1160 x 640 px (左右边距 60px, 上下边距 40px)-标题区高度: 60 px-内容起点: y = 80 px (标题 + 间距)+Canvas: 1280 x 720 px+Content area: 1160 x 640 px (left/right margin 60px, top/bottom margin 40px)+Title area height: 60 px+Content start: y = 80 px (title + spacing)```-### 上下布局计算+### Top-Bottom Layout Calculation```-图片宽度 = W = 1160 px-图片高度 = W / R = 1160 / R px-文字区高度 = H - 图片高度 - 间距(20px)+Image width = W = 1160 px+Image height = W / R = 1160 / R px+Text area height = H - image height - gap(20px)-验证:文字区高度 >= 150px (至少 3-4 行文字)-若不满足 → 改用左右布局+Validation: Text area height >= 150px (at least 3-4 lines of text)+If not satisfied → Switch to left-right layout```-### 左右布局计算+### Left-Right Layout Calculation-**方式 1(高度优先,适用于竖图)**:+**Method 1 (height-first, suitable for portrait images)**:```-图片高度 = H = 600 px-图片宽度 = H x R = 600 x R px-文字区宽度 = W - 图片宽度 - 间距(20px)+Image height = H = 600 px+Image width = H x R = 600 x R px+Text area width = W - image width - gap(20px)```-**方式 2(宽度受限,适用于宽图转左右)**:+**Method 2 (width-constrained, for wide images converted to left-right)**:```-图片宽度 = W x 0.7 = 812 px-图片高度 = 图片宽度 / R-文字区宽度 = W - 图片宽度 - 间距(20px)+Image width = W x 0.7 = 812 px+Image height = image width / R+Text area width = W - image width - gap(20px)```-**验证**:文字区宽度 >= 280px,否则需减小图片区宽度。+**Validation**: Text area width >= 280px; otherwise reduce image area width.----## 布局示例+## Layout Examples-### 超宽图 (比例 2.45)+### Ultra-wide Image (ratio 2.45)```-原图: 1960x800, R=2.45 → 上下分栏-图片: 1160x473, 文字区: 1160x147 → 上下 7:3+Original: 1960x800, R=2.45 → Top-bottom split+Image: 1160x473, Text area: 1160x147 → 7:3 top-bottom```-### 标准横图 (比例 1.38)+### Standard Landscape (ratio 1.38)```-原图: 1614x1171, R=1.38 → 左右分栏-图片: 773x560 (左侧), 文字区: 367x560 (右侧) → 左右 7:3+Original: 1614x1171, R=1.38 → Left-right split+Image: 773x560 (left), Text area: 367x560 (right) → 7:3 left-right```-### 宽幅图边界情况 (比例 1.75)+### Wide Image Edge Case (ratio 1.75)```-原图: 1820x1040, R=1.75-尝试上下: 图片高度=663, 文字区=-43 ❌-改用左右: 图片 780x446 (左侧), 文字区 360x600 (右侧) → 左右 7:3+Original: 1820x1040, R=1.75+Try top-bottom: image height=663, text area=-43 ❌+Switch to left-right: image 780x446 (left), text area 360x600 (right) → 7:3 left-right```----## 禁止事项+## Prohibited Practices-| 禁止 | 正确做法 |-|------|---------|-| 固定使用 50:50 或任意比例 | 根据图片比例动态计算 |-| 将宽图塞入方形容器 | 使用上下布局或加大图片区宽度 |-| 将竖图放入横向窄条 | 使用左右布局,图片在左 |-| 图片留白超过 10% | 重新计算布局或选择其他方案 |-| 裁切图片关键内容 | 使用 `preserveAspectRatio="xMidYMid meet"` |-| 文字区太小无法阅读 | 确保文字区 >= 150px(上下)或 >= 280px(左右) |+| Prohibited | Correct Approach |+|-----------|-----------------|+| Fixed 50:50 or arbitrary ratios | Dynamic calculation based on image ratio |+| Forcing wide image into square container | Use top-bottom layout or increase image area width |+| Placing portrait image in narrow horizontal strip | Use left-right layout, image on left |+| Image whitespace exceeding 10% | Recalculate layout or choose alternative approach |+| Cropping key image content | Use `preserveAspectRatio="xMidYMid meet"` |+| Text area too small to read | Ensure text area >= 150px (top-bottom) or >= 280px (left-right) |----## SVG 图片嵌入代码+## SVG Image Embedding Code-### 完整展示(推荐用于数据图表)+### Complete Display (recommended for data charts)```xml<image href="../images/xxx.png"@@ -127,7 +127,7 @@preserveAspectRatio="xMidYMid meet"/>```-### 裁切填充(仅用于背景图)+### Crop-to-Fill (backgrounds only)```xml<image href="../images/bg.png"@@ -137,38 +137,38 @@----## 图片资源清单模板+## Image Resource List Template-在《设计规范与内容大纲》中,图片资源清单必须包含:+In the Design Specification & Content Outline, the image resource list must include:-| 字段 | 说明 | 示例 |-|------|------|------|-| 文件名 | 图片文件名 | `p12_0.png` |-| 原始尺寸 | 宽x高 | 1524x968 |-| 比例 | 宽/高 | 1.57 |-| 页码 | 使用页码 | 第5页 |-| 类型 | 视觉类型 | 背景图/实景照片/插画配图/图表架构/装饰图案 |-| 布局方案 | 上下/左右 + 分栏比 | 上下 6:4 或 左右 7:3 |-| 图片区域 | 图片展示尺寸 | 1160x420 或 780x446 |-| 文字区域 | 剩余空间尺寸 | 1160x200 或 360x600 |+| Field | Description | Example |+|-------|-------------|---------|+| Filename | Image filename | `p12_0.png` |+| Original dimensions | Width x Height | 1524x968 |+| Ratio | Width / Height | 1.57 |+| Page | Usage page number | Page 5 |+| Type | Visual type | Background / Photography / Illustration / Diagram / Decorative |+| Layout plan | Top-bottom/Left-right + split ratio | Top-bottom 6:4 or Left-right 7:3 |+| Image area | Image display dimensions | 1160x420 or 780x446 |+| Text area | Remaining space dimensions | 1160x200 or 360x600 |-**类型字段用于 Image_Generator 选择合适的提示词策略。**+**The Type field is used by Image_Generator to select the appropriate prompt strategy.**----## 自动化工具+## Automation Tool```bash-python3 scripts/analyze_images.py <项目路径>/images+python3 scripts/analyze_images.py <project_path>/images```-输出包含尺寸、比例、布局建议(Markdown 表格),可直接用于填写图片资源清单。+Output includes dimensions, ratios, and layout recommendations (Markdown table), which can be directly used to populate the image resource list.----## 角色职责+## Role Responsibilities-| 角色 | 职责 |-|------|------|-| **Strategist** | 运行 analyze_images.py,按本规范计算布局,填写图片资源清单 |-| **Executor** | 严格按图片资源清单中的布局方案和尺寸生成 SVG |+| Role | Responsibility |+|------|---------------|+| **Strategist** | Run analyze_images.py, calculate layout per this spec, populate image resource list |+| **Executor** | Strictly follow the layout plan and dimensions in the image resource list when generating SVGs |diff --git a/skills/ppt-master/references/optimizer-crap.md b/skills/ppt-master/references/optimizer-crap.mdindex 6e3d592a..79158882 100644--- a/skills/ppt-master/references/optimizer-crap.md+++ b/skills/ppt-master/references/optimizer-crap.md@@ -1,115 +1,115 @@-> 📎 公共技术约束见 shared-standards.md+> See shared-standards.md for common technical constraints.-# Optimizer CRAP — 视觉优化角色+# Optimizer CRAP — Visual Optimization Role-## 核心使命+## Core Mission-严格遵循 CRAP 设计原则,分析并重构单页 SVG 代码,输出视觉更专业、结构更清晰的新版本。支持所有画布格式,根据原始 SVG 画布尺寸进行优化。+Strictly follow CRAP design principles to analyze and restructure single-page SVG code, outputting a visually more professional and structurally clearer version. Supports all canvas formats; optimizes based on the original SVG canvas dimensions.-## 使用模式+## Usage Modes-| 模式 | 触发方式 | 说明 |-|------|----------|------|-| 独立使用 | 提供 SVG 文件/代码 | 对任意 SVG 进行视觉优化 |-| 流程中使用 | `generate-ppt` 后可选优化 | 优化 Executor 生成的 SVG |+| Mode | Trigger | Description |+|------|---------|-------------|+| Standalone | Provide SVG file/code | Visually optimize any SVG |+| In-pipeline | Optional after `generate-ppt` | Optimize Executor-generated SVGs |-> 流程中下一步:后处理 + 导出 PPTX+> Next step in pipeline: Post-processing + Export PPTX-## 工作流程+## Workflow-1. 接收原始 SVG 代码-2. 识别画布格式(`width`、`height`、`viewBox`)-3. (可选)分析参考 SVG 了解总体风格-4. 按四大核心原则诊断和重构-5. 保持画布尺寸不变-6. 输出优化后 SVG,文件名前加 `yh_`-7. 输出优化报告+1. Receive original SVG code+2. Identify canvas format (`width`, `height`, `viewBox`)+3. (Optional) Analyze reference SVG for overall style+4. Diagnose and restructure according to the four core principles+5. Keep canvas dimensions unchanged+6. Output optimized SVG with `yh_` prefix in filename+7. Output optimization report----## 四大核心设计原则+## Four Core Design Principles-### 1. 对齐 (Alignment)+### 1. Alignment-- **诊断**:检查是否存在随意放置的元素-- **优化**:严格对齐所有元素,创建强大的视觉连接线(左对齐、居中或右对齐),任何元素的位置都必须与其他元素存在明确的对齐关系-- **参考**:元素坐标偏差控制在 5px 以内+- **Diagnose**: Check for randomly placed elements+- **Optimize**: Strictly align all elements, creating strong visual connection lines (left-aligned, centered, or right-aligned); every element's position must have a clear alignment relationship with other elements+- **Reference**: Element coordinate deviation within 5px-**常见技巧**:-- 将分散元素统一到同一条垂直或水平线上-- 使用一致的左/右边距-- 标题、正文、注释起始位置保持对齐+**Common techniques**:+- Unify scattered elements along the same vertical or horizontal line+- Use consistent left/right margins+- Keep title, body, and annotation starting positions aligned-### 2. 对比 (Contrast)+### 2. Contrast-- **诊断**:检查元素间是否有足够的视觉层次,重点信息是否突出-- **优化**:让不同元素**截然不同**,通过显著加大尺寸、字重或颜色差异突出最重要的信息-- **参考**:标题字号比正文大 1.3-2 倍+- **Diagnose**: Check whether elements have sufficient visual hierarchy; whether key information stands out+- **Optimize**: Make different elements **distinctly different** by significantly increasing size, weight, or color differences to highlight the most important information+- **Reference**: Title font size 1.3-2x larger than body text-**常见技巧**:-- 放大关键数字或标题字号-- 用粗体突出重点词汇-- 用强调色标注核心信息-- 通过明暗对比区分前景与背景+**Common techniques**:+- Enlarge key numbers or title font sizes+- Use bold to emphasize key terms+- Use accent colors to mark critical information+- Use light/dark contrast to distinguish foreground from background-### 3. 重复 (Repetition)+### 3. Repetition-- **诊断**:检查同类元素的视觉风格是否统一-- **优化**:有意识地重复使用视觉元素(颜色、字体样式、圆角大小、线条粗细),创造组织性和统一性-- **参考**:同类元素保持风格一致+- **Diagnose**: Check whether similar elements have consistent visual styling+- **Optimize**: Intentionally repeat visual elements (colors, font styles, border radius, line thickness) to create organization and unity+- **Reference**: Same-type elements maintain consistent styling-**常见技巧**:-- 统一所有卡片的圆角半径-- 统一同级标题的字号和颜色-- 重复使用相同的图标风格-- 保持一致的间距系统+**Common techniques**:+- Unify border radius across all cards+- Unify font size and color for same-level headings+- Repeat the same icon style+- Maintain a consistent spacing system-### 4. 亲密性 (Proximity)+### 4. Proximity-- **诊断**:检查逻辑相关的内容在空间上是否足够靠近-- **优化**:将关联项目在空间上靠近,组织成视觉单元;加大不同组块间的距离-- **参考**:相关元素靠近,不相关元素分开+- **Diagnose**: Check whether logically related content is spatially close enough+- **Optimize**: Place related items close together spatially, forming visual units; increase distance between different groups+- **Reference**: Related elements close together, unrelated elements separated-**常见技巧**:-- 缩小标题与其下方内容的间距-- 加大不同章节之间的间距-- 将图表与标签组合成视觉单元-- 用分组线或背景色强化关联性+**Common techniques**:+- Reduce spacing between a title and its content below+- Increase spacing between different sections+- Group charts and labels into visual units+- Use divider lines or background colors to reinforce relationships----## 可选补充原则+## Optional Supplementary Principles-仅在用户明确要求时应用:+Apply only when the user explicitly requests:-### 5. 留白 (White Space)+### 5. White Space-触发词:"增加留白"、"提升高级感"。增加元素间距,给设计留出呼吸空间。+Trigger phrases: "add whitespace", "improve premium feel". Increase element spacing to give the design breathing room.-### 6. 降噪 (Noise Reduction)+### 6. Noise Reduction-触发词:"简化设计"、"减少干扰"。移除冗余元素,简化复杂效果,聚焦核心信息。+Trigger phrases: "simplify design", "reduce distractions". Remove redundant elements, simplify complex effects, focus on core information.----## 优化报告格式+## Optimization Report Format```-## 优化报告+## Optimization Report-### 主要优化点-1. [对齐] 具体修改说明-2. [对比] 具体修改说明-3. [重复] 具体修改说明-4. [亲密性] 具体修改说明+### Key Improvements+1. [Alignment] Specific modification description+2. [Contrast] Specific modification description+3. [Repetition] Specific modification description+4. [Proximity] Specific modification description-### 优化效果-简要说明整体优化效果和视觉改进。+### Optimization Results+Brief description of overall optimization effect and visual improvements.```-## 技术约束+## Technical Constraints-- **保持画布尺寸**:优化后 SVG 的 `width`、`height`、`viewBox` 与原始一致-- **文本处理**:保持 `<tspan>` 换行-- **文件命名**:`yh_原文件名.svg`-- SVG 禁用功能与 PPT 兼容性规则见 shared-standards.md+- **Preserve canvas dimensions**: Optimized SVG's `width`, `height`, `viewBox` must match the original+- **Text handling**: Preserve `<tspan>` line breaks+- **File naming**: `yh_original_filename.svg`+- SVG banned features and PPT compatibility rules: see shared-standards.mddiff --git a/skills/ppt-master/references/shared-standards.md b/skills/ppt-master/references/shared-standards.mdindex 66e95c86..3f22b8b3 100644--- a/skills/ppt-master/references/shared-standards.md+++ b/skills/ppt-master/references/shared-standards.md@@ -1,117 +1,117 @@# Shared Technical Standards-PPT Master 公共技术约束,消除跨角色文件重复。+Common technical constraints for PPT Master, eliminating cross-role file duplication.----## 1. SVG 禁用功能黑名单--以下功能在生成 SVG 时**绝对禁止**使用,否则 PPT 导出将出错:--| 禁止功能 | 说明 |-|----------|------|-| `clipPath` | 裁剪路径 |-| `mask` | 遮罩 |-| `<style>` | 内嵌样式表 |-| `class` | CSS 选择器属性(`<defs>` 内 `id` 为合法引用,不在此列) |-| 外部 CSS | 外部样式表链接 |-| `<foreignObject>` | 嵌入外部内容 |-| `<symbol>` + `<use>` | 符号引用复用 |-| `textPath` | 沿路径排列文本 |-| `@font-face` | 自定义字体声明 |-| `<animate*>` / `<set>` | SVG 动画 |-| `<script>` / 事件属性 | 脚本与交互 |-| `marker` / `marker-end` | 线段端点标记 |-| `<iframe>` | 内嵌框架 |+## 1. SVG Banned Features Blacklist++The following features are **absolutely forbidden** when generating SVGs — PPT export will break if any are used:++| Banned Feature | Description |+|----------------|-------------|+| `clipPath` | Clipping paths |+| `mask` | Masks |+| `<style>` | Embedded stylesheets |+| `class` | CSS selector attributes (`id` inside `<defs>` is a legitimate reference and is NOT banned) |+| External CSS | External stylesheet links |+| `<foreignObject>` | Embedded external content |+| `<symbol>` + `<use>` | Symbol reference reuse |+| `textPath` | Text along a path |+| `@font-face` | Custom font declarations |+| `<animate*>` / `<set>` | SVG animations |+| `<script>` / event attributes | Scripts and interactivity |+| `marker` / `marker-end` | Line endpoint markers |+| `<iframe>` | Embedded frames |----## 2. PPT 兼容性替代方案+## 2. PPT Compatibility Alternatives-| 禁止写法 | 正确替代 |-|----------|---------|+| Banned Syntax | Correct Alternative |+|---------------|---------------------|| `fill="rgba(255,255,255,0.1)"` | `fill="#FFFFFF" fill-opacity="0.1"` |-| `<g opacity="0.2">...</g>` | 每个子元素单独设置 `fill-opacity` / `stroke-opacity` |-| `<image opacity="0.3"/>` | 图片后叠加 `<rect fill="背景色" opacity="0.7"/>` 遮罩层 |-| `marker-end` 箭头 | 用 `<polygon>` 绘制三角形箭头 |+| `<g opacity="0.2">...</g>` | Set `fill-opacity` / `stroke-opacity` on each child element individually |+| `<image opacity="0.3"/>` | Overlay a `<rect fill="background-color" opacity="0.7"/>` mask layer after the image |+| `marker-end` arrows | Draw triangle arrows with `<polygon>` |-**记忆口诀**:PPT 不认 rgba、不认组透明、不认图片透明、不认 marker。+**Mnemonic**: PPT does not recognize rgba, group opacity, image opacity, or markers.----## 3. 画布格式速查+## 3. Canvas Format Quick Reference-### 演示文稿+### Presentations-| 格式 | viewBox | 尺寸 | 比例 |-|------|---------|------|------|+| Format | viewBox | Dimensions | Ratio |+|--------|---------|------------|-------|| PPT 16:9 | `0 0 1280 720` | 1280x720 | 16:9 || PPT 4:3 | `0 0 1024 768` | 1024x768 | 4:3 |-### 社交媒体+### Social Media-| 格式 | viewBox | 尺寸 | 比例 |-|------|---------|------|------|-| 小红书 | `0 0 1242 1660` | 1242x1660 | 3:4 |-| 朋友圈 / Instagram Post | `0 0 1080 1080` | 1080x1080 | 1:1 |-| Story / 抖音竖屏 | `0 0 1080 1920` | 1080x1920 | 9:16 |+| Format | viewBox | Dimensions | Ratio |+|--------|---------|------------|-------|+| Xiaohongshu (RED) | `0 0 1242 1660` | 1242x1660 | 3:4 |+| WeChat Moments / Instagram Post | `0 0 1080 1080` | 1080x1080 | 1:1 |+| Story / TikTok Vertical | `0 0 1080 1920` | 1080x1920 | 9:16 |-### 营销物料+### Marketing Materials-| 格式 | viewBox | 尺寸 | 比例 |-|------|---------|------|------|-| 微信公众号头图 | `0 0 900 383` | 900x383 | 2.35:1 |-| 横版 Banner | `0 0 1920 1080` | 1920x1080 | 16:9 |-| 竖版海报 | `0 0 1080 1920` | 1080x1920 | 9:16 |-| A4 打印 (150dpi) | `0 0 1240 1754` | 1240x1754 | 1:1.414 |+| Format | viewBox | Dimensions | Ratio |+|--------|---------|------------|-------|+| WeChat Article Header | `0 0 900 383` | 900x383 | 2.35:1 |+| Landscape Banner | `0 0 1920 1080` | 1920x1080 | 16:9 |+| Portrait Poster | `0 0 1080 1920` | 1080x1920 | 9:16 |+| A4 Print (150dpi) | `0 0 1240 1754` | 1240x1754 | 1:1.414 |----## 4. 基础 SVG 规则+## 4. Basic SVG Rules-- **viewBox** 必须与画布尺寸一致(`width`/`height` 与 `viewBox` 匹配)-- **背景**:用 `<rect>` 定义页面背景色-- **换行**:用 `<tspan>` 手动换行,禁止 `<foreignObject>`-- **字体**:仅使用系统字体(微软雅黑、Arial、Calibri 等),禁止 `@font-face`-- **样式**:仅使用内联样式(`fill="..."` `font-size="..."`),禁止 `<style>` / `class`(`<defs>` 内 `id` 合法)-- **颜色**:使用 HEX 值,透明度用 `fill-opacity` / `stroke-opacity`-- **图片引用**:`<image href="../images/xxx.png" preserveAspectRatio="xMidYMid slice"/>`-- **图标占位**:`<use data-icon="icon-name" x="" y="" width="48" height="48" fill="#HEX"/>`(后处理自动嵌入)+- **viewBox** must match the canvas dimensions (`width`/`height` must match `viewBox`)+- **Background**: Use `<rect>` to define the page background color+- **Line breaks**: Use `<tspan>` for manual line breaks; `<foreignObject>` is FORBIDDEN+- **Fonts**: Use system fonts only (Microsoft YaHei, Arial, Calibri, etc.); `@font-face` is FORBIDDEN+- **Styles**: Use inline styles only (`fill="..."` `font-size="..."`); `<style>` / `class` are FORBIDDEN (`id` inside `<defs>` is legitimate)+- **Colors**: Use HEX values; for transparency use `fill-opacity` / `stroke-opacity`+- **Image references**: `<image href="../images/xxx.png" preserveAspectRatio="xMidYMid slice"/>`+- **Icon placeholders**: `<use data-icon="icon-name" x="" y="" width="48" height="48" fill="#HEX"/>` (auto-embedded during post-processing)----## 5. 后处理三步命令+## 5. Post-processing Pipeline (3 Steps)-必须按顺序执行,不可跳过或添加额外参数:+Must be executed in order — skipping or adding extra flags is FORBIDDEN:```bash-# 1. 拆分讲稿到各页备注文件-python3 scripts/total_md_split.py <项目路径>+# 1. Split speaker notes into per-page note files+python3 scripts/total_md_split.py <project_path>-# 2. SVG 后处理(图标嵌入、图片裁剪/嵌入、文本扁平化、圆角矩形转 Path)-python3 scripts/finalize_svg.py <项目路径>+# 2. SVG post-processing (icon embedding, image crop/embed, text flattening, rounded rect to path)+python3 scripts/finalize_svg.py <project_path>-# 3. 导出 PPTX(从 svg_final/ 导出,默认嵌入演讲备注)-python3 scripts/svg_to_pptx.py <项目路径> -s final+# 3. Export PPTX (from svg_final/, embeds speaker notes by default)+python3 scripts/svg_to_pptx.py <project_path> -s final```-**禁止事项**:-- 禁止用 `cp` 替代 `finalize_svg.py`-- 禁止从 `svg_output/` 直接导出,必须从 `svg_final/`(`-s final`)导出-- 禁止添加 `--only` 等额外参数-- Optimizer 优化后需重新执行全部三步+**Prohibited**:+- NEVER use `cp` as a substitute for `finalize_svg.py`+- NEVER export directly from `svg_output/` — MUST export from `svg_final/` (use `-s final`)+- NEVER add extra flags like `--only`+- After Optimizer optimization, re-run all three steps----## 6. 项目目录结构+## 6. Project Directory Structure```project/-├── svg_output/ # 原始 SVG(Executor 输出,含占位符)-├── svg_final/ # 后处理完成的最终 SVG(finalize_svg.py 输出)-├── images/ # 图片资源(用户提供 + AI 生成)-├── notes/ # 演讲备注(与 SVG 同名的 .md 文件)-│ └── total.md # 完整演讲备注文稿(拆分前)-├── templates/ # 项目使用的模板(如有)-└── *.pptx # 导出的 PPT 文件+├── svg_output/ # Raw SVGs (Executor output, contains placeholders)+├── svg_final/ # Post-processed final SVGs (finalize_svg.py output)+├── images/ # Image assets (user-provided + AI-generated)+├── notes/ # Speaker notes (.md files matching SVG names)+│ └── total.md # Complete speaker notes document (before splitting)+├── templates/ # Project templates (if any)+└── *.pptx # Exported PPT file```diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex f8d4728d..0b9adc0a 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -1,344 +1,344 @@# Role: Strategist-## 核心使命+## Core Mission-作为顶尖 AI 演示文稿策略师,接收源文档,进行内容分析与设计规划,输出 **《演示文稿设计规范与内容大纲》**。+As a top-tier AI presentation strategist, receive source documents, perform content analysis and design planning, and output the **Design Specification & Content Outline** (hereafter `design_spec`).-## 流程上下文+## Pipeline Context-| 上一步 | 当前 | 下一步 |-|--------|------|--------|-| 项目创建 + 模板选项确认 | **策略师**:八项确认 + 设计规范 | Image_Generator 或 Executor |+| Previous Step | Current | Next Step |+|--------------|---------|-----------|+| Project creation + Template option confirmed | **Strategist**: Eight Confirmations + Design Spec | Image_Generator or Executor |-> 📎 SVG 技术约束、PPT 兼容性规则、画布格式表、后处理命令见 shared-standards.md+> See shared-standards.md for SVG technical constraints, PPT compatibility rules, canvas format table, and post-processing commands.----## 1. 八项确认流程+## 1. Eight Confirmations Process-⛔ **BLOCKING**:在开始分析前,参考 `templates/design_spec_reference.md` 并对以下八项给出专业建议,然后**打包呈现给用户,等待用户明确回复**(确认或修改)。+⛔ **BLOCKING**: Before starting analysis, reference `templates/design_spec_reference.md` and provide professional recommendations for the following eight items, then **present them as a bundled package to the user and wait for explicit confirmation or modifications**.-> 💡 **执行纪律**:这是本流程中除了模板选择外的最后一个 BLOCKING 环节。一旦用户回复确认,AI 必须自动完成《设计规范与内容大纲》的撰写,并无缝进入后续图片生成(若有)、SVG 生成及后处理流程,禁止在中间产生额外的询问或停顿。+> **Execution discipline**: This is the last BLOCKING checkpoint in the pipeline (besides template selection). Once the user confirms, the AI must automatically complete the Design Specification & Content Outline and seamlessly proceed to subsequent image generation (if applicable), SVG generation, and post-processing — no additional questions or pauses in between.-### a. 画布格式确认+### a. Canvas Format Confirmation-根据场景推荐格式(详见 shared-standards.md 画布格式速查表)。+Recommend format based on scenario (see canvas format quick reference in shared-standards.md).-### b. 页数范围确认+### b. Page Count Confirmation-根据源文档内容量提供具体页数建议。+Provide specific page count recommendation based on source document content volume.-### c. 关键信息确认+### c. Key Information Confirmation-确认目标受众、使用场合、核心信息,根据文档性质提供初步判断。+Confirm target audience, usage occasion, and core message; provide initial assessment based on document nature.-### d. 风格目标确认+### d. Style Objective Confirmation-| 风格 | 核心定位 | 适合受众 | 一句话特点 |-|------|----------|----------|------------|-| **A) 通用灵活** | 视觉冲击优先 | 公众/客户/学员 | 「让人一眼被吸引」 |-| **B) 一般咨询** | 数据清晰优先 | 团队/管理层 | 「让数据说话」 |-| **C) 顶级咨询** | 逻辑说服优先 | 高管/董事会 | 「让结论先行」 |+| Style | Core Focus | Target Audience | One-line Description |+|-------|-----------|----------------|---------------------|+| **A) General Versatile** | Visual impact first | Public / clients / trainees | "Catch the eye at a glance" |+| **B) General Consulting** | Data clarity first | Teams / management | "Let data speak" |+| **C) Top Consulting** | Logical persuasion first | Executives / board | "Lead with conclusions" |-**风格选择决策树**:+**Style selection decision tree**:```-内容特征?- ├─ 大量图片/宣传性强 ──→ A) 通用灵活- ├─ 数据分析/进展汇报 ──→ B) 一般咨询- └─ 战略决策/说服高管 ──→ C) 顶级咨询--受众?- ├─ 公众/客户/学员 ────→ A) 通用灵活- ├─ 团队/管理层 ───────→ B) 一般咨询- └─ 高管/董事会/投资人 → C) 顶级咨询+Content characteristics?+ ├── Heavy imagery / promotional ──→ A) General Versatile+ ├── Data analysis / progress report ──→ B) General Consulting+ └── Strategic decisions / persuading executives ──→ C) Top Consulting++Audience?+ ├── Public / clients / trainees ────→ A) General Versatile+ ├── Teams / management ────────────→ B) General Consulting+ └── Executives / board / investors → C) Top Consulting```-### e. 配色方案建议+### e. Color Scheme Recommendation-基于内容特征和行业属性主动提供配色方案(HEX 色值)。+Proactively provide a color scheme (HEX values) based on content characteristics and industry.-**行业配色速查**(完整 14 行业见 `scripts/config.py` 的 `INDUSTRY_COLORS`):+**Industry color quick reference** (full 14-industry list in `scripts/config.py` under `INDUSTRY_COLORS`):-| 行业 | 主导色 | 特点 |-|------|--------|------|-| 金融/商务 | `#003366` 深蓝 | 稳重信赖 |-| 科技/互联网 | `#1565C0` 明蓝 | 创新活力 |-| 医疗/健康 | `#00796B` 青绿 | 专业安心 |-| 政务/政府 | `#C41E3A` 中国红 | 庄重权威 |+| Industry | Primary Color | Characteristics |+|----------|--------------|-----------------|+| Finance / Business | `#003366` Navy Blue | Stable, trustworthy |+| Technology / Internet | `#1565C0` Bright Blue | Innovative, energetic |+| Healthcare / Health | `#00796B` Teal Green | Professional, reassuring |+| Government / Public Sector | `#C41E3A` Red | Authoritative, dignified |-**配色规则**:60-30-10 法则(主导色 60%、辅助色 30%、强调色 10%);文本对比度 >= 4.5:1;单页不超 4 色。+**Color rules**: 60-30-10 rule (primary 60%, secondary 30%, accent 10%); text contrast ratio >= 4.5:1; no more than 4 colors per page.-### f. 图标使用方式确认+### f. Icon Usage Confirmation-| 选项 | 方式 | 适用场景 |-|------|------|----------|-| **A** | Emoji 表情 | 轻松活泼、社交媒体 |-| **B** | AI 生成 | 需要定制风格 |-| **C** | 内置图标库 | 专业场景(推荐) |-| **D** | 自定义图标 | 有品牌素材 |+| Option | Approach | Suitable Scenarios |+|--------|----------|-------------------|+| **A** | Emoji | Casual, playful, social media |+| **B** | AI-generated | Custom style needed |+| **C** | Built-in icon library | Professional scenarios (recommended) |+| **D** | Custom icons | Has brand assets |-内置库含 640+ 图标,详见 `templates/icons/README.md`。+Built-in library contains 640+ icons; see `templates/icons/README.md`.-> **选择 C 时的强制规则**:-> 1. 查阅 `templates/icons/icons_index.json` 验证图标存在-> 2. 图标名称为单一名称(如 `factory`),不含路径前缀-> 3. 禁止使用索引中不存在的名称-> 4. 在《设计规范》中列出最终图标清单,Executor 只能使用清单内图标+> **Mandatory rules when choosing C**:+> 1. Consult `templates/icons/icons_index.json` to verify icon existence+> 2. Icon names are single names (e.g., `factory`), no path prefixes+> 3. Using names not in the index is FORBIDDEN+> 4. List the final icon inventory in the Design Spec; Executor may only use icons from this list>-> **快速查找**:按分类 → `icons_index.json` 的 `categories`;按语义 → `quickLookup`;完整列表 → `templates/icons/FULL_INDEX.md`+> **Quick lookup**: By category → `icons_index.json` `categories`; by semantics → `quickLookup`; full list → `templates/icons/FULL_INDEX.md`-### g. 图片使用确认+### g. Image Usage Confirmation-| 选项 | 方式 | 适用场景 |-|------|------|----------|-| **A** | 不使用图片 | 数据报告、流程说明 |-| **B** | 用户提供 | 有现成图片素材 |-| **C** | AI 生成 | 需要定制插图、背景 |-| **D** | 占位符预留 | 后期补充图片 |+| Option | Approach | Suitable Scenarios |+|--------|----------|-------------------|+| **A** | No images | Data reports, process documentation |+| **B** | User-provided | Has existing image assets |+| **C** | AI-generated | Custom illustrations, backgrounds needed |+| **D** | Placeholders | Images to be added later |-**选择包含 B 时**,必须在输出规范前运行 `python3 scripts/analyze_images.py <项目路径>/images`,将扫描结果整合进图片资源清单。+**When selection includes B**, you must run `python3 scripts/analyze_images.py <project_path>/images` before outputting the spec, and integrate scan results into the image resource list.-**选择 B/C/D 时**,在规范中添加图片资源清单:+**When B/C/D is selected**, add an image resource list to the spec:-| 列 | 说明 |-|----|------|-| 文件名 | 如 `cover_bg.png` |-| 尺寸 | 如 `1280x720` |-| 比例 | 如 `1.78` |-| 布局建议 | 如 `宽幅横图 (适合全屏/插图)` |-| 用途 | 如 `封面背景` |-| 类型 | 背景图 / 实景照片 / 插画配图 / 图表架构 / 装饰图案 |-| 状态 | 待生成 / 已有 / 占位符 |-| 生成描述 | AI 生成时填写详细描述 |+| Column | Description |+|--------|-------------|+| Filename | e.g., `cover_bg.png` |+| Dimensions | e.g., `1280x720` |+| Ratio | e.g., `1.78` |+| Layout suggestion | e.g., `Wide landscape (suitable for full-screen/illustration)` |+| Purpose | e.g., `Cover background` |+| Type | Background / Photography / Illustration / Diagram / Decorative pattern |+| Status | Pending generation / Existing / Placeholder |+| Generation description | Fill in detailed description for AI generation |-**图片类型说明**:+**Image type descriptions**:-| 类型 | 适用场景 |-|------|----------|-| 背景图 | 封面/章节页全页背景,需预留文字区域 |-| 实景照片 | 真实场景、人物、产品、建筑 |-| 插画配图 | 扁平设计、矢量风格、概念图解 |-| 图表架构 | 流程图、架构图、概念关系图 |-| 装饰图案 | 局部装饰、纹理、边框、分隔元素 |+| Type | Suitable Scenarios |+|------|-------------------|+| Background | Full-page backgrounds for covers/chapter pages; reserve text area |+| Photography | Real scenes, people, products, architecture |+| Illustration | Flat design, vector style, concept diagrams |+| Diagram | Flowcharts, architecture diagrams, concept relationship maps |+| Decorative pattern | Partial decoration, textures, borders, divider elements |-**图片与布局适配原则**(详细计算规则参考 `references/image-layout-spec.md`):+**Image-layout alignment principles** (detailed calculation rules in `references/image-layout-spec.md`):-| 图片比例 | 推荐布局 |-|----------|----------|-| > 2.0 (超宽) | 上下分栏,上方通栏 |-| 1.5-2.0 (宽幅) | 上下分栏 |-| 1.2-1.5 (标准横图) | 左右分栏 |-| 0.8-1.2 (方图) | 左右分栏 |-| < 0.8 (竖图) | 左右分栏,图片在左 |+| Image Ratio | Recommended Layout |+|-------------|-------------------|+| > 2.0 (ultra-wide) | Top-bottom split, top full-width |+| 1.5-2.0 (wide) | Top-bottom split |+| 1.2-1.5 (standard landscape) | Left-right split |+| 0.8-1.2 (square) | Left-right split |+| < 0.8 (portrait) | Left-right split, image on left |-核心逻辑:布局容器宽高比必须与图片原始比例相近,禁止宽图塞方形容器或竖图放横向窄条。+Core logic: The layout container's aspect ratio must closely match the image's original ratio. Never force a wide image into a square container or a portrait image into a narrow horizontal strip.-> **流程衔接**:选择 C) AI 生成时,输出设计规范后提示用户调用 Image_Generator,图片归集到 `images/` 后再进入 Executor。+> **Pipeline handoff**: When C) AI generation is selected, after outputting the design spec, prompt the user to invoke Image_Generator. Once images are collected in `images/`, proceed to Executor.-### h. 排版方案(字体 + 字号)+### h. Typography Plan (Font + Size)-#### 字体预设+#### Font Presets-| 场景 | 预设 | 标题 | 正文 | 强调 |-|------|------|------|------|------|-| 现代商务、科技 | P1 | 微软雅黑/Arial | 微软雅黑/Calibri | 黑体 |-| 政务公文、报告 | P2 | 黑体 | 宋体/Times | 宋体 |-| 文化艺术、人文 | P3 | 楷体/Georgia | 微软雅黑 | 黑体 |-| 传统稳重风格 | P4 | 宋体 | 微软雅黑/Arial | 宋体 |-| 英文为主 | P5 | Arial/Impact | Calibri/Georgia | Arial Black |+| Scenario | Preset | Title | Body | Emphasis |+|----------|--------|-------|------|----------|+| Modern business, tech | P1 | Microsoft YaHei / Arial | Microsoft YaHei / Calibri | SimHei |+| Government documents, reports | P2 | SimHei | SimSun / Times | SimSun |+| Culture, arts, humanities | P3 | KaiTi / Georgia | Microsoft YaHei | SimHei |+| Traditional, conservative | P4 | SimSun | Microsoft YaHei / Arial | SimSun |+| English-primary | P5 | Arial / Impact | Calibri / Georgia | Arial Black |-#### 字号基准(所有字号使用 px)+#### Font Size Baseline (all sizes in px)-选择原则:字号根据**内容密度**选择,而非设计风格。+Selection principle: Font size is based on **content density**, not design style.-| 内容密度 | 每页要点 | 正文基准 | 适用场景 |-|----------|----------|----------|----------|-| 宽松 | 3-5 条 | 24px | 演讲型、培训课件 |-| 密集 | 6+ 条 | 18px | 数据报告、咨询分析 |+| Content Density | Points per Page | Body Baseline | Suitable Scenarios |+|----------------|----------------|---------------|-------------------|+| Relaxed | 3-5 items | 24px | Keynote-style, training materials |+| Dense | 6+ items | 18px | Data reports, consulting analysis |-| 层级 | 比例 | 24px 基准 | 18px 基准 |-|------|------|-----------|-----------|-| 封面标题 | 2.5-3x | 60-72px | 45-54px |-| 页面标题 | 1.5-2x | 36-48px | 27-36px |-| **正文** | **1x** | **24px** | **18px** |-| 注释 | 0.75x | 18px | 14px |+| Level | Ratio | 24px Baseline | 18px Baseline |+|-------|-------|---------------|---------------|+| Cover title | 2.5-3x | 60-72px | 45-54px |+| Page title | 1.5-2x | 36-48px | 27-36px |+| **Body** | **1x** | **24px** | **18px** |+| Annotation | 0.75x | 18px | 14px |-### i. 演讲备注要求(默认,无需沟通)+### i. Speaker Notes Requirements (Default — no discussion needed)-- 文件命名:推荐与 SVG 同名(`01_封面.svg` → `notes/01_封面.md`),兼容 `notes/slide01.md`-- 在《设计规范》中填写:演讲总时长、备注风格(正式/口语化/互动式)、讲演目的(告知/说服/激励/指导/汇报)-- 拆分后的备注文件中不允许出现 `#` 标题行(`notes/total.md` 汇总讲稿必须使用 `#` 标题行)+- File naming: Recommended to match SVG names (`01_cover.svg` → `notes/01_cover.md`), also compatible with `notes/slide01.md`+- Fill in the Design Spec: total presentation duration, notes style (formal / conversational / interactive), presentation purpose (inform / persuade / inspire / instruct / report)+- Split note files must NOT contain `#` heading lines (`notes/total.md` master document MUST use `#` heading lines)----## 2. 执行师风格详解(第四项确认依据)+## 2. Executor Style Details (Reference for Confirmation Item #4)-### A) 通用灵活 — Executor_General+### A) General Versatile — Executor_General-**独有能力**:-- 全幅大图 + 渐变蒙版(宣传/推介必备)-- 自由创意布局(不受网格约束)-- 三种风格变体:图文结合、极简演讲(Keynote 风)、创意设计+**Unique capabilities**:+- Full-width images + gradient overlays (essential for promotions)+- Free creative layouts (not grid-constrained)+- Three style variants: image-text hybrid, minimalist keynote, creative design-**典型场景**:招商/文旅推介、产品发布、培训课件、品牌宣传+**Typical scenarios**: Investment promotion, product launches, training materials, brand campaigns-**禁忌**:过于严肃刻板、密集数据表格+**Avoid**: Overly rigid/formal, dense data tables-### B) 一般咨询 — Executor_Consultant+### B) General Consulting — Executor_Consultant-**独有能力**:-- KPI 仪表盘(4 卡片布局,大数字 + 趋势箭头)-- 专业图表组合(柱状图、折线图、饼图、漏斗图)-- 数据颜色分级(红/黄/绿三色达标状态)+**Unique capabilities**:+- KPI dashboards (4-card layout, large numbers + trend arrows)+- Professional chart combinations (bar, line, pie, funnel)+- Data color grading (red/yellow/green status indicators)-**典型场景**:工作进展汇报、财务分析、政府工作报告、招投标/提案+**Typical scenarios**: Progress reports, financial analysis, government reports, proposals/bids-**禁忌**:花哨装饰、图片为主角+**Avoid**: Flashy decorations, image-dominated slides-### C) 顶级咨询 — Executor_Consultant_Top+### C) Top Consulting — Executor_Consultant_Top-**独有能力**:+**Unique capabilities**:-| 能力 | 说明 |-|------|------|-| 数据情境化 | 每个数据必须有对比参照("增长 63%,行业均值仅 12%") |-| SCQA 框架 | 情境 → 冲突 → 问题 → 答案 |-| 金字塔原则 | 结论先行,核心观点放标题位置 |-| 战略性配色 | 颜色服务于信息,不做装饰 |-| 图表 vs 表格 | 趋势用图表,精确值用表格 |+| Capability | Description |+|-----------|-------------|+| Data contextualization | Every data point must have a comparison ("grew 63% — industry average only 12%") |+| SCQA framework | Situation → Complication → Question → Answer |+| Pyramid principle | Conclusion first; core insight in the title position |+| Strategic coloring | Colors serve information, not decoration |+| Chart vs Table | Trends → charts; precise values → tables |-**独有页面元素**:渐变顶条 + 深色核心观点区、机密标识 + 严谨页脚、MECE 分解图 / 驱动因素树 / 瀑布图+**Unique page elements**: Gradient top bar + dark takeaway box, confidential marking + rigorous footer, MECE decomposition / driver tree / waterfall chart-**典型场景**:战略决策报告、深度分析报告、咨询交付物(MBB 级)+**Typical scenarios**: Strategic decision reports, deep analysis reports, consulting deliverables (MBB level)-**禁忌**:孤立数据、主观表述、装饰性元素+**Avoid**: Isolated data, subjective statements, decorative elements----## 3. 配色知识库+## 3. Color Knowledge Base-### 咨询风格配色(专业权威)+### Consulting Style Colors (Professional Authority)-| 品牌/风格 | 色值 | 心理感受 |-|-----------|------|----------|-| 德勤蓝 | `#0076A8` | 专业、可靠 |-| 麦肯锡蓝 | `#005587` | 权威、深度 |-| BCG 深蓝 | `#003F6C` | 稳重、信任 |-| 普华永道橙 | `#D04A02` | 活力、创新 |-| 安永黄 | `#FFE600` | 乐观、清晰 |+| Brand / Style | HEX | Psychological Feel |+|---------------|-----|-------------------|+| Deloitte Blue | `#0076A8` | Professional, reliable |+| McKinsey Blue | `#005587` | Authoritative, deep |+| BCG Dark Blue | `#003F6C` | Stable, trustworthy |+| PwC Orange | `#D04A02` | Energetic, innovative |+| EY Yellow | `#FFE600` | Optimistic, clear |-### 通用灵活配色(现代活力)+### General Versatile Colors (Modern Energy)-| 风格 | 色值 | 适用场景 |-|------|------|----------|-| 科技蓝 | `#2196F3` | 科技、互联网 |-| 活力橙 | `#FF9800` | 营销、推广 |-| 成长绿 | `#4CAF50` | 健康、环保、增长 |-| 专业紫 | `#9C27B0` | 创意、高端 |-| 警示红 | `#F44336` | 紧急、重要 |+| Style | HEX | Suitable Scenarios |+|-------|-----|-------------------|+| Tech Blue | `#2196F3` | Technology, internet |+| Vibrant Orange | `#FF9800` | Marketing, promotion |+| Growth Green | `#4CAF50` | Health, environmental, growth |+| Professional Purple | `#9C27B0` | Creative, premium |+| Alert Red | `#F44336` | Urgent, important |-### 数据可视化配色+### Data Visualization Colors-- 积极趋势(绿色系):`#2E7D32` → `#4CAF50` → `#81C784`-- 警示趋势(黄色系):`#F57C00` → `#FFA726` → `#FFD54F`-- 负面趋势(红色系):`#C62828` → `#EF5350` → `#E57373`+- Positive trend (green): `#2E7D32` → `#4CAF50` → `#81C784`+- Warning trend (yellow): `#F57C00` → `#FFA726` → `#FFD54F`+- Negative trend (red): `#C62828` → `#EF5350` → `#E57373`----## 4. 布局模式速查+## 4. Layout Pattern Quick Reference-| 布局 | 适用场景 | PPT 16:9 参考尺寸 |-|------|----------|-------------------|-| 单栏居中 | 封面、结语、重要观点 | 内容宽 800-1000px,水平居中 |-| 双栏布局 | 对比分析、左图右文 | 栏宽比 1:1 或 3:2,间距 40-60px |-| 三栏布局 | 并列要点、流程步骤 | 栏宽比 1:1:1,间距 30-40px |-| 四象限 | 矩阵分析、分类展示 | 象限 560x250px,间距 20-30px |-| 上下分栏 | 超宽图片+文字 | 图片通栏,文字区 >= 150px 高 |-| 左右分栏 | 标准/竖图+文字 | 图片侧放,文字区 >= 280px 宽 |+| Layout | Suitable Scenarios | PPT 16:9 Reference Dimensions |+|--------|-------------------|-------------------------------|+| Single column centered | Covers, conclusions, key points | Content width 800-1000px, horizontally centered |+| Two-column | Comparative analysis, left-image right-text | Column ratio 1:1 or 3:2, gap 40-60px |+| Three-column | Parallel points, process steps | Column ratio 1:1:1, gap 30-40px |+| Four-quadrant | Matrix analysis, classification | Quadrant 560x250px, gap 20-30px |+| Top-bottom split | Ultra-wide images + text | Image full-width, text area >= 150px height |+| Left-right split | Standard/portrait images + text | Image on side, text area >= 280px width |-**PPT 16:9 (1280x720) 关键尺寸**:安全区域 1200x640(留 40px 边距);标题区 1200x100;内容区 1200x500;页脚区 1200x40。+**PPT 16:9 (1280x720) key dimensions**: Safe area 1200x640 (40px margins); Title area 1200x100; Content area 1200x500; Footer area 1200x40.----## 5. 模板灵活性原则+## 5. Template Flexibility Principle-> 模板是起点,不是终点。+> Templates are starting points, not endpoints.-策略师应在 `scripts/project_manager.py` 生成的模板基础上,结合用户需求、内容特征、受众特点进行专业判断:+The Strategist should make professional judgments on the template basis generated by `scripts/project_manager.py`, considering user needs, content characteristics, and audience:-1. 比例系统可调(字号比例是参考值)-2. 配色方案可定制(结合品牌和内容特征)-3. 布局模式可组合(6 种基础布局自由变化)-4. 内容结构可扩展(12 章节框架可增减)-5. 间距/圆角等细节由 Executor 根据内容密度调整+1. Ratio systems are adjustable (font size ratios are reference values)+2. Color schemes are customizable (based on brand and content)+3. Layout modes can be combined (6 base layouts with free variation)+4. Content structure is extensible (12-chapter framework can be expanded or reduced)+5. Spacing / border radius details adjusted by Executor based on content density----## 6. 工作流程与交付物--### 6.1 内容规划策略--| 风格 | 内容大纲 | 设计规范 | 演讲备注 |-|------|----------|----------|----------|-| A) 通用灵活 | 智能解构源文档,每页定义核心主题 | 视觉主题、色彩方案、布局原则 | 简洁演讲稿 |-| B) 一般咨询 | 结构化逻辑板块,数据驱动洞察 | 咨询风格配色、内容结构化布局 | 专业术语、数据解读、结论先行 |-| C) 顶级咨询 | SCQA 框架,金字塔原则结论先行 | 数据情境化、颜色战略性使用 | 高度凝练、逻辑严密、结论驱动 |--### 6.2 大纲输出规范(必须包含 12 章节)--| 章节 | 内容要求 |-|------|----------|-| 一、项目信息 | 项目名称、画布格式、页数、风格、受众、场景、日期 |-| 二、画布规范 | 格式、尺寸、viewBox、边距、内容区域 |-| 三、视觉主题 | 风格说明、亮/深主题、调性、配色方案(含色值表)、渐变方案 |-| 四、排版体系 | 字体方案(P1-P5)、字号层级(H1-Code 7级) |-| 五、布局原则 | 页面结构(页眉/内容/页脚区)、6种布局模式、间距规范 |-| 六、图标使用规范 | 来源说明、占位符语法、推荐图标清单 |-| 七、图片资源清单 | 文件名、尺寸、比例、用途、状态、生成描述 |-| 八、内容大纲 | 按章节分组,每页含布局、标题、内容要点 |-| 九、演讲备注要求 | 文件命名规则、内容结构说明 |-| 十、技术约束提醒 | SVG 生成规则、PPT 兼容性规则 |-| 十一、设计检查清单 | 生成前/生成后检查项 |-| 十二、下一步 | 明确后续流程(Image_Generator 或 Executor) |--**生成步骤**:-1. 读取参考模板:`templates/design_spec_reference.md`-2. 结合分析内容从头生成完整规范-3. 保存至:`projects/<项目名>.../设计规范与内容大纲.md`+## 6. Workflow & Deliverables++### 6.1 Content Planning Strategy++| Style | Content Outline | Design Spec | Speaker Notes |+|-------|----------------|-------------|---------------|+| A) General Versatile | Intelligently deconstruct source doc; define core theme per page | Visual theme, color scheme, layout principles | Concise presentation script |+| B) General Consulting | Structured logical sections; data-driven insights | Consulting-style colors, structured content layout | Professional terms, data interpretation, conclusion-first |+| C) Top Consulting | SCQA framework, pyramid principle conclusion-first | Data contextualization, strategic color usage | Highly condensed, logically rigorous, conclusion-driven |++### 6.2 Outline Output Specification (Must include 12 chapters)++| Chapter | Content Requirements |+|---------|---------------------|+| I. Project Information | Project name, canvas format, page count, style, audience, scenario, date |+| II. Canvas Specification | Format, dimensions, viewBox, margins, content area |+| III. Visual Theme | Style description, light/dark theme, tone, color scheme (with HEX table), gradient scheme |+| IV. Typography System | Font plan (P1-P5), font size hierarchy (H1-Code, 7 levels) |+| V. Layout Principles | Page structure (header/content/footer zones), 6 layout modes, spacing spec |+| VI. Icon Usage Spec | Source description, placeholder syntax, recommended icon list |+| VII. Image Resource List | Filename, dimensions, ratio, purpose, status, generation description |+| VIII. Content Outline | Grouped by chapter; each page includes layout, title, content points |+| IX. Speaker Notes Requirements | File naming rules, content structure description |+| X. Technical Constraints Reminder | SVG generation rules, PPT compatibility rules |+| XI. Design Checklist | Pre-generation / post-generation check items |+| XII. Next Steps | Clarify subsequent pipeline (Image_Generator or Executor) |++**Generation steps**:+1. Read reference template: `templates/design_spec_reference.md`+2. Generate complete spec from scratch based on analysis+3. Save to: `projects/<project_name>.../design_spec.md`----## 7. 项目文件夹+## 7. Project Folder-项目文件夹应在进入策略师角色之前已创建。如未创建,先执行:+The project folder should be created before entering the Strategist role. If not yet created, execute:```bash-python3 scripts/project_manager.py init <项目名称> --format <画布格式>+python3 scripts/project_manager.py init <project_name> --format <canvas_format>```-策略师将《设计规范与内容大纲》保存至 `projects/<项目名>_<格式>_<YYYYMMDD>/设计规范与内容大纲.md`。+The Strategist saves the Design Specification & Content Outline to `projects/<project_name>_<format>_<YYYYMMDD>/design_spec.md`.----## 8. 完成设计规范并提示下一步+## 8. Complete Design Spec and Prompt Next Steps-根据已确认的模板选项和图片使用选择提示下一步。+Prompt the next step based on the confirmed template option and image usage selection.-### 模板选项 A(使用已有模板)+### Template Option A (Using existing template)```-✅ 设计规范已完成。模板已就绪。-下一步:-- 图片包含 AI 生成 → 调用 Image_Generator-- 图片不包含 AI 生成 → 调用 Executor+✅ Design spec complete. Template ready.+Next step:+- Images include AI generation → Invoke Image_Generator+- Images do not include AI generation → Invoke Executor```-### 模板选项 B(不使用模板)+### Template Option B (No template)```-✅ 设计规范已完成。-下一步:-- 图片包含 AI 生成 → 调用 Image_Generator-- 图片不包含 AI 生成 → 调用 Executor(自由生成每一页)+✅ Design spec complete.+Next step:+- Images include AI generation → Invoke Image_Generator+- Images do not include AI generation → Invoke Executor (free design for every page)```diff --git a/skills/ppt-master/references/svg-image-embedding.md b/skills/ppt-master/references/svg-image-embedding.mdindex 70f3e1b6..4d11eb56 100644--- a/skills/ppt-master/references/svg-image-embedding.md+++ b/skills/ppt-master/references/svg-image-embedding.md@@ -1,109 +1,109 @@-> 📎 公共技术约束见 shared-standards.md+> See shared-standards.md for common technical constraints.-# SVG 图片嵌入指南+# SVG Image Embedding Guide-在 SVG 文件中添加图片的技术规范和推荐工作流。+Technical specifications and recommended workflow for adding images to SVG files.----## 图片资源清单格式+## Image Resource List Format-在《设计规范与内容大纲》中定义,每张图片标注状态。若图片方案包含「B) 用户提供」,需在 Strategist 阶段完成八项确认后立即运行 `analyze_images.py`,并在输出设计规范前完成清单填充。+Defined in the Design Specification & Content Outline; each image has a status annotation. If the image approach includes "B) User-provided", you must run `analyze_images.py` immediately after the Strategist completes the Eight Confirmations, and complete the list before outputting the design spec.```markdown-| 文件名 | 尺寸 | 用途 | 状态 | 生成描述 |-|--------|------|------|------|----------|-| cover_bg.png | 1280x720 | 封面背景 | 待生成 | 现代科技感抽象背景,深蓝渐变 |-| product.png | 600x400 | 第3页 | 已有 | - |-| team.png | 600x400 | 第5页 | 占位符 | 团队协作场景(后期补充) |+| Filename | Dimensions | Purpose | Status | Generation Description |+|----------|-----------|---------|--------|----------------------|+| cover_bg.png | 1280x720 | Cover background | Pending | Modern tech abstract background, deep blue gradient |+| product.png | 600x400 | Page 3 | Existing | - |+| team.png | 600x400 | Page 5 | Placeholder | Team collaboration scene (to be added later) |```-### 三种状态的处理+### Three Status Types-| 状态 | 含义 | Executor 处理方式 |-|------|------|-------------------|-| **待生成** | 需 AI 生成,有描述 | 先生成图片放入 `images/`,再用 `<image>` 引用 |-| **已有** | 用户已有图片 | 放入 `images/`,用 `<image>` 引用 |-| **占位符** | 暂不处理 | 用虚线框占位,后期替换 |+| Status | Meaning | Executor Handling |+|--------|---------|-------------------|+| **Pending** | Needs AI generation, has description | Generate image first into `images/`, then reference with `<image>` |+| **Existing** | User already has image | Place in `images/`, reference with `<image>` |+| **Placeholder** | Not yet processed | Use dashed border placeholder; replace later |----## 工作流程+## Workflow```-1. Strategist 定义图片需求 → 添加图片资源清单,标注每张状态-2. 图片准备(待生成/已有)→ 放入 项目/images/-3. Executor 生成 SVG(svg_output/)- ├── 已有/待生成 → <image href="../images/xxx.png" .../>- └── 占位符 → 虚线框 + 描述文本-4. 预览:python3 -m http.server -d <项目路径> 8000 → /svg_output/<文件名>.svg-5. 后处理与导出- ├── python3 scripts/finalize_svg.py <项目路径>- └── python3 scripts/svg_to_pptx.py <项目路径> -s final+1. Strategist defines image needs → Add image resource list, annotate each status+2. Image preparation (pending/existing) → Place in project/images/+3. Executor generates SVGs (svg_output/)+ ├── Existing/Pending → <image href="../images/xxx.png" .../>+ └── Placeholder → Dashed border + description text+4. Preview: python3 -m http.server -d <project_path> 8000 → /svg_output/<filename>.svg+5. Post-processing & Export+ ├── python3 scripts/finalize_svg.py <project_path>+ └── python3 scripts/svg_to_pptx.py <project_path> -s final```-> 推荐:生成阶段在 `svg_output/` 保留外部引用,后处理通过 `finalize_svg.py` 自动嵌入图片到 `svg_final/`,再从 `svg_final/` 导出 PPTX。+> Recommended: During generation, keep external references in `svg_output/`. Post-processing via `finalize_svg.py` auto-embeds images into `svg_final/`, then export PPTX from `svg_final/`.----## 外部引用 vs Base64 内嵌+## External Reference vs Base64 Embedding-| 方式 | 优点 | 缺点 | 适用场景 |-|------|------|------|----------|-| **外部引用** | 文件小、迭代快、便于替换 | 预览需从项目根起 HTTP 服务 | `svg_output/` 开发阶段 |-| **Base64 内嵌** | 文件独立、导出稳定 | 文件体积大 | `svg_final/` 交付阶段 |+| Method | Pros | Cons | Suitable For |+|--------|------|------|-------------|+| **External reference** | Small file size, fast iteration, easy to replace | Preview requires HTTP server from project root | `svg_output/` development phase |+| **Base64 embedding** | Self-contained file, stable export | Large file size | `svg_final/` delivery phase |----## 方式一:外部引用(生成阶段推荐)+## Method 1: External Reference (Recommended for Generation Phase)-### 语法+### Syntax```xml<image href="../images/image.png" x="0" y="0" width="1280" height="720"preserveAspectRatio="xMidYMid slice"/>```-### 关键属性+### Key Attributes-| 属性 | 说明 | 示例 |-|------|------|------|-| `href` | 图片路径(相对或绝对) | `"../images/cover.png"` |-| `x`, `y` | 图片左上角位置 | `x="0" y="0"` |-| `width`, `height` | 图片显示尺寸 | `width="1280" height="720"` |-| `preserveAspectRatio` | 缩放方式 | `"xMidYMid slice"` |+| Attribute | Description | Example |+|-----------|-------------|---------|+| `href` | Image path (relative or absolute) | `"../images/cover.png"` |+| `x`, `y` | Image top-left corner position | `x="0" y="0"` |+| `width`, `height` | Image display dimensions | `width="1280" height="720"` |+| `preserveAspectRatio` | Scaling mode | `"xMidYMid slice"` |-### preserveAspectRatio 常用值+### preserveAspectRatio Common Values-| 值 | 效果 |-|----|------|-| `xMidYMid slice` | 居中裁剪(类似 CSS `cover`) |-| `xMidYMid meet` | 完整显示(类似 CSS `contain`) |-| `none` | 拉伸填满,不保持比例 |+| Value | Effect |+|-------|--------|+| `xMidYMid slice` | Center crop (similar to CSS `cover`) |+| `xMidYMid meet` | Complete display (similar to CSS `contain`) |+| `none` | Stretch to fill, no aspect ratio preservation |-### 预览方式+### Preview Method-浏览器安全限制下,直接双击 SVG 无法加载外部图片。从项目根目录启动 HTTP 服务器:+Browser security restrictions prevent loading external images from directly opened SVGs. Start an HTTP server from the project root:```bash-python3 -m http.server -d <项目路径> 8000-# 访问 http://localhost:8000/svg_output/your_file.svg+python3 -m http.server -d <project_path> 8000+# Visit http://localhost:8000/svg_output/your_file.svg```----## 方式二:Base64 内嵌(交付阶段推荐)+## Method 2: Base64 Embedding (Recommended for Delivery Phase)-### 语法+### Syntax```xml<image href="data:image/png;base64,iVBORw0KGgo..." x="0" y="0" width="1280" height="720"/>```-### MIME 类型+### MIME Types-| MIME 类型 | 文件格式 |-|-----------|----------|+| MIME Type | File Format |+|-----------|-------------|| `image/png` | PNG || `image/jpeg` | JPG/JPEG || `image/gif` | GIF |@@ -112,66 +112,66 @@ python3 -m http.server -d <项目路径> 8000----## 转换流程+## Conversion Process-### 推荐:统一走 finalize_svg.py+### Recommended: Use finalize_svg.py (Unified Pipeline)```bash-python3 scripts/finalize_svg.py <项目路径> # 图标、图片、文本、圆角一次处理-python3 scripts/svg_to_pptx.py <项目路径> -s final # 从最终版本导出 PPTX+python3 scripts/finalize_svg.py <project_path> # Icons, images, text, rounded rects — all in one pass+python3 scripts/svg_to_pptx.py <project_path> -s final # Export PPTX from final version```-### 独立使用 embed_images.py(高级用法)+### Standalone: embed_images.py (Advanced Usage)-仅处理特定 SVG 而不跑完整后处理时:+For processing specific SVGs without running the full pipeline:```bash-python3 scripts/embed_images.py <svg文件> # 单个-python3 scripts/embed_images.py <项目路径>/svg_output/*.svg # 批量-python3 scripts/embed_images.py --dry-run <项目路径>/svg_output/*.svg # 预览+python3 scripts/embed_images.py <svg_file> # Single file+python3 scripts/embed_images.py <project_path>/svg_output/*.svg # Batch+python3 scripts/embed_images.py --dry-run <project_path>/svg_output/*.svg # Preview```----## 最佳实践+## Best Practices-### 图片优化+### Image Optimization-嵌入前压缩图片以减少文件体积:+Compress images before embedding to reduce file size:```bashconvert input.png -quality 85 -resize 1920x1080\> output.png # ImageMagick-pngquant --quality=65-80 input.png -o output.png # pngquant(推荐)+pngquant --quality=65-80 input.png -o output.png # pngquant (recommended)```-### 文件组织+### File Organization```project/-├── images/ # 图片资源-├── sources/ # 源文件及其附带图片+├── images/ # Image assets+├── sources/ # Source files and their accompanying images│ └── article_files/-├── svg_output/ # 原始版本(外部引用)-└── svg_final/ # 最终版本(已嵌入图片)+├── svg_output/ # Raw version (external references)+└── svg_final/ # Final version (images embedded)```-### 圆角处理(禁止 clipPath)+### Rounded Corner Handling (clipPath Forbidden)-由于 `clipPath` 在 PPT 中不兼容,禁止使用裁剪路径为图片加圆角。替代方案:-- 生成图片时直接处理圆角(导出为带圆角的 PNG)-- 或用同尺寸圆角矩形覆盖边缘(视觉模拟)+Since `clipPath` is incompatible with PPT, clipping paths for image rounded corners are FORBIDDEN. Alternatives:+- Process rounded corners during image generation (export PNG with rounded corners)+- Or overlay a same-size rounded rectangle over the edges (visual simulation)----## 常见问题+## FAQ-**Q: 直接打开 SVG 看不到图片?**-浏览器安全策略阻止跨目录请求。从项目根目录启动 HTTP 服务器,或先运行 `finalize_svg.py` 再查看 `svg_final/`。+**Q: Can't see images when opening SVG directly?**+Browser security policy blocks cross-directory requests. Start an HTTP server from the project root, or run `finalize_svg.py` first then view from `svg_final/`.-**Q: Base64 文件太大?**-压缩原始图片、使用 JPEG 格式、降低分辨率(匹配实际显示尺寸即可)。+**Q: Base64 file too large?**+Compress the original image, use JPEG format, reduce resolution (match actual display dimensions).-**Q: 如何反向提取 Base64 图片?**+**Q: How to reverse-extract a Base64 image?**```bashbase64 -d image.b64 > image.png```diff --git a/skills/ppt-master/references/template-designer.md b/skills/ppt-master/references/template-designer.mdindex 12a74489..d2ab5e2a 100644--- a/skills/ppt-master/references/template-designer.md+++ b/skills/ppt-master/references/template-designer.md@@ -1,165 +1,165 @@-> 📎 公共技术约束见 shared-standards.md+> See shared-standards.md for common technical constraints.-# Template Designer — 模板设计角色+# Template Designer — Template Design Role-## 核心使命+## Core Mission-基于《设计规范与内容大纲》生成项目专属的页面模板,供用户确认后用于批量内容生成。+Generate project-specific page templates based on the Design Specification & Content Outline, for user confirmation before batch content generation.-> 这是一个独立角色:仅通过 `/create-template` 工作流触发,不在 PPT 生成流程中使用。+> This is a standalone role: only triggered via the `/create-template` workflow; not used in the PPT generation pipeline.-## 使用方式+## Usage-- **触发方式**:`/create-template` 工作流-- **输出位置**:`templates/layouts/<模板名称>/`+- **Trigger**: `/create-template` workflow+- **Output location**: `templates/layouts/<template_name>/`----## 核心模板清单+## Core Template Inventory-| 序号 | 文件名 | 用途 | 说明 |-|------|--------|------|------|-| 01 | `01_cover.svg` | 封面 | 固定结构:标题、副标题、日期、机构 |-| 02 | `02_chapter.svg` | 章节页 | 固定结构:章节编号、章节标题 |-| 03 | `03_content.svg` | 内容页 | 灵活结构:只定义页眉页脚,内容区由 AI 自由布局 |-| 04 | `04_ending.svg` | 结束页 | 固定结构:感谢语、联系方式 |-| -- | `02_toc.svg` | 目录页 | 可选:目录标题、章节列表(编号+标题) |+| # | Filename | Purpose | Description |+|---|----------|---------|-------------|+| 01 | `01_cover.svg` | Cover | Fixed structure: title, subtitle, date, organization |+| 02 | `02_chapter.svg` | Chapter page | Fixed structure: chapter number, chapter title |+| 03 | `03_content.svg` | Content page | Flexible structure: only defines header/footer; content area freely laid out by AI |+| 04 | `04_ending.svg` | Ending page | Fixed structure: thank-you message, contact info |+| -- | `02_toc.svg` | Table of contents | Optional: TOC title, chapter list (number + title) |-**设计理念**:模板定义视觉一致性和结构性页面,内容页保持最大灵活性。+**Design philosophy**: Templates define visual consistency and structural pages; content pages maintain maximum flexibility.-**命名说明**:目录页保持 `02_toc.svg` 命名以兼容模板库与排序规则。+**Naming note**: TOC page keeps `02_toc.svg` naming for template library compatibility and sort order.-### 可选扩展页(按需)+### Optional Extension Pages (As Needed)-- 过渡页 / 小节页(如 `05_section_break.svg`)-- 附录页(如 `06_appendix.svg`)-- 免责声明 / 保密页(如 `07_disclaimer.svg`)+- Transition / sub-section page (e.g., `05_section_break.svg`)+- Appendix page (e.g., `06_appendix.svg`)+- Disclaimer / confidentiality page (e.g., `07_disclaimer.svg`)----## 模板设计规范+## Template Design Specifications-### 1. 必须生成 design_spec.md+### 1. Must Generate design_spec.md-创建全局模板时,必须生成 `design_spec.md`,包含:+When creating a global template, a `design_spec.md` must be generated, containing:```markdown-# [模板名称] - 设计规范--## 一、模板概述(名称、适用场景、设计调性)-## 二、画布规范(16:9, 1280x720, viewBox)-## 三、配色方案(主色、辅助色、强调色 HEX 值)-## 四、排版体系(字体栈、字号层级)-## 五、页面结构(通用布局、装饰设计)-## 六、页面类型(4 种核心页面)-## 七、布局模式(推荐)-## 八、间距规范-## 九、SVG 技术约束-## 十、占位符规范+# [Template Name] - Design Specification++## I. Template Overview (name, use cases, design tone)+## II. Canvas Specification (16:9, 1280x720, viewBox)+## III. Color Scheme (primary, secondary, accent HEX values)+## IV. Typography System (font stack, font size hierarchy)+## V. Page Structure (common layout, decorative design)+## VI. Page Types (4 core page types)+## VII. Layout Modes (recommended)+## VIII. Spacing Specification+## IX. SVG Technical Constraints+## X. Placeholder Specification```-### 2. 继承设计规范+### 2. Inherit Design Specification-模板必须严格遵循《设计规范与内容大纲》中的:-- **画布尺寸**:viewBox 与设计规范一致-- **配色方案**:使用规范中的主导色、辅助色、强调色-- **字体方案**:使用规范中的字体预设-- **布局原则**:边距、间距符合规范+Templates must strictly follow the Design Specification & Content Outline:+- **Canvas dimensions**: viewBox matches the design spec+- **Color scheme**: Uses primary, secondary, and accent colors from the spec+- **Font plan**: Uses font presets from the spec+- **Layout principles**: Margins and spacing conform to the spec-### 3. 占位符标记+### 3. Placeholder Markers-使用明确的占位符标记可替换内容:+Use clear placeholder markers for replaceable content:```xml-<!-- 文本占位符 -->+<!-- Text placeholder --><text x="80" y="320" fill="#FFFFFF" font-size="48" font-weight="bold">{{TITLE}}</text>-<!-- 内容区占位符(内容页专用) -->+<!-- Content area placeholder (content page only) --><rect x="40" y="90" width="1200" height="550" fill="#FFFFFF" rx="8"/><text x="640" y="365" text-anchor="middle" fill="#CBD5E1" font-size="16">{{CONTENT_AREA}}</text>```-### 4. 占位符规范--| 占位符 | 用途 | 适用模板 |-|--------|------|----------|-| `{{TITLE}}` | 主标题 | 封面 |-| `{{SUBTITLE}}` | 副标题 | 封面 |-| `{{DATE}}` | 日期 | 封面 |-| `{{AUTHOR}}` | 作者/机构 | 封面 |-| `{{TOC_TITLE}}` | 目录标题 | 目录页 |-| `{{TOC_ITEMS}}` | 目录项列表 | 目录页 |-| `{{CHAPTER_NUM}}` | 章节编号 | 章节页 |-| `{{CHAPTER_TITLE}}` | 章节标题 | 章节页 |-| `{{CHAPTER_DESC}}` | 章节描述 | 章节页 |-| `{{PAGE_TITLE}}` | 页面标题 | 内容页 |-| `{{KEY_MESSAGE}}` | 核心观点 | 内容页(咨询风格) |-| `{{CONTENT_AREA}}` | 内容区域 | 内容页 |-| `{{SECTION_NAME}}` | 章节名称 | 内容页页脚 |-| `{{SOURCE}}` | 数据来源 | 内容页页脚 |-| `{{PAGE_NUM}}` | 页码 | 内容页、结束页 |-| `{{THANK_YOU}}` | 感谢语 | 结束页 |-| `{{TAGLINE}}` | 口号 | 结束页 |-| `{{CONTACT_INFO}}` | 联系信息 | 结束页 |-| `{{COPYRIGHT}}` | 版权 | 结束页 |+### 4. Placeholder Reference++| Placeholder | Purpose | Applicable Template |+|------------|---------|-------------------|+| `{{TITLE}}` | Main title | Cover |+| `{{SUBTITLE}}` | Subtitle | Cover |+| `{{DATE}}` | Date | Cover |+| `{{AUTHOR}}` | Author / Organization | Cover |+| `{{TOC_TITLE}}` | TOC title | TOC page |+| `{{TOC_ITEMS}}` | TOC item list | TOC page |+| `{{CHAPTER_NUM}}` | Chapter number | Chapter page |+| `{{CHAPTER_TITLE}}` | Chapter title | Chapter page |+| `{{CHAPTER_DESC}}` | Chapter description | Chapter page |+| `{{PAGE_TITLE}}` | Page title | Content page |+| `{{KEY_MESSAGE}}` | Key takeaway | Content page (consulting style) |+| `{{CONTENT_AREA}}` | Content area | Content page |+| `{{SECTION_NAME}}` | Section name | Content page footer |+| `{{SOURCE}}` | Data source | Content page footer |+| `{{PAGE_NUM}}` | Page number | Content page, ending page |+| `{{THANK_YOU}}` | Thank-you message | Ending page |+| `{{TAGLINE}}` | Tagline / slogan | Ending page |+| `{{CONTACT_INFO}}` | Contact info | Ending page |+| `{{COPYRIGHT}}` | Copyright | Ending page |----## 输出要求+## Output Requirements-### 文件保存位置+### File Save Location```-templates/layouts/<模板名称>/-├── design_spec.md # 设计规范(必须)+templates/layouts/<template_name>/+├── design_spec.md # Design specification (required)├── 01_cover.svg├── 02_chapter.svg-├── 02_toc.svg # 可选+├── 02_toc.svg # Optional├── 03_content.svg├── 04_ending.svg-└── *.png / *.jpg # 图片资源(如有)+└── *.png / *.jpg # Image assets (if any)```-### 模板预览+### Template Preview-每个模板生成后,提供简要说明表格,列出各模板状态。+After each template is generated, provide a brief summary table listing each template's status.----## 使用预置模板库(可选)+## Using Pre-built Template Library (Optional)-如已有适合的模板资源,可直接使用而非生成新模板:+If suitable template resources already exist, use them directly instead of generating new ones:-1. **复制模板**:将模板文件复制到项目 `templates/` 目录-2. **调整配色**:根据项目设计规范修改颜色-3. **自定义修改**:根据项目特点个性化调整+1. **Copy template**: Copy template files to the project's `templates/` directory+2. **Adjust colors**: Modify colors per the project design spec+3. **Customize**: Make project-specific adjustments-**示例库结构**(查询 `templates/layouts/layouts_index.json`):+**Example library structure** (query `templates/layouts/layouts_index.json`):```templates/layouts/-├── general/ # 通用灵活风格-├── consultant/ # 咨询风格-└── consultant_top/ # 顶级咨询风格(MBB级)+├── general/ # General versatile style+├── consultant/ # Consulting style+└── consultant_top/ # Top consulting style (MBB level)```----## 阶段完成检查点+## Phase Completion Checkpoint```markdown-## Template_Designer 阶段完成--- [x] 已阅读 `references/template-designer.md`-- [x] 已生成 4 个核心页面模板-- [ ] 目录页模板(可选)-- [ ] 可选扩展页(如需)-- [x] 所有模板已保存到 `templates/` 目录-- [x] 模板遵循设计规范(配色、字体、布局)-- [x] 占位符标记清晰规范-- [ ] **下一步**: 请用户确认模板+## Template_Designer Phase Complete++- [x] Read `references/template-designer.md`+- [x] Generated 4 core page templates+- [ ] TOC page template (optional)+- [ ] Optional extension pages (if needed)+- [x] All templates saved to `templates/` directory+- [x] Templates follow design spec (colors, fonts, layout)+- [x] Placeholder markers are clear and standardized+- [ ] **Next step**: Request user confirmation of templates```diff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.mdindex 4a3222e4..906c5cb6 100644--- a/skills/ppt-master/scripts/README.md+++ b/skills/ppt-master/scripts/README.md@@ -1,32 +1,32 @@-# PPT Master 工具集+# PPT Master Toolset-本目录包含用于项目管理、验证和文件处理的实用工具。+This directory contains utility tools for project management, validation, and file processing.-## 工具架构总览+## Tool Architecture Overview```mermaidgraph TB- subgraph Input["📥 输入转换"]+ subgraph Input["Input Conversion"]A1[pdf_to_md.py]A2[web_to_md.py / .cjs]end-- subgraph Project["📁 项目管理"]++ subgraph Project["Project Management"]B1[project_manager.py]B2[project_utils.py]B1 --> B2end-- subgraph Finalize["⚙️ 后处理 (finalize_svg.py)"]++ subgraph Finalize["Post-processing (finalize_svg.py)"]direction TB- C0[finalize_svg.py<br/>统一入口]+ C0[finalize_svg.py<br/>Unified Entry Point]C1[embed_icons.py]C2[crop_images.py]C3[fix_image_aspect.py]C4[embed_images.py]C5[flatten_tspan.py]C6[svg_rect_to_path.py]-+C0 --> C1C0 --> C2C0 --> C3@@ -34,112 +34,112 @@ graph TBC0 --> C5C0 --> C6end-- subgraph Export["📤 导出"]++ subgraph Export["Export"]D1[svg_to_pptx.py]end-- subgraph Quality["🔍 质量检查"]++ subgraph Quality["Quality Check"]E1[svg_quality_checker.py]E2[batch_validate.py]end-- subgraph Utils["🛠️ 辅助工具"]++ subgraph Utils["Utilities"]F1[rotate_images.py]F2[analyze_images.py]F3[svg_position_calculator.py]F4[config.py]F5[nano_banana_gen.py]end-+A1 --> B1A2 --> B1B1 -->|svg_output/| C0C0 -->|svg_final/| D1- D1 -->|.pptx| Output[📊 PowerPoint]+ D1 -->|.pptx| Output[PowerPoint]```-### 核心工作流+### Core Workflow```-源文档 → [pdf_to_md / web_to_md] → Markdown+Source Document → [pdf_to_md / web_to_md] → Markdown↓[project_manager init]↓- AI 生成 SVG → svg_output/+ AI generates SVG → svg_output/↓- [finalize_svg] ← 聚合 6 个子工具+ [finalize_svg] ← Aggregates 6 sub-tools↓svg_final/↓[svg_to_pptx] → output.pptx```-### 工具分类快速索引--| 分类 | 工具 | 说明 |-|------|------|------|-| **输入转换** | `pdf_to_md.py`, `web_to_md.py/.cjs` | 将 PDF/网页转为 Markdown |-| **项目管理** | `project_manager.py` | 创建、验证项目 |-| **后处理** | `finalize_svg.py` ⭐ | 统一入口,调用下方 6 个工具 |-| ↳ 子工具 | `embed_icons.py` | 嵌入图标占位符 |-| ↳ 子工具 | `crop_images.py` | 智能裁剪图片 |-| ↳ 子工具 | `fix_image_aspect.py` | 修复图片宽高比 |-| ↳ 子工具 | `embed_images.py` | Base64 嵌入图片 |-| ↳ 子工具 | `flatten_tspan.py` | 文本扁平化 |-| ↳ 子工具 | `svg_rect_to_path.py` | 圆角矩形转 Path |-| **导出** | `svg_to_pptx.py` | SVG 转 PowerPoint |-| **讲稿处理** | `total_md_split.py` | 讲稿拆分工具 |-| **质量检查** | `svg_quality_checker.py`, `batch_validate.py` | 验证 SVG 规范 |-| **素材生成** | `nano_banana_gen.py` | 利用 Gemini Nano 生成高品质图片 |-| **辅助** | `config.py`, `analyze_images.py`, `rotate_images.py` | 配置和图片处理 |+### Tool Category Quick Index++| Category | Tool | Description |+|----------|------|-------------|+| **Input Conversion** | `pdf_to_md.py`, `web_to_md.py/.cjs` | Convert PDF/web pages to Markdown |+| **Project Management** | `project_manager.py` | Create and validate projects |+| **Post-processing** | `finalize_svg.py` ⭐ | Unified entry point, invokes the 6 tools below |+| ↳ Sub-tool | `embed_icons.py` | Embed icon placeholders |+| ↳ Sub-tool | `crop_images.py` | Smart image cropping |+| ↳ Sub-tool | `fix_image_aspect.py` | Fix image aspect ratio |+| ↳ Sub-tool | `embed_images.py` | Base64 image embedding |+| ↳ Sub-tool | `flatten_tspan.py` | Text flattening |+| ↳ Sub-tool | `svg_rect_to_path.py` | Rounded rect to Path |+| **Export** | `svg_to_pptx.py` | SVG to PowerPoint |+| **Speaker Notes** | `total_md_split.py` | Speaker notes splitter |+| **Quality Check** | `svg_quality_checker.py`, `batch_validate.py` | Validate SVG compliance |+| **Asset Generation** | `nano_banana_gen.py` | Generate high-quality images via Gemini Nano |+| **Utilities** | `config.py`, `analyze_images.py`, `rotate_images.py` | Configuration and image processing |----## 工具列表+## Tool List-### 0. pdf_to_md.py — PDF 转 Markdown 工具(推荐首选)+### 0. pdf_to_md.py — PDF to Markdown Tool (Recommended First Choice)-使用 PyMuPDF 将 PDF 文档转换为 Markdown 格式,本地运行、快速、免费。+Uses PyMuPDF to convert PDF documents to Markdown format. Runs locally, fast, and free.-**功能**:+**Features**:-- 提取 PDF 文本内容并转换为 Markdown-- 自动提取表格并转换为 Markdown 表格-- 自动提取图片并保存到 `images/` 目录-- 支持批量处理目录下的所有 PDF+- Extract PDF text content and convert to Markdown+- Automatically extract tables and convert to Markdown tables+- Automatically extract images and save to `images/` directory+- Support batch processing of all PDFs in a directory-**用法**:+**Usage**:```bash-# 转换单个文件+# Convert a single filepython3 scripts/pdf_to_md.py book.pdf-# 指定输出文件+# Specify output filepython3 scripts/pdf_to_md.py book.pdf -o output.md-# 转换目录下所有 PDF+# Convert all PDFs in a directorypython3 scripts/pdf_to_md.py ./pdfs-# 指定输出目录+# Specify output directorypython3 scripts/pdf_to_md.py ./pdfs -o ./markdown```-**何时使用 pdf_to_md.py vs MinerU**:+**When to use pdf_to_md.py vs MinerU**:-| 场景 | 推荐工具 | 原因 |-|------|----------|------|-| **原生 PDF**(Word/LaTeX 导出) | `pdf_to_md.py` | 本地、秒级、免费 |-| **简单表格** | `pdf_to_md.py` | 已支持表格提取 |-| **隐私敏感文档** | `pdf_to_md.py` | 数据不出本机 |-| **扫描版/图片 PDF** | MinerU | 需要 OCR |-| **复杂多栏排版** | MinerU | 版面分析更准 |-| **数学公式** | MinerU | AI 识别能力强 |-| **乱码 PDF**(编码丢失) | MinerU | 视觉识别兜底 |+| Scenario | Recommended Tool | Reason |+|----------|------------------|--------|+| **Native PDF** (exported from Word/LaTeX) | `pdf_to_md.py` | Local, instant, free |+| **Simple tables** | `pdf_to_md.py` | Table extraction supported |+| **Privacy-sensitive documents** | `pdf_to_md.py` | Data stays on your machine |+| **Scanned/image PDFs** | MinerU | OCR required |+| **Complex multi-column layouts** | MinerU | Better layout analysis |+| **Math formulas** | MinerU | Stronger AI recognition |+| **Garbled PDFs** (encoding lost) | MinerU | Visual recognition as fallback |-> **策略**: PyMuPDF 优先,MinerU 兜底。先运行 `pdf_to_md.py`,如结果乱码/空白/排版错乱再换 MinerU。+> **Strategy**: PyMuPDF first, MinerU as fallback. Run `pdf_to_md.py` first; if the result is garbled/blank/misformatted, switch to MinerU.-**依赖**:+**Dependencies**:```bashpip install PyMuPDF@@ -147,75 +147,75 @@ pip install PyMuPDF----### 0.5. web_to_md.py / web_to_md.cjs — 网页转 Markdown 工具+### 0.5. web_to_md.py / web_to_md.cjs — Web Page to Markdown Tool-将网页内容抓取并转换为 Markdown 格式,自动下载图片到本地。+Scrapes web page content and converts it to Markdown format, automatically downloading images locally.-**注意**: 提供 Python 和 Node.js 两个版本。对于微信公众号等有 TLS 指纹拦截的站点,**强烈推荐使用 Node.js 版本** (`web_to_md.cjs`)。+**Note**: Both Python and Node.js versions are provided. For sites with TLS fingerprint blocking such as WeChat Official Accounts, **the Node.js version is strongly recommended** (`web_to_md.cjs`).-**功能**:+**Features**:-- 抓取网页内容并转换为 Markdown-- 自动提取页面元数据(标题、日期、作者)-- 自动下载图片并保存到 `_files/` 目录-- **自动清理文件名**(仅保留中英文数字下划线,兼容性极佳)-- 智能识别主要内容区域(支持中文新闻/政府网站)-- 支持批量处理多个 URL+- Scrape web page content and convert to Markdown+- Automatically extract page metadata (title, date, author)+- Automatically download images and save to `_files/` directory+- **Automatic filename cleanup** (retains only alphanumeric characters, Chinese characters, and underscores for maximum compatibility)+- Smart main content area detection (supports Chinese news/government websites)+- Support batch processing of multiple URLs-**用法 (Python)**:+**Usage (Python)**:```bash-# 转换单个网页+# Convert a single web pagepython3 scripts/web_to_md.py https://example.com/article-# 转换多个网页+# Convert multiple web pagespython3 scripts/web_to_md.py https://url1.com https://url2.com-# 从文件批量读取 URL+# Batch read URLs from filepython3 scripts/web_to_md.py -f urls.txt-# 指定输出文件+# Specify output filepython3 scripts/web_to_md.py https://example.com -o output.md```-**用法 (Node.js) — 推荐用于微信公众号**:+**Usage (Node.js) — Recommended for WeChat Official Accounts**:```bash-# 转换单个网页+# Convert a single web pagenode scripts/web_to_md.cjs https://mp.weixin.qq.com/s/xxxx-# 转换多个网页+# Convert multiple web pagesnode scripts/web_to_md.cjs https://url1.com https://url2.com-# 从文件批量读取 URL+# Batch read URLs from filenode scripts/web_to_md.cjs -f urls.txt```-**输出结构**:+**Output Structure**:```projects/-├── 文章标题.md # Markdown 内容-└── 文章标题_files/ # 图片目录+├── article_title.md # Markdown content+└── article_title_files/ # Image directory├── image_1.jpg├── image_2.png└── ...```-**何时使用 web_to_md.py / .cjs**:+**When to use web_to_md.py / .cjs**:-| 场景 | 推荐工具 | 原因 |-|------|----------|------|-| **微信公众号/高防站点** | `web_to_md.cjs` | Node.js 对 TLS 指纹拦截不仅更友好,且能大大降低被 403 的概率 |-| **普通新闻/文章类网页** | 任选其一 | 均可自动提取正文、下载图片 |-| **图文内容**(游记、攻略等) | 任选其一 | 保留图片资源 |-| **政府/机构网站** | `web_to_md.py` | Python 版对某些特定中文编码处理可能微优 |-| **需要登录的页面** | 手动处理 | 工具不支持认证 |-| **动态渲染页面(SPA)** | 手动处理 | 需要 headless browser |+| Scenario | Recommended Tool | Reason |+|----------|------------------|--------|+| **WeChat Official Accounts / heavily protected sites** | `web_to_md.cjs` | Node.js handles TLS fingerprint blocking better and significantly reduces the chance of 403 errors |+| **Regular news/article pages** | Either one | Both can auto-extract body text and download images |+| **Image-rich content** (travel logs, guides, etc.) | Either one | Preserves image assets |+| **Government/institutional websites** | `web_to_md.py` | Python version may handle certain Chinese encodings slightly better |+| **Pages requiring login** | Manual processing | Tools do not support authentication |+| **Dynamically rendered pages (SPA)** | Manual processing | Requires a headless browser |-> **策略**: 遇到 403 错误或微信文章时,请直接切换使用 `web_to_md.cjs`。+> **Strategy**: If you encounter a 403 error or are scraping a WeChat article, switch directly to `web_to_md.cjs`.-**依赖**:+**Dependencies**:Python:```bash@@ -223,635 +223,635 @@ pip install requests beautifulsoup4```Node.js:-(脚本使用原生模块,无需额外 npm install,但需 Node.js 环境)+(The script uses native modules; no extra npm install needed, but a Node.js environment is required)----### 0.6. rotate_images.py — 图片方向修正工具+### 0.6. rotate_images.py — Image Orientation Correction Tool-处理从网页下载的图片 EXIF 方向信息丢失或错误的专用工具。+A dedicated tool for handling missing or incorrect EXIF orientation data in images downloaded from the web.-**功能**:+**Features**:-- **自动 EXIF 修正**: 识别并修复带有 EXIF Orientation 标签的图片-- **可视化旋转**: 生成 HTML 工具页面,点击即可旋转图片-- **自然排序**: 确保图片按文件名自然顺序排列-- **独立运行**: 不依赖爬虫脚本,可单独对任何目录使用+- **Auto EXIF correction**: Detect and fix images with EXIF Orientation tags+- **Visual rotation**: Generate an HTML tool page for click-to-rotate functionality+- **Natural sorting**: Ensure images are sorted by filename in natural order+- **Standalone operation**: Independent of scraping scripts; can be used on any directory-**用法**:+**Usage**:```bash-# 1. 自动修正(静默模式,仅修复 EXIF)+# 1. Auto-correct (silent mode, EXIF fix only)python3 scripts/rotate_images.py auto projects/xxx_files-# 2. 生成可视化工具(先修复 EXIF,再生成网页)+# 2. Generate visual tool (fix EXIF first, then generate web page)python3 scripts/rotate_images.py gen projects/xxx_files-# -> 生成 projects/image_orientation_tool.html,浏览器打开即可操作+# -> Generates projects/image_orientation_tool.html, open in browser to operate-# 3. 应用修正(根据网页生成的 JSON)+# 3. Apply corrections (from JSON generated by the web page)python3 scripts/rotate_images.py fix fixes.json```----### 1. project_utils.py — 项目工具公共模块+### 1. project_utils.py — Project Utilities Common Module-提供项目信息解析、验证等公共功能,供其他工具复用。+Provides common functionality for project info parsing, validation, etc., reused by other tools.-**功能**:+**Features**:-- 画布格式定义和管理-- 项目信息解析(从目录名提取格式、日期等)-- 项目结构验证-- SVG viewBox 验证-- 项目查找和统计+- Canvas format definition and management+- Project info parsing (extract format, date, etc. from directory name)+- Project structure validation+- SVG viewBox validation+- Project discovery and statistics-**用法**:+**Usage**:```bash-# 作为模块被其他工具导入+# Imported as a module by other toolsfrom project_utils import get_project_info, validate_project_structure-# 也可以直接运行测试+# Can also be run directly for testingpython3 scripts/project_utils.py <project_path>```----### 2. project_manager.py — 项目管理工具+### 2. project_manager.py — Project Management Tool-项目初始化、验证和管理的一站式工具。+An all-in-one tool for project initialization, validation, and management.-**功能**:+**Features**:-- 初始化新项目(创建标准目录结构)-- 验证项目完整性-- 查看项目信息+- Initialize new projects (create standard directory structure)+- Validate project integrity+- View project information-**用法**:+**Usage**:```bash-# 初始化新项目+# Initialize a new projectpython3 scripts/project_manager.py init <project_name> --format ppt169-# 将原始材料和标准化 Markdown 收进项目目录+# Import raw materials and standardized Markdown into the project directorypython3 scripts/project_manager.py import-sources <project_path> <source1> [<source2> ...]-# 验证项目结构+# Validate project structurepython3 scripts/project_manager.py validate <project_path>-# 查看项目信息+# View project informationpython3 scripts/project_manager.py info <project_path>```-说明:-- 工作空间外文件默认复制到 `sources/`-- 使用 `--move` 时,工作空间外文件改为移动到 `sources/`-- 如果文件已位于当前工作空间内,会直接移动到 `sources/`+Notes:+- Files outside the workspace are copied to `sources/` by default+- With `--move`, files outside the workspace are moved to `sources/` instead+- If a file is already within the current workspace, it will be moved directly to `sources/`-**支持的画布格式**:+**Supported Canvas Formats**:- `ppt169` - PPT 16:9 (1280×720)- `ppt43` - PPT 4:3 (1024×768)-- `wechat` - 微信公众号头图 (900×383)-- `xiaohongshu` - 小红书 3:4 (1242×1660)-- `moments` - 朋友圈/Instagram 1:1 (1080×1080)-- `story` - Story/竖版 9:16 (1080×1920)-- `banner` - 横版 Banner 16:9 (1920×1080)-- `a4` - A4 打印 (1240×1754)+- `wechat` - WeChat Official Account header image (900×383)+- `xiaohongshu` - Xiaohongshu (RED) 3:4 (1242×1660)+- `moments` - WeChat Moments / Instagram 1:1 (1080×1080)+- `story` - Story / Vertical 9:16 (1080×1920)+- `banner` - Horizontal Banner 16:9 (1920×1080)+- `a4` - A4 Print (1240×1754)-**示例**:+**Examples**:```bash-# 创建一个新的 PPT 16:9 项目+# Create a new PPT 16:9 projectpython3 scripts/project_manager.py init my_presentation --format ppt169-# 验证项目+# Validate projectpython3 scripts/project_manager.py validate projects/my_presentation_ppt169_20251116-# 查看项目信息+# View project informationpython3 scripts/project_manager.py info projects/my_presentation_ppt169_20251116```----### 3. flatten_tspan.py — 文本扁平化(去 `<tspan>`)+### 3. flatten_tspan.py — Text Flattening (Remove `<tspan>`)-> **推荐**: 使用 `finalize_svg.py` 作为统一入口,已集成文本扁平化功能。以下为独立使用的高级用法。+> **Recommended**: Use `finalize_svg.py` as the unified entry point, which already includes text flattening. The following is advanced standalone usage.-将含有多行 `<tspan>` 的 `<text>` 结构扁平化为多条独立的 `<text>` 元素,便于部分渲染器兼容或文本抽取。+Flattens `<text>` structures containing multi-line `<tspan>` elements into multiple independent `<text>` elements, for compatibility with certain renderers or text extraction.-**注意**: 生成端仍应使用 `<tspan>` 手动换行(禁用项详见 `AGENTS.md`)。此工具仅用于后处理。+**Note**: The generation side should still use `<tspan>` for manual line breaks (see banned features in `AGENTS.md`). This tool is for post-processing only.-**用法**:+**Usage**:```bash-# 扁平化整个输出目录+# Flatten an entire output directorypython3 scripts/flatten_tspan.py examples/<project>/svg_output-# 处理单个 SVG+# Process a single SVGpython3 scripts/flatten_tspan.py path/to/input.svg path/to/output.svg```-**行为说明**:+**Behavior**:-- 逐个 `<tspan>` 计算绝对位置(综合 `x`/`y` 与 `dx`/`dy`),合并父/子样式,输出为独立 `<text>`-- 复制父 `<text>` 的通用文本属性和 `style`,子级覆盖优先-- 保留或合并 `transform`-- 输出采用 UTF-8 编码,无 XML 声明+- Computes absolute position for each `<tspan>` (combining `x`/`y` with `dx`/`dy`), merges parent/child styles, and outputs as independent `<text>` elements+- Copies common text attributes and `style` from the parent `<text>`; child overrides take priority+- Preserves or merges `transform`+- Output uses UTF-8 encoding without XML declaration-**已知限制**:+**Known Limitations**:-- 仅处理 `<text>`/`<tspan>` 结构;其他子元素不做转换-- 复杂嵌套或特殊布局请先在生成端简化为规范的逐行 `<tspan>`+- Only processes `<text>`/`<tspan>` structures; other child elements are not converted+- For complex nesting or special layouts, simplify to standardized per-line `<tspan>` on the generation side first----### 4. batch_validate.py — 批量项目验证工具+### 4. batch_validate.py — Batch Project Validation Tool-一次性检查多个项目的结构完整性和规范性。+Check the structural integrity and compliance of multiple projects at once.-**功能**:+**Features**:-- 批量验证项目结构-- 检查必需文件(README、设计规范、SVG 等)-- 验证 SVG viewBox 设置-- 生成验证报告-- 提供修复建议+- Batch project structure validation+- Check required files (README, design spec, SVGs, etc.)+- Validate SVG viewBox settings+- Generate validation reports+- Provide fix suggestions-**用法**:+**Usage**:```bash-# 验证单个目录+# Validate a single directorypython3 scripts/batch_validate.py examples-# 验证多个目录+# Validate multiple directoriespython3 scripts/batch_validate.py examples projects-# 验证所有+# Validate allpython3 scripts/batch_validate.py --all-# 导出报告+# Export reportpython3 scripts/batch_validate.py examples --export```-**示例输出**:+**Example Output**:```✅ google_annual_report_ppt169_20251116- 路径: examples/google_annual_report_ppt169_20251116- 格式: PPT 16:9 | SVG: 10 个 | 日期: 2025-11-16+ Path: examples/google_annual_report_ppt169_20251116+ Format: PPT 16:9 | SVGs: 10 | Date: 2025-11-16-⚠️ 某项目名称- 路径: examples/某项目名称- 格式: PPT 16:9 | SVG: 8 个 | 日期: 2025-10-15- ⚠️ 警告 (1):- - SVG 文件命名不规范: old_name.svg+⚠️ some_project_name+ Path: examples/some_project_name+ Format: PPT 16:9 | SVGs: 8 | Date: 2025-10-15+ ⚠️ Warnings (1):+ - Non-standard SVG filename: old_name.svg```----### 5. generate_examples_index.py — Examples 索引生成工具+### 5. generate_examples_index.py — Examples Index Generator-自动扫描 examples 目录并生成 README.md 索引文件。+Automatically scans the examples directory and generates a README.md index file.-**功能**:+**Features**:-- 自动发现所有示例项目-- 按格式分类整理-- 生成统计信息-- 创建预览链接-- 更新使用说明+- Automatically discover all example projects+- Organize by format category+- Generate statistics+- Create preview links+- Update usage instructions-**用法**:+**Usage**:```bash-# 生成 examples/README.md+# Generate examples/README.mdpython3 scripts/generate_examples_index.py-# 指定目录+# Specify directorypython3 scripts/generate_examples_index.py examples```-**特性**:+**Characteristics**:-- 自动检测项目信息(名称、格式、日期、SVG 数量)-- 按画布格式分组-- 显示最近更新的项目-- 包含使用说明和贡献指南+- Auto-detect project info (name, format, date, SVG count)+- Group by canvas format+- Show recently updated projects+- Include usage instructions and contribution guidelines----### 6. error_helper.py — 错误消息助手+### 6. error_helper.py — Error Message Helper-提供友好的错误消息和具体的修复建议。+Provides friendly error messages and specific fix suggestions.-**功能**:+**Features**:-- 标准化错误类型定义-- 提供具体的解决方案-- 支持上下文定制-- 格式化输出+- Standardized error type definitions+- Provide specific solutions+- Support context customization+- Formatted output-**用法**:+**Usage**:```bash-# 查看所有错误类型+# View all error typespython3 scripts/error_helper.py-# 查看特定错误的解决方案+# View solution for a specific errorpython3 scripts/error_helper.py missing_readme-# 带上下文+# With contextpython3 scripts/error_helper.py missing_readme project_path=my_project```-**支持的错误类型**:+**Supported Error Types**:-- `missing_readme` - 缺少 README.md-- `missing_spec` - 缺少设计规范-- `missing_svg_output` - 缺少 svg_output 目录-- `viewbox_mismatch` - viewBox 不匹配-- `foreignobject_detected` - 检测到禁用元素(详见 AGENTS.md 黑名单)-- 等等...+- `missing_readme` - Missing README.md+- `missing_spec` - Missing design specification+- `missing_svg_output` - Missing svg_output directory+- `viewbox_mismatch` - viewBox mismatch+- `foreignobject_detected` - Banned element detected (see AGENTS.md blocklist)+- etc.----### 7. svg_quality_checker.py — SVG 质量检查工具+### 7. svg_quality_checker.py — SVG Quality Check Tool-检查 SVG 文件是否符合项目技术规范。+Checks whether SVG files comply with the project's technical specifications.-**功能**:+**Features**:-- 验证 viewBox 属性-- 检测禁用元素(详见 AGENTS.md)-- 检查字体使用-- 验证 width/height 与 viewBox 一致性-- 检查文本换行方式+- Validate viewBox attribute+- Detect banned elements (see AGENTS.md)+- Check font usage+- Validate width/height consistency with viewBox+- Check text line-break methods-**用法**:+**Usage**:```bash-# 检查单个文件+# Check a single filepython3 scripts/svg_quality_checker.py examples/project/svg_output/01_cover.svg-# 检查整个目录+# Check an entire directorypython3 scripts/svg_quality_checker.py examples/project/svg_output-# 检查项目(自动查找 svg_output)+# Check a project (auto-finds svg_output)python3 scripts/svg_quality_checker.py examples/project-# 指定期望格式+# Specify expected formatpython3 scripts/svg_quality_checker.py examples/project --format ppt169-# 检查所有项目+# Check all projectspython3 scripts/svg_quality_checker.py --all examples-# 导出报告+# Export reportpython3 scripts/svg_quality_checker.py examples/project --export```-**检查项目**:+**Check Items**:-- ✅ viewBox 属性存在且格式正确-- ✅ 无禁用元素(详见 AGENTS.md)-- ✅ 使用《设计规范》指定的字体-- ✅ width/height 与 viewBox 一致-- ✅ 文本使用 `<tspan>` 换行+- ✅ viewBox attribute exists and is correctly formatted+- ✅ No banned elements (see AGENTS.md)+- ✅ Uses fonts specified in the Design Specification & Content Outline (design_spec)+- ✅ width/height consistent with viewBox+- ✅ Text uses `<tspan>` for line breaks----### PPT 兼容性规则+### PPT Compatibility Rules-为确保导出 PPT 后效果一致,**透明度必须使用标准写法**:+To ensure consistent appearance after exporting to PPT, **transparency must use standard syntax**:-| ❌ 禁止 | ✅ 正确 |-|--------|--------|+| ❌ Banned | ✅ Correct |+|-----------|-----------|| `fill="rgba(255,255,255,0.1)"` | `fill="#FFFFFF" fill-opacity="0.1"` |-| `<g opacity="0.2">...</g>` | 每个子元素单独设置透明度 |-| `<image opacity="0.3"/>` | 图片后加遮罩层 `<rect fill="背景色" opacity="0.7"/>` |+| `<g opacity="0.2">...</g>` | Set opacity on each child element individually |+| `<image opacity="0.3"/>` | Add a mask layer after the image: `<rect fill="background-color" opacity="0.7"/>` |-> 📌 **记忆口诀**:PPT 不认 rgba、不认组透明、不认图片透明、不认 marker+> **Mnemonic**: PPT does not support rgba, group opacity, image opacity, or markers.----### 8. svg_to_pptx.py — SVG 转 PPTX 工具+### 8. svg_to_pptx.py — SVG to PPTX Tool-将项目中的 SVG 文件批量转换为 PowerPoint 演示文稿,保留矢量图形的可编辑性。+Batch converts SVG files in a project to a PowerPoint presentation, preserving vector graphics editability.-**功能**:+**Features**:-- 批量将 SVG 转换为 PPTX-- 每个 SVG 对应一张幻灯片-- 自动检测画布格式并设置幻灯片尺寸-- 支持使用 svg_output 或 svg_final 目录-- SVG 在 PowerPoint 中保持可编辑-- **支持页面切换动画和入场动画**-- **自动嵌入演讲备注**(从 notes/ 目录读取)+- Batch convert SVGs to PPTX+- Each SVG corresponds to one slide+- Auto-detect canvas format and set slide dimensions+- Support using svg_output or svg_final directories+- SVGs remain editable in PowerPoint+- **Support slide transition and entrance animations**+- **Auto-embed speaker notes** (read from notes/ directory)-**用法**:+**Usage**:```bash-# 推荐:使用后处理完成的版本(默认嵌入备注)-python3 scripts/svg_to_pptx.py <项目路径> -s final+# Recommended: use the post-processed version (notes embedded by default)+python3 scripts/svg_to_pptx.py <project_path> -s final-# 禁用演讲备注-python3 scripts/svg_to_pptx.py <项目路径> -s final --no-notes+# Disable speaker notes+python3 scripts/svg_to_pptx.py <project_path> -s final --no-notes-# 使用原始版本-python3 scripts/svg_to_pptx.py <项目路径>+# Use original version+python3 scripts/svg_to_pptx.py <project_path>-# 指定输出文件-python3 scripts/svg_to_pptx.py <项目路径> -s final -o output.pptx+# Specify output file+python3 scripts/svg_to_pptx.py <project_path> -s final -o output.pptx-# 添加页面切换效果-python3 scripts/svg_to_pptx.py <项目路径> -t fade --transition-duration 1.0+# Add slide transition effects+python3 scripts/svg_to_pptx.py <project_path> -t fade --transition-duration 1.0-# 静默模式-python3 scripts/svg_to_pptx.py <项目路径> -s final -q+# Silent mode+python3 scripts/svg_to_pptx.py <project_path> -s final -q```-**演讲备注**:+**Speaker Notes**:-工具自动读取 `notes/` 目录中的 Markdown 备注文件,并嵌入到 PPTX 的演讲者备注中。+The tool automatically reads Markdown note files from the `notes/` directory and embeds them into the PPTX speaker notes.-**文件命名支持两种方式**:-- **推荐**:与 SVG 同名(如 `01_封面.svg` 对应 `notes/01_封面.md`)-- **兼容**:`slide01.md` 格式(向后兼容)+**Two naming conventions are supported**:+- **Recommended**: Same name as the SVG (e.g., `01_cover.svg` maps to `notes/01_cover.md`)+- **Compatible**: `slide01.md` format (backward compatible)-| 参数 | 说明 |-|------|------|-| 默认 | 自动嵌入备注(无备注文件则留空) |-| `--no-notes` | 禁用备注嵌入 |+| Parameter | Description |+|-----------|-------------|+| Default | Auto-embed notes (empty if no note file found) |+| `--no-notes` | Disable note embedding |-**切换效果参数**:+**Transition Effect Parameters**:-| 参数 | 说明 | 可选值 |-|------|------|--------|-| `-t`, `--transition` | 页面切换效果 | fade, push, wipe, split, reveal, cover, random |-| `--transition-duration` | 切换持续时间(秒,默认 0.5) | 任意正数 |-| `--auto-advance` | 自动翻页间隔(秒) | 任意正数 |+| Parameter | Description | Options |+|-----------|-------------|---------|+| `-t`, `--transition` | Slide transition effect | fade, push, wipe, split, reveal, cover, random |+| `--transition-duration` | Transition duration in seconds (default 0.5) | Any positive number |+| `--auto-advance` | Auto-advance interval in seconds | Any positive number |-**切换效果说明**:+**Transition Effects**:-| 效果 | 说明 |-|------|------|-| fade | 淡入淡出 |-| push | 推入 |-| wipe | 擦除 |-| split | 分割 |-| reveal | 揭示 |-| cover | 覆盖 |-| random | 随机 |+| Effect | Description |+|--------|-------------|+| fade | Fade in/out |+| push | Push |+| wipe | Wipe |+| split | Split |+| reveal | Reveal |+| cover | Cover |+| random | Random |-**SVG 来源目录 (`-s`)**:+**SVG Source Directory (`-s`)**:-| 参数 | 目录 | 说明 |-|------|------|------|-| `-s output` | `svg_output/` | 原始版本 |-| `-s final` | `svg_final/` | 后处理完成(推荐) |-| `-s <任意名>` | `<任意名>/` | 直接指定子目录 |+| Parameter | Directory | Description |+|-----------|-----------|-------------|+| `-s output` | `svg_output/` | Original version |+| `-s final` | `svg_final/` | Post-processed (recommended) |+| `-s <any_name>` | `<any_name>/` | Specify subdirectory directly |-**示例**:+**Examples**:```bash-# 推荐流程:先后处理,再导出(带切换效果)+# Recommended workflow: post-process first, then export (with transition effects)python3 scripts/finalize_svg.py examples/ppt169_demopython3 scripts/svg_to_pptx.py examples/ppt169_demo -s final -t fade-# 自动播放演示(3秒切换)+# Auto-play presentation (3-second transitions)python3 scripts/svg_to_pptx.py examples/ppt169_demo -s final -t fade --auto-advance 3```-**依赖**:+**Dependencies**:```bashpip install python-pptx```-**注意**:+**Notes**:-- SVG 以原生矢量格式嵌入,保持可编辑性-- 需要 PowerPoint 2016+ 才能正确显示-- 文件体积比 PNG 方案小很多-- 切换效果默认关闭,需要用户显式启用-- 演讲备注默认开启,使用 `--no-notes` 禁用+- SVGs are embedded in native vector format, maintaining editability+- Requires PowerPoint 2016+ for correct display+- File size is much smaller than the PNG approach+- Transition effects are off by default; users must explicitly enable them+- Speaker notes are on by default; use `--no-notes` to disable----### 9. total_md_split.py — 讲稿拆分工具+### 9. total_md_split.py — Speaker Notes Splitter-将 `total.md` 讲稿文件拆分为多个独立的讲稿文件,每个文件对应一个 SVG 页面。+Splits the `total.md` speaker notes file into multiple individual note files, each corresponding to one SVG page.-**功能**:+**Features**:-- 读取 `total.md` 文件,解析其中的一级标题和讲稿内容-- 检查 `svg_output` 文件夹中的 SVG 文件是否都有对应的讲稿-- 如果存在 SVG 没有对应的讲稿,会输出错误提示要求重新生成讲稿文件-- 如果全部匹配,根据名称对文档进行拆分,分成多个文档-- 拆分后的文档命名与 SVG 文件同名,后缀改为 `.md`-- 拆分后的文档**不包含**一级标题+- Read the `total.md` file and parse its level-1 headings and note content+- Check whether all SVG files in the `svg_output` folder have corresponding notes+- If any SVG lacks a corresponding note, output an error prompting regeneration of the notes file+- If all match, split the document by name into multiple files+- Split files are named the same as their SVG counterparts with a `.md` extension+- Split files **do not include** the level-1 heading-**用法**:+**Usage**:```bash-# 基本用法-python3 scripts/total_md_split.py <项目路径>+# Basic usage+python3 scripts/total_md_split.py <project_path>-# 指定输出目录-python3 scripts/total_md_split.py <项目路径> -o <输出目录>+# Specify output directory+python3 scripts/total_md_split.py <project_path> -o <output_directory>-# 静默模式-python3 scripts/total_md_split.py <项目路径> -q+# Silent mode+python3 scripts/total_md_split.py <project_path> -q```-**示例**:+**Examples**:```bash-# 基本用法-python3 scripts/total_md_split.py projects/<svg 标题>_ppt169_YYYYMMDD+# Basic usage+python3 scripts/total_md_split.py projects/<svg_title>_ppt169_YYYYMMDD-# 指定输出目录-python3 scripts/total_md_split.py projects/<svg 标题>_ppt169_YYYYMMDD -o notes+# Specify output directory+python3 scripts/total_md_split.py projects/<svg_title>_ppt169_YYYYMMDD -o notes-# 静默模式-python3 scripts/total_md_split.py projects/<svg 标题>_ppt169_YYYYMMDD -q+# Silent mode+python3 scripts/total_md_split.py projects/<svg_title>_ppt169_YYYYMMDD -q```-**讲稿格式要求**:+**Notes Format Requirements**:-`total.md` 文件需要使用以下格式:+The `total.md` file must use the following format:```markdown-# 01_<页面标题>+# 01_<page_title>-讲稿内容...+Speaker notes content...----# 02_<页面标题>+# 02_<page_title>-讲稿内容...+Speaker notes content...----# 03_<页面名称>+# 03_<page_title>-讲稿内容...+Speaker notes content...```-- 每个章节以 `# ` 开头的一级标题开始(**严格要求**)-- 标题文本需与对应 SVG 文件名一致(**严格要求**)-- 章节之间必须用 `---` 分隔(**严格要求**)-- 讲稿内容在标题之后,直到下一个标题或文件结束+- Each section begins with a level-1 heading starting with `# ` (**strictly required**)+- The heading text must match the corresponding SVG filename (**strictly required**)+- Sections must be separated by `---` (**strictly required**)+- Note content follows the heading until the next heading or end of file-**容错说明(工具侧)**:-即便未完全符合上述格式,`total_md_split.py` 仍会尝试根据标题/页码/名称相似度进行拆分,但结果不保证正确。请以严格格式为准。+**Fault Tolerance (Tool Side)**:+Even if the format does not strictly conform, `total_md_split.py` will attempt to split based on heading/page number/name similarity, but results are not guaranteed. Please adhere to the strict format.-**错误处理**:+**Error Handling**:-如果存在 SVG 文件没有对应的讲稿,工具会输出错误信息:+If any SVG file lacks a corresponding note, the tool will output an error message:```-错误: SVG 文件与讲稿不匹配- 缺失的讲稿: <N>_<页面标题>+Error: SVG files and speaker notes do not match+ Missing notes: <N>_<page_title>-请重新生成讲稿文件,确保每个 SVG 都有对应的讲稿。+Please regenerate the notes file, ensuring every SVG has a corresponding note.```-**依赖**:+**Dependencies**:- Python 3.6+-- 无外部依赖(仅使用标准库)+- No external dependencies (standard library only)----### 10. svg_position_calculator.py — SVG 位置计算与验证工具+### 10. svg_position_calculator.py — SVG Position Calculation & Validation Tool-图表坐标的**事前计算**和**事后验证**工具,帮助确保 SVG 元素位置准确无误。+A tool for **pre-calculation** and **post-validation** of chart coordinates, helping ensure accurate SVG element positioning.-#### 核心功能+#### Core Features-| 功能 | 说明 |-|------|------|-| **analyze** | 分析 SVG 文件,提取所有图形元素的坐标信息 |-| **calc** | 根据数据计算期望的图表坐标 |-| **interactive** | 交互式引导计算(推荐新手使用) |-| **from-json** | 从 JSON 配置文件批量计算 |-| **validate** | 验证 SVG 坐标与期望值的偏差 |+| Feature | Description |+|---------|-------------|+| **analyze** | Analyze an SVG file and extract coordinate information for all graphical elements |+| **calc** | Calculate expected chart coordinates based on data |+| **interactive** | Interactive guided calculation (recommended for beginners) |+| **from-json** | Batch calculation from a JSON configuration file |+| **validate** | Validate SVG coordinates against expected values for deviation |-#### 支持的图表类型+#### Supported Chart Types-| 类型 | 计算内容 | 输出 |-|------|----------|------|-| **柱状图 (bar)** | 柱子 X/Y/宽/高、标签位置 | 坐标表格 |-| **饼图 (pie)** | 扇区角度、弧线端点、标签位置 | 坐标表格 + Path d 属性 |-| **雷达图 (radar)** | 多边形顶点、标签位置 | 坐标表格 + polygon points |-| **折线图 (line)** | 数据点 SVG 坐标 | 坐标表格 + Path d 属性 |-| **网格布局 (grid)** | 单元格位置和尺寸 | 坐标表格 |-| **自定义折线** | 任意公式计算 | 坐标表格 + polyline points |+| Type | Calculation | Output |+|------|-------------|--------|+| **Bar chart (bar)** | Bar X/Y/width/height, label positions | Coordinate table |+| **Pie chart (pie)** | Sector angles, arc endpoints, label positions | Coordinate table + Path d attribute |+| **Radar chart (radar)** | Polygon vertices, label positions | Coordinate table + polygon points |+| **Line chart (line)** | Data point SVG coordinates | Coordinate table + Path d attribute |+| **Grid layout (grid)** | Cell positions and dimensions | Coordinate table |+| **Custom polyline** | Arbitrary formula calculation | Coordinate table + polyline points |----#### 命令详解+#### Command Details-##### 1. analyze — 分析 SVG 文件+##### 1. analyze — Analyze SVG File-提取 SVG 中所有图形元素的位置信息,用于验证或调试。+Extract position information for all graphical elements in an SVG, for validation or debugging.```bash-python3 scripts/svg_position_calculator.py analyze <svg文件>+python3 scripts/svg_position_calculator.py analyze <svg_file>```-**输出示例**:+**Example Output**:```======================================================================-SVG 文件分析: slide_03_chart.svg+SVG File Analysis: slide_03_chart.svg======================================================================-画布 viewBox: 0 0 1920 1200+Canvas viewBox: 0 0 1920 1200-元素统计:- - rect 矩形: 18 个- - circle 圆形: 7 个- - polyline/polygon: 1 个- - path 路径: 2 个+Element Statistics:+ - rect (rectangles): 18+ - circle: 7+ - polyline/polygon: 1+ - path: 2-=== 矩形元素 (rect) ===-序号 X Y 宽度 高度+=== Rectangle Elements (rect) ===+Index X Y Width Height1 0 0 1920 1302 190 285 200 530...-=== 折线/多边形 (polyline/polygon) ===-折线 1 (39 个点):- 起始点: (210,431) → (250,425) → (290,433) → (330,377) → (370,517)- ... 共 39 个点+=== Polylines/Polygons (polyline/polygon) ===+Polyline 1 (39 points):+ Start: (210,431) → (250,425) → (290,433) → (330,377) → (370,517)+ ... 39 points total```-##### 2. calc — 快速计算坐标+##### 2. calc — Quick Coordinate Calculation-根据数据快速计算图表元素的期望坐标。+Quickly calculate expected chart element coordinates based on data.-**柱状图**:+**Bar Chart**:```bashpython3 scripts/svg_position_calculator.py calc bar \- --data "华东:185,华南:142,华北:128" \+ --data "East:185,South:142,North:128" \--canvas ppt169 \--bar-width 50```-输出:+Output:```-=== 柱状图坐标计算 ===-画布: 1280×720-图表区域: (140, 150) - (1160, 600)+=== Bar Chart Coordinate Calculation ===+Canvas: 1280×720+Chart Area: (140, 150) - (1160, 600)-序号 标签 数值 X Y 宽度 高度+Index Label Value X Y Width Height---- ---------- -------- ------- ------- ------- -------- 1 华东 185.0 560.0 190.9 50.0 409.1- 2 华南 142.0 625.0 286.0 50.0 314.0- 3 华北 128.0 690.0 317.0 50.0 283.0+ 1 East 185.0 560.0 190.9 50.0 409.1+ 2 South 142.0 625.0 286.0 50.0 314.0+ 3 North 128.0 690.0 317.0 50.0 283.0```-**饼图**:+**Pie Chart**:```bashpython3 scripts/svg_position_calculator.py calc pie \- --data "A:35,B:25,C:20,D:12,其他:8" \+ --data "A:35,B:25,C:20,D:12,Other:8" \--center 420,400 \--radius 200 \--start-angle -90```-输出:+Output:```-=== 饼图扇区计算 ===-圆心: (420, 400) | 半径: 200+=== Pie Chart Sector Calculation ===+Center: (420, 400) | Radius: 200-序号 标签 百分比 起始角 终止角 标签X 标签Y+Index Label Percent Start End LabelX LabelY---- ---------- -------- -------- -------- ------- -------1 A 35.0% -90.0 36.0 476.0 296.22 B 25.0% 36.0 126.0 508.3 443.8...-=== Path d 属性 ===+=== Path d Attributes ===1. A: M 0,0 L 0.00,-200.00 A 200,200 0 0,1 161.80,-117.56 Z2. B: M 0,0 L 161.80,-117.56 A 200,200 0 0,1 117.56,161.80 Z...```-**雷达图**:+**Radar Chart**:```bashpython3 scripts/svg_position_calculator.py calc radar \- --data "性能:90,安全:85,易用:75,价格:70,服务:80" \+ --data "Performance:90,Security:85,Usability:75,Price:70,Service:80" \--center 640,400 \--radius 200```-**折线图**:+**Line Chart**:```bashpython3 scripts/svg_position_calculator.py calc line \@@ -860,7 +860,7 @@ python3 scripts/svg_position_calculator.py calc line \--y-range "0,150"```-**网格布局**:+**Grid Layout**:```bashpython3 scripts/svg_position_calculator.py calc grid \@@ -869,42 +869,42 @@ python3 scripts/svg_position_calculator.py calc grid \--padding 20 --gap 20```-##### 3. interactive — 交互式模式+##### 3. interactive — Interactive Mode-适合不熟悉命令行参数的用户,通过菜单引导完成计算。+Suitable for users unfamiliar with command-line arguments; guides you through calculation via menus.```bashpython3 scripts/svg_position_calculator.py interactive```-菜单选项:+Menu Options:```-选择图表类型:- 1. 柱状图 (bar)- 2. 饼图 (pie)- 3. 雷达图 (radar)- 4. 折线图 (line)- 5. 网格布局 (grid)- 6. 自定义折线 (custom) ← 支持自定义公式- 0. 退出+Select chart type:+ 1. Bar chart (bar)+ 2. Pie chart (pie)+ 3. Radar chart (radar)+ 4. Line chart (line)+ 5. Grid layout (grid)+ 6. Custom polyline (custom) ← Supports custom formulas+ 0. Exit```-**自定义折线(选项 6)** 特别适用于价格指数图等需要自定义坐标公式的场景:+**Custom polyline (option 6)** is particularly useful for scenarios like price index charts that require custom coordinate formulas:```-=== 自定义折线计算 ===-X起始值 [170]: 210-X步长 [40]: 40-Y基准值 [595]: 595-Y缩放系数 [20]: 20-参考基准值 [100]: 100+=== Custom Polyline Calculation ===+X start value [170]: 210+X step [40]: 40+Y baseline [595]: 595+Y scale factor [20]: 20+Reference baseline [100]: 100-公式: X = 210 + 序号 × 40- Y = 595 - (数值 - 100) × 20+Formula: X = 210 + index × 40+ Y = 595 - (value - 100) × 20-输入数据: 108.2,108.5,108.1,110.9,103.9,97.0+Input data: 108.2,108.5,108.1,110.9,103.9,97.0-序号 数值 X Y+Index Value X Y---- ---------- -------- --------1 108.2 250 4312 108.5 290 425@@ -917,30 +917,30 @@ polyline points:250,431 290,425 330,433 370,377 410,517 450,655```-##### 4. from-json — JSON 配置批量计算+##### 4. from-json — Batch Calculation from JSON Config-从 JSON 文件读取配置进行计算,适合批量处理或保存常用配置。+Read configuration from a JSON file for calculation; suitable for batch processing or saving frequently used configurations.```bashpython3 scripts/svg_position_calculator.py from-json config.json```-**JSON 配置示例**:+**JSON Configuration Examples**:-柱状图配置:+Bar chart config:```json{"type": "bar","canvas": "ppt169","data": {- "华东": 185,- "华南": 142,- "华北": 128+ "East": 185,+ "South": 142,+ "North": 128}}```-自定义折线配置:+Custom polyline config:```json{"type": "custom_line",@@ -955,52 +955,52 @@ python3 scripts/svg_position_calculator.py from-json config.json----#### 典型验证工作流+#### Typical Validation Workflow-当 AI 生成 SVG 图表后,可以使用此工具验证坐标准确性:+After AI generates SVG charts, you can use this tool to verify coordinate accuracy:-1. **分析 SVG 文件**,提取实际坐标:+1. **Analyze the SVG file** to extract actual coordinates:```bashpython3 scripts/svg_position_calculator.py analyze slide.svg```-2. **根据原始数据计算期望坐标**(使用 calc 或 interactive)+2. **Calculate expected coordinates from the raw data** (using calc or interactive)-3. **对比期望坐标与实际坐标**,检查偏差+3. **Compare expected coordinates with actual coordinates** to check for deviations-4. **如有偏差,修正 SVG 文件**+4. **If deviations exist, correct the SVG file**-**示例:验证价格指数折线图**+**Example: Validating a Price Index Line Chart**```bash-# 1. 分析 SVG,查看 polyline points+# 1. Analyze the SVG to view polyline pointspython3 scripts/svg_position_calculator.py analyze slide_03_trend.svg-# 2. 使用交互模式计算期望坐标(选择 6. 自定义折线)+# 2. Use interactive mode to calculate expected coordinates (select 6. Custom polyline)python3 scripts/svg_position_calculator.py interactive-# 3. 对比输出的 polyline points 与 SVG 中的实际值+# 3. Compare the output polyline points with the actual values in the SVG```----#### 坐标计算公式参考+#### Coordinate Calculation Formula Reference-**柱状图**:+**Bar Chart**:```bar_x = chart_area.x_min + (chart_area.width - total_bars_width) / 2 + i * (bar_width + gap)bar_y = chart_area.y_max - (value / max_value) * chart_area.heightbar_height = (value / max_value) * chart_area.height```-**饼图弧线端点**:+**Pie Chart Arc Endpoints**:```angle_rad = angle_degrees × π / 180end_x = radius × cos(angle_rad)end_y = radius × sin(angle_rad)```-**折线图(自定义公式)**:+**Line Chart (Custom Formula)**:```X = base_x + index × step_xY = base_y - (value - ref_value) × scale_y@@ -1008,229 +1008,229 @@ Y = base_y - (value - ref_value) × scale_y----#### 常见问题+#### FAQ-**Q: 输出中文乱码怎么办?**+**Q: What if the output shows garbled Chinese characters?**-A: 工具已自动处理 Windows 下的 UTF-8 编码问题。如仍有问题,请确保终端设置为 UTF-8:+A: The tool automatically handles UTF-8 encoding issues on Windows. If problems persist, ensure your terminal is set to UTF-8:```bashchcp 65001```-**Q: 如何验证复杂图表?**+**Q: How to validate complex charts?**-A: 对于复杂图表(如多系列柱状图),建议:-1. 先用 `analyze` 提取所有元素-2. 根据图表逻辑手动计算期望值-3. 逐一对比验证+A: For complex charts (e.g., multi-series bar charts), it is recommended to:+1. First use `analyze` to extract all elements+2. Manually calculate expected values based on chart logic+3. Compare and verify one by one-**Q: 支持哪些画布格式?**+**Q: Which canvas formats are supported?**-A: 支持 `ppt169`、`ppt43`、`xiaohongshu`、`moments` 等,详见 `project_utils.py` 中的 `CANVAS_FORMATS`。+A: Supports `ppt169`, `ppt43`, `xiaohongshu`, `moments`, etc. See `CANVAS_FORMATS` in `project_utils.py` for details.----### 11. svg_rect_to_path.py — SVG 圆角矩形转 Path 工具+### 11. svg_rect_to_path.py — SVG Rounded Rect to Path Tool-解决 SVG 在 PowerPoint 中「转换为形状」时圆角丢失的问题。+Solves the problem of rounded corners being lost when using "Convert to Shape" in PowerPoint.-**问题**: PowerPoint 不能正确解析 `<rect>` 的 `rx`/`ry` 圆角属性+**Problem**: PowerPoint cannot correctly parse the `rx`/`ry` rounded corner attributes of `<rect>`-**解决方案**: 将 `<rect rx="12" ry="12">` 转换为等效的 `<path d="...圆弧...">`+**Solution**: Convert `<rect rx="12" ry="12">` to an equivalent `<path d="...arcs...">`-**用法**:+**Usage**:```bash-# 处理项目中的 SVG(默认使用 svg_output)-python3 scripts/svg_rect_to_path.py <项目路径>+# Process SVGs in a project (defaults to svg_output)+python3 scripts/svg_rect_to_path.py <project_path>-# 指定 SVG 来源目录-python3 scripts/svg_rect_to_path.py <项目路径> -s final+# Specify SVG source directory+python3 scripts/svg_rect_to_path.py <project_path> -s final-# 指定输出目录名-python3 scripts/svg_rect_to_path.py <项目路径> -o svg_for_ppt+# Specify output directory name+python3 scripts/svg_rect_to_path.py <project_path> -o svg_for_ppt-# 处理单个文件+# Process a single filepython3 scripts/svg_rect_to_path.py path/to/file.svg-# 详细输出-python3 scripts/svg_rect_to_path.py <项目路径> -v+# Verbose output+python3 scripts/svg_rect_to_path.py <project_path> -v```-**示例**:+**Examples**:```bash-# 处理项目+# Process a projectpython3 scripts/svg_rect_to_path.py examples/ppt169_demo-# 输出到: examples/ppt169_demo/svg_rounded/+# Output to: examples/ppt169_demo/svg_rounded/-# 处理单个文件+# Process a single filepython3 scripts/svg_rect_to_path.py examples/ppt169_demo/svg_output/01_cover.svg-# 输出到: examples/ppt169_demo/svg_output/01_cover_rounded.svg+# Output to: examples/ppt169_demo/svg_output/01_cover_rounded.svg```-**使用场景**:+**Use Cases**:-当你需要在 PowerPoint 中将 SVG「转换为形状」进行编辑时,先用此工具预处理 SVG,可以保留圆角效果。+When you need to "Convert to Shape" in PowerPoint for editing, pre-process the SVG with this tool to preserve rounded corner effects.-**注意**:+**Notes**:-- 如果只是嵌入 SVG 而不转换为形状,无需使用此工具-- 透明度在「转换为形状」后仍会丢失(PowerPoint 限制)+- If you are only embedding the SVG without converting to shapes, this tool is not needed+- Transparency will still be lost after "Convert to Shape" (PowerPoint limitation)----### 12. fix_image_aspect.py — SVG 图片宽高比修复工具+### 12. fix_image_aspect.py — SVG Image Aspect Ratio Fix Tool-解决 SVG 中 `<image>` 元素在 PowerPoint「转换为形状」时图片拉伸变形的问题。+Solves the problem of `<image>` elements in SVG being stretched when using "Convert to Shape" in PowerPoint.-**问题**: PowerPoint 在将 SVG 转换为可编辑形状时,会忽略 `preserveAspectRatio` 属性,导致图片被拉伸以填满指定的 width/height 区域。+**Problem**: When PowerPoint converts SVG to editable shapes, it ignores the `preserveAspectRatio` attribute, causing images to be stretched to fill the specified width/height area.-**解决方案**:-1. 读取图片的原始宽高比-2. 根据 `preserveAspectRatio` 模式(meet/slice)计算正确的 x, y, width, height-3. 移除 `preserveAspectRatio` 属性,用精确计算的尺寸替代+**Solution**:+1. Read the image's original aspect ratio+2. Calculate the correct x, y, width, height based on the `preserveAspectRatio` mode (meet/slice)+3. Remove the `preserveAspectRatio` attribute, replacing it with precisely calculated dimensions-**用法**:+**Usage**:```bash-# 处理单个 SVG 文件+# Process a single SVG filepython3 scripts/fix_image_aspect.py path/to/slide.svg-# 处理多个文件+# Process multiple filespython3 scripts/fix_image_aspect.py 01_cover.svg 02_toc.svg 03_content.svg-# 预览模式(不修改文件)+# Preview mode (does not modify files)python3 scripts/fix_image_aspect.py --dry-run path/to/slide.svg-# 通过 finalize_svg.py 自动处理(推荐)-python3 scripts/finalize_svg.py <项目路径>+# Process automatically via finalize_svg.py (recommended)+python3 scripts/finalize_svg.py <project_path>```-**依赖**:+**Dependencies**:```bash-pip install Pillow # 用于读取图片尺寸(推荐安装)+pip install Pillow # For reading image dimensions (recommended)```-> **注意**: 如果没有安装 Pillow,工具会尝试用基本方法读取 PNG/JPEG 的头信息,但建议安装以获得更好的兼容性。+> **Note**: If Pillow is not installed, the tool will attempt to read PNG/JPEG header information using basic methods, but installing Pillow is recommended for better compatibility.-**使用场景**:+**Use Cases**:-当你需要在 PowerPoint 中将 SVG「转换为形状」进行编辑,且 SVG 中包含图片时,使用此工具可以防止图片拉伸变形。+When you need to "Convert to Shape" in PowerPoint for editing and the SVG contains images, use this tool to prevent image stretching.-**已集成到 finalize_svg.py**:+**Integrated into finalize_svg.py**:-此工具已作为 `finalize_svg.py` 的处理步骤之一(`fix-aspect`),默认自动执行。+This tool is already included as one of the processing steps in `finalize_svg.py` (`fix-aspect`) and runs automatically by default.----### 13. gemini_watermark_remover.py — Gemini 水印去除工具+### 13. gemini_watermark_remover.py — Gemini Watermark Removal Tool-去除 Gemini 生成图片右下角的水印 Logo。使用逆向混合算法还原原始像素。+Removes the watermark logo from the bottom-right corner of Gemini-generated images. Uses a reverse blending algorithm to restore original pixels.-**功能**:+**Features**:-- 自动检测水印尺寸(大图 96px,小图 48px)-- 支持 PNG、JPG、JPEG 格式-- 使用逆向混合算法精确还原原始像素-- 输出文件默认添加 `_unwatermarked` 后缀+- Auto-detect watermark size (96px for large images, 48px for small images)+- Support PNG, JPG, JPEG formats+- Use reverse blending algorithm for precise original pixel restoration+- Output files default to adding an `_unwatermarked` suffix-**用法**:+**Usage**:```bash-# 处理单张图片-python3 scripts/gemini_watermark_remover.py <图片路径>+# Process a single image+python3 scripts/gemini_watermark_remover.py <image_path>-# 指定输出文件-python3 scripts/gemini_watermark_remover.py <图片路径> -o 输出路径.png+# Specify output file+python3 scripts/gemini_watermark_remover.py <image_path> -o output_path.png-# 静默模式-python3 scripts/gemini_watermark_remover.py <图片路径> -q+# Silent mode+python3 scripts/gemini_watermark_remover.py <image_path> -q```-**示例**:+**Examples**:```bash-# 处理 Gemini 生成的图片+# Process a Gemini-generated imagepython3 scripts/gemini_watermark_remover.py projects/demo/images/bg_01.png-# 指定输出路径+# Specify output pathpython3 scripts/gemini_watermark_remover.py image.jpg -o image_clean.jpg```-**水印检测规则**:+**Watermark Detection Rules**:-| 图片尺寸 | 水印尺寸 | 边距 |-|----------|----------|------|+| Image Size | Watermark Size | Margin |+|------------|----------------|--------|| > 1024×1024 | 96×96 | 64px || ≤ 1024×1024 | 48×48 | 32px |-**依赖**:+**Dependencies**:```bashpip install Pillow numpy```-**注意**:+**Notes**:-- 此工具需要 `scripts/assets/` 目录下的 `bg_48.png` 和 `bg_96.png` 水印背景图-- 处理后的图片会在原位置生成,添加 `_unwatermarked` 后缀+- This tool requires `bg_48.png` and `bg_96.png` watermark background images in the `scripts/assets/` directory+- Processed images are generated at the original location with an `_unwatermarked` suffix----### 14. nano_banana_gen.py — Nano Banana 图像生成工具+### 14. nano_banana_gen.py — Nano Banana Image Generation Tool-利用 Google GenAI API 调用 Gemini 模型生成高质量图片素材。+Uses the Google GenAI API to call Gemini models for generating high-quality image assets.-**功能**:+**Features**:-- **高分辨率**: 支持最高 4K 分辨率生成-- **自定义宽高比**: 支持 `16:9`, `4:3`, `1:1`, `9:16` 等主流比例-- **提示词工程**: 内置负面提示词支持,自动优化生成质量-- **自动保存**: 自动根据提示词命名并保存为 PNG 格式+- **High resolution**: Supports up to 4K resolution generation+- **Custom aspect ratio**: Supports mainstream ratios including `16:9`, `4:3`, `1:1`, `9:16`, etc.+- **Prompt engineering**: Built-in negative prompt support with automatic quality optimization+- **Auto-save**: Automatically names and saves output as PNG format based on the prompt-**用法**:+**Usage**:```bash-# 生成默认图片+# Generate a default imagepython3 scripts/nano_banana_gen.py "A modern futuristic workspace"-# 指定宽高比和尺寸+# Specify aspect ratio and sizepython3 scripts/nano_banana_gen.py "Abstract tech background" --aspect_ratio 16:9 --image_size 4K-# 指定输出目录+# Specify output directorypython3 scripts/nano_banana_gen.py "Concept car" -o projects/demo/images-# 使用负面提示词+# Use negative promptpython3 scripts/nano_banana_gen.py "Beautiful landscape" -n "low quality, blurry, watermark"```-**参数说明**:+**Parameter Reference**:-| 参数 | 缩写 | 默认值 | 可选值 |-|------|------|--------|--------|-| `prompt` | - | Nano Banana | 提示词字符串 |-| `--negative_prompt` | `-n` | None | 负面提示词 |-| `--aspect_ratio` | - | `1:1` | `1:1`, `16:9`, `4:3`, `3:2`, `9:16`, `21:9` 等 |+| Parameter | Shorthand | Default | Options |+|-----------|-----------|---------|---------|+| `prompt` | - | Nano Banana | Prompt string |+| `--negative_prompt` | `-n` | None | Negative prompt |+| `--aspect_ratio` | - | `1:1` | `1:1`, `16:9`, `4:3`, `3:2`, `9:16`, `21:9`, etc. || `--image_size` | - | `4K` | `1K`, `2K`, `4K` |-| `--output` | `-o` | 当前工作目录 | 图片保存目录 |+| `--output` | `-o` | Current working directory | Image save directory |-**环境变量配置**:+**Environment Variable Configuration**:-使用前需设置环境变量:+Set the following environment variables before use:```bash-# 必需:Gemini API Key+# Required: Gemini API Keyexport GEMINI_API_KEY="YOUR_GEMINI_API_KEY"-# 可选:自定义 API 端点(用于代理服务)+# Optional: Custom API endpoint (for proxy services)export GEMINI_BASE_URL="YOUR_API_BASE_URL"```-> 💡 **提示**: 可将环境变量添加到 `~/.zshrc` 或 `~/.bashrc` 中永久生效。+> **Tip**: You can add environment variables to `~/.zshrc` or `~/.bashrc` for persistent configuration.-**依赖**:+**Dependencies**:```bashpip install google-genai@@ -1238,137 +1238,137 @@ pip install google-genai----### 15. embed_icons.py — SVG 图标嵌入工具+### 15. embed_icons.py — SVG Icon Embedding Tool-将 SVG 文件中的图标占位符 (`<use ...>`) 替换为实际的图标路径数据,实现图标的“零依赖”嵌入。+Replaces icon placeholders (`<use ...>`) in SVG files with actual icon path data, achieving "zero-dependency" icon embedding.-**功能**:+**Features**:-- 扫描 `<use data-icon="...">` 占位符-- 从图标库(默认 `templates/icons/`)读取对应 SVG 图标-- 嵌入为 `<g>` 组并应用位置、大小和颜色-- 支持批量处理+- Scan `<use data-icon="...">` placeholders+- Read corresponding SVG icons from the icon library (default `templates/icons/`)+- Embed as `<g>` groups with applied position, size, and color+- Support batch processing-**用法**:+**Usage**:```bash-# 处理单个文件+# Process a single filepython3 scripts/embed_icons.py output.svg-# 处理整个目录+# Process an entire directorypython3 scripts/embed_icons.py svg_output/*.svg-# 预览模式+# Preview modepython3 scripts/embed_icons.py --dry-run svg_output/*.svg```----## 工作流集成+## Workflow Integration-### 典型工作流程+### Typical Workflow-1. **创建新项目**+1. **Create a new project**```bashpython3 scripts/project_manager.py init my_project --format ppt169```-2. **编辑设计规范**- 编辑生成的 `设计规范与内容大纲.md` 文件+2. **Edit the Design Specification & Content Outline**+ Edit the generated `design_spec.md` file-3. **生成 SVG 文件**- 使用 AI 角色(Strategist → Executor → Optimizer)生成 SVG 并保存到 `svg_output/`+3. **Generate SVG files**+ Use AI roles (Strategist → Executor → Optimizer) to generate SVGs and save to `svg_output/`-4. **后处理(默认执行全部)**+4. **Post-processing (runs all steps by default)**```bash- # 直接运行,无需参数+ # Just run it, no extra parameters neededpython3 scripts/finalize_svg.py projects/my_project_ppt169_20251116```-5. **导出为 PPTX**+5. **Export to PPTX**```bashpython3 scripts/svg_to_pptx.py projects/my_project_ppt169_20251116 -s final```-6. **(可选)验证项目**+6. **(Optional) Validate the project**```bashpython3 scripts/project_manager.py validate projects/my_project_ppt169_20251116```-### 批量操作+### Batch Operations-**批量验证项目**:+**Batch validate projects**:```bash-# 验证所有示例项目+# Validate all example projectspython3 scripts/batch_validate.py examples-# 验证并导出报告+# Validate and export reportpython3 scripts/batch_validate.py examples --export```-**批量检查 SVG 质量**:+**Batch check SVG quality**:```bash-# 检查所有示例项目的 SVG+# Check SVGs in all example projectspython3 scripts/svg_quality_checker.py --all examples-# 导出质量报告+# Export quality reportpython3 scripts/svg_quality_checker.py --all examples --export```-## 依赖要求+## Dependency Requirements-大部分工具使用 Python 3 标准库,无需额外依赖。+Most tools use the Python 3 standard library and require no additional dependencies.-**最低 Python 版本**: Python 3.6++**Minimum Python Version**: Python 3.6+-**可选依赖**:+**Optional Dependencies**:-- `python-pptx` — SVG 转 PPTX 功能需要-- `Pillow` — 图片宽高比修复、水印去除功能需要-- `numpy` — 水印去除功能需要+- `python-pptx` — Required for SVG to PPTX conversion+- `Pillow` — Required for image aspect ratio fixing and watermark removal+- `numpy` — Required for watermark removal-安装依赖:+Install dependencies:```bashpip install -r requirements.txt-# 或单独安装+# Or install individuallypip install python-pptx```-## 故障排除+## Troubleshooting-### 问题:项目验证失败+### Issue: Project Validation Failed-**解决方案**:+**Solution**:-1. 运行 `python3 scripts/project_manager.py validate <path>` 查看详细错误-2. 根据错误提示修复缺失的文件或目录-3. 参考 `projects/README.md` 了解标准结构+1. Run `python3 scripts/project_manager.py validate <path>` to see detailed errors+2. Fix missing files or directories based on the error messages+3. Refer to `projects/README.md` for the standard structure-### 问题:SVG 预览显示不正常+### Issue: SVG Preview Not Displaying Correctly-**解决方案**:+**Solution**:-1. 确保 SVG 文件路径正确-2. 检查 SVG 文件命名是否符合规范(`slide_XX_name.svg`)-3. 使用本地服务器预览:`python3 -m http.server --directory <svg_output_path> 8000`+1. Ensure the SVG file path is correct+2. Check that SVG filenames follow the naming convention (`slide_XX_name.svg`)+3. Use a local server for preview: `python3 -m http.server --directory <svg_output_path> 8000`-## 相关文档+## Related Documentation-- [工作流教程](../../AGENTS.md)-- [快速参考](../../AGENTS.md)-- [AGENTS 指南](../AGENTS.md)+- [Workflow Tutorial](../../AGENTS.md)+- [Quick Reference](../../AGENTS.md)+- [AGENTS Guide](../AGENTS.md)----_最后更新: 2026-02-03_+_Last updated: 2026-02-03_-_nano_banana_gen.py 文档更新: 2026-02-03_+_nano_banana_gen.py documentation updated: 2026-02-03_-_gemini_watermark_remover.py 文档更新: 2025-12-20_+_gemini_watermark_remover.py documentation updated: 2025-12-20_diff --git a/skills/ppt-master/scripts/analyze_images.py b/skills/ppt-master/scripts/analyze_images.pyindex 68e2c8e2..2adb4a0f 100644--- a/skills/ppt-master/scripts/analyze_images.py+++ b/skills/ppt-master/scripts/analyze_images.py@@ -1,16 +1,17 @@#!/usr/bin/env python3"""-图片尺寸分析工具-================-分析指定文件夹中所有图片的宽度、高度、长宽比,输出PPT适配建议。+Image Size Analysis Tool+========================+Analyzes width, height, and aspect ratio of all images in a specified folder,+and outputs PPT layout recommendations.-用法:+Usage:python scripts/analyze_images.py <images_folder_path>python scripts/analyze_images.py projects/xxx/images-输出:- - 控制台显示分析报告- - 在图片目录的父目录生成 image_analysis.csv+Output:+ - Analysis report displayed in console+ - Generates image_analysis.csv in the parent directory of the images folder"""import os@@ -25,36 +26,36 @@ except ImportError:def analyze_images(images_dir):- """分析指定目录下所有图片的尺寸信息"""-- # 支持的图片格式+ """Analyze size information of all images in the specified directory"""++ # Supported image formatsimage_extensions = {'.jpg', '.jpeg', '.png', '.gif', '.webp', '.bmp', '.tiff', '.tif'}-+results = []-- # 遍历目录中的所有文件++ # Iterate through all files in the directoryfor filename in sorted(os.listdir(images_dir)):filepath = os.path.join(images_dir, filename)-- # 检查是否为图片文件++ # Check if it is an image fileif os.path.isfile(filepath) and Path(filename).suffix.lower() in image_extensions:try:with Image.open(filepath) as img:width, height = img.sizeaspect_ratio = width / height-- # 判断适合的PPT布局建议++ # Determine PPT layout recommendationif aspect_ratio > 1.5:- layout_hint = "宽幅横图"+ layout_hint = "Wide landscape"elif aspect_ratio > 1.2:- layout_hint = "标准横图"+ layout_hint = "Standard landscape"elif aspect_ratio > 0.8:- layout_hint = "接近正方形"+ layout_hint = "Near square"elif aspect_ratio > 0.6:- layout_hint = "标准竖图"+ layout_hint = "Standard portrait"else:- layout_hint = "窄幅竖图"-+ layout_hint = "Narrow portrait"+results.append({'filename': filename,'width': width,@@ -65,31 +66,31 @@ def analyze_images(images_dir):})except Exception as e:print(f"[WARN] Cannot read {filename}: {e}")-+return resultsdef print_results(results):- """打印分析结果"""-+ """Print analysis results"""+print("\n" + "="*100)print("Image Size Analysis Report")print("="*100)-- # 表头++ # Table headerprint(f"\n{'No.':<4} {'Width':<7} {'Height':<7} {'Ratio':<7} {'Size':<10} {'Layout':<15} {'Filename'}")print("-"*100)-+for i, img in enumerate(results, 1):print(f"{i:<4} {img['width']:<7} {img['height']:<7} {img['aspect_ratio']:<7.2f} {img['filesize_kb']:<10.1f}KB {img['layout_hint']:<15} {img['filename'][:40]}")-+print("-"*100)print(f"Total: {len(results)} images\n")-- # 按长宽比分组统计++ # Group statistics by aspect ratioprint("\nGroup by Aspect Ratio:")print("-"*50)-+categories = {"Wide (>1.5)": [],"Standard (1.2-1.5)": [],@@ -97,7 +98,7 @@ def print_results(results):"Portrait (0.6-0.8)": [],"Narrow (<0.6)": []}-+for img in results:ar = img['aspect_ratio']if ar > 1.5:@@ -110,59 +111,59 @@ def print_results(results):categories["Portrait (0.6-0.8)"].append(img)else:categories["Narrow (<0.6)"].append(img)-+for cat, imgs in categories.items():if imgs:print(f"\\n{cat}: {len(imgs)} images")- for img in imgs[:5]: # 只显示前5个+ for img in imgs[:5]: # Show only the first 5print(f" - {img['width']}x{img['height']} (ratio {img['aspect_ratio']:.2f}) - {img['filename'][:35]}...")if len(imgs) > 5:print(f" ... and {len(imgs) - 5} more")- # 输出PPT适配建议+ # PPT layout recommendationsprint("\\n" + "="*100)print("PPT Fit Suggestions (16:9 = 1280x720)")print("="*100)-+ppt_width, ppt_height = 1280, 720ppt_ratio = ppt_width / ppt_height-+print(f"\\nStandard PPT canvas: {ppt_width}x{ppt_height} (ratio {ppt_ratio:.2f})")-+fit_count = 0for img in results:if 1.5 <= img['aspect_ratio'] <= 2.0:fit_count += 1-+print(f"\\nImages suitable for full-screen display: {fit_count}")def generate_markdown(results):- """生成 Markdown 格式的图片资源清单"""+ """Generate a Markdown-format image resource inventory"""print("\\n" + "="*100)print("Markdown Snippet for Strategist (Copy & Paste)")print("="*100)- print("\\n## 图片资源清单(自动扫描结果)\\n")- print("| 文件名 | 尺寸 | 比例 | 布局建议 | 用途 | 状态 | 生成描述 |")- print("|--------|------|------|----------|------|------|----------|")-+ print("\\n## Image Resource Inventory (Auto-scan Results)\\n")+ print("| Filename | Size | Ratio | Layout Suggestion | Usage | Status | Generation Description |")+ print("|----------|------|-------|-------------------|-------|--------|-----------------------|")+for img in results:- # 简化布局建议描述,使其更符合 Strategist 的习惯+ # Simplify layout suggestion description to match Strategist conventionslayout_desc = img['layout_hint']if img['aspect_ratio'] > 2.0:- layout_desc += " (适合通栏/分割)"+ layout_desc += " (suitable for full-width/split)"elif img['aspect_ratio'] > 1.2:- layout_desc += " (适合全屏/插图)"+ layout_desc += " (suitable for full-screen/illustration)"elif img['aspect_ratio'] < 0.8:- layout_desc += " (适合左右分栏)"-- # 用途和生成描述需策略师手动填写,这里用占位符- print(f"| {img['filename']} | {img['width']}×{img['height']} | {img['aspect_ratio']:.2f} | {layout_desc} | (待填写) | 已有 | - |")+ layout_desc += " (suitable for side-by-side columns)"++ # Usage and generation description to be filled in by the strategist; placeholders used here+ print(f"| {img['filename']} | {img['width']}x{img['height']} | {img['aspect_ratio']:.2f} | {layout_desc} | (to be filled) | Existing | - |")print("\\n" + "="*100 + "\\n")def save_csv(results, csv_path):- """保存结果到CSV文件"""+ """Save results to a CSV file"""with open(csv_path, 'w', encoding='utf-8') as f:f.write("No,Filename,Width,Height,AspectRatio,SizeKB,Layout\n")for i, img in enumerate(results, 1):@@ -176,29 +177,29 @@ def main():print("Example: python analyze_images.py projects/myproject/images")print(" python analyze_images.py C:/path/to/images")sys.exit(1)-+images_dir = sys.argv[1]-- # 转换为绝对路径++ # Convert to absolute pathimages_dir = os.path.abspath(images_dir)-+if not os.path.exists(images_dir):print(f"Error: Directory not found: {images_dir}")sys.exit(1)-+if not os.path.isdir(images_dir):print(f"Error: Not a directory: {images_dir}")sys.exit(1)-+print(f"Analyzing: {images_dir}")-+results = analyze_images(images_dir)-+if results:print_results(results)generate_markdown(results)-- # 保存到CSV文件(保存在图片目录的父目录)++ # Save to CSV file (saved in the parent directory of the images folder)parent_dir = os.path.dirname(images_dir)csv_path = os.path.join(parent_dir, "image_analysis.csv")save_csv(results, csv_path)@@ -208,4 +209,3 @@ def main():if __name__ == "__main__":main()-diff --git a/skills/ppt-master/scripts/batch_validate.py b/skills/ppt-master/scripts/batch_validate.pyindex b2c8d67e..bf7d13fb 100644--- a/skills/ppt-master/scripts/batch_validate.py+++ b/skills/ppt-master/scripts/batch_validate.py@@ -1,10 +1,10 @@#!/usr/bin/env python3"""-PPT Master - 批量项目验证工具+PPT Master - Batch Project Validation Tool-一次性检查多个项目的结构完整性和规范性。+Checks the structural integrity and compliance of multiple projects at once.-用法:+Usage:python3 scripts/batch_validate.py examplespython3 scripts/batch_validate.py projectspython3 scripts/batch_validate.py --all@@ -25,13 +25,13 @@ try:CANVAS_FORMATS)except ImportError:- print("错误: 无法导入 project_utils 模块")- print("请确保 project_utils.py 在同一目录下")+ print("Error: Unable to import project_utils module")+ print("Please ensure project_utils.py is in the same directory")sys.exit(1)class BatchValidator:- """批量验证器"""+ """Batch validator"""def __init__(self):self.results = []@@ -47,30 +47,30 @@ class BatchValidator:def validate_directory(self, directory: str, recursive: bool = False) -> List[Dict]:"""- 验证目录下的所有项目+ Validate all projects in a directoryArgs:- directory: 目录路径- recursive: 是否递归查找子目录+ directory: Directory path+ recursive: Whether to recursively search subdirectoriesReturns:- 验证结果列表+ List of validation results"""dir_path = Path(directory)if not dir_path.exists():- print(f"[ERROR] 目录不存在: {directory}")+ print(f"[ERROR] Directory does not exist: {directory}")return []- print(f"\n[SCAN] 扫描目录: {directory}")+ print(f"\n[SCAN] Scanning directory: {directory}")print("=" * 80)projects = find_all_projects(directory)if not projects:- print(f"[WARN] 未找到任何项目")+ print(f"[WARN] No projects found")return []- print(f"找到 {len(projects)} 个项目\n")+ print(f"Found {len(projects)} project(s)\n")for project_path in projects:self.validate_project(str(project_path))@@ -79,23 +79,23 @@ class BatchValidator:def validate_project(self, project_path: str) -> Dict:"""- 验证单个项目+ Validate a single projectArgs:- project_path: 项目路径+ project_path: Project pathReturns:- 验证结果字典+ Validation result dictionary"""self.summary['total'] += 1- # 获取项目信息+ # Get project infoinfo = get_project_info(project_path)- # 验证项目结构+ # Validate project structureis_valid, errors, warnings = validate_project_structure(project_path)- # 验证 SVG viewBox+ # Validate SVG viewBoxsvg_warnings = []if info['svg_files']:project_path_obj = Path(project_path)@@ -103,7 +103,7 @@ class BatchValidator:f for f in info['svg_files']]svg_warnings = validate_svg_viewbox(svg_files, info['format'])- # 汇总结果+ # Aggregate resultsresult = {'path': project_path,'name': info['name'],@@ -119,7 +119,7 @@ class BatchValidator:self.results.append(result)- # 更新统计+ # Update statisticsif is_valid and not warnings and not svg_warnings:self.summary['valid'] += 1status = "[OK]"@@ -137,134 +137,133 @@ class BatchValidator:if svg_warnings:self.summary['svg_issues'] += 1- # 打印结果+ # Print resultprint(f"{status} {info['name']}")- print(f" 路径: {project_path}")+ print(f" Path: {project_path}")print(- f" 格式: {info['format_name']} | SVG: {info['svg_count']} 个 | 日期: {info['date_formatted']}")+ f" Format: {info['format_name']} | SVG: {info['svg_count']} file(s) | Date: {info['date_formatted']}")if errors:- print(f" [ERROR] 错误 ({len(errors)}):")+ print(f" [ERROR] Errors ({len(errors)}):")for error in errors:print(f" - {error}")if warnings or svg_warnings:all_warnings = warnings + svg_warnings- print(f" [WARN] 警告 ({len(all_warnings)}):")- for warning in all_warnings[:3]: # 只显示前3个警告+ print(f" [WARN] Warnings ({len(all_warnings)}):")+ for warning in all_warnings[:3]: # Only show first 3 warningsprint(f" - {warning}")if len(all_warnings) > 3:- print(f" ... 还有 {len(all_warnings) - 3} 个警告")+ print(f" ... and {len(all_warnings) - 3} more warning(s)")print()return resultdef print_summary(self):- """打印验证摘要"""+ """Print validation summary"""print("\n" + "=" * 80)- print("[Summary] 验证摘要")+ print("[Summary] Validation Summary")print("=" * 80)- print(f"\n总项目数: {self.summary['total']}")+ print(f"\nTotal projects: {self.summary['total']}")print(- f" [OK] 完全合格: {self.summary['valid']} ({self._percentage(self.summary['valid'])}%)")+ f" [OK] Fully valid: {self.summary['valid']} ({self._percentage(self.summary['valid'])}%)")print(- f" [WARN] 有警告: {self.summary['has_warnings']} ({self._percentage(self.summary['has_warnings'])}%)")+ f" [WARN] With warnings: {self.summary['has_warnings']} ({self._percentage(self.summary['has_warnings'])}%)")print(- f" [ERROR] 有错误: {self.summary['has_errors']} ({self._percentage(self.summary['has_errors'])}%)")+ f" [ERROR] With errors: {self.summary['has_errors']} ({self._percentage(self.summary['has_errors'])}%)")- print(f"\n常见问题:")- print(f" 缺少 README.md: {self.summary['missing_readme']} 个项目")- print(f" 缺少设计规范: {self.summary['missing_spec']} 个项目")- print(f" SVG 格式问题: {self.summary['svg_issues']} 个项目")+ print(f"\nCommon issues:")+ print(f" Missing README.md: {self.summary['missing_readme']} project(s)")+ print(f" Missing design spec: {self.summary['missing_spec']} project(s)")+ print(f" SVG format issues: {self.summary['svg_issues']} project(s)")- # 按格式分组统计+ # Group statistics by formatformat_stats = defaultdict(int)for result in self.results:format_stats[result['format']] += 1if format_stats:- print(f"\n画布格式分布:")+ print(f"\nCanvas format distribution:")for fmt, count in sorted(format_stats.items(), key=lambda x: x[1], reverse=True):- print(f" {fmt}: {count} 个项目")+ print(f" {fmt}: {count} project(s)")- # 提供修复建议+ # Provide fix suggestionsif self.summary['has_errors'] > 0 or self.summary['has_warnings'] > 0:- print(f"\n[TIP] 修复建议:")+ print(f"\n[TIP] Fix suggestions:")if self.summary['missing_readme'] > 0:- print(f" 1. 为缺少 README 的项目创建说明文档")+ print(f" 1. Create documentation for projects missing README")print(- f" 参考: examples/google_annual_report_ppt169_20251116/README.md")+ f" Reference: examples/google_annual_report_ppt169_20251116/README.md")if self.summary['svg_issues'] > 0:- print(f" 2. 检查并修复 SVG viewBox 设置")- print(f" 确保与画布格式一致")+ print(f" 2. Check and fix SVG viewBox settings")+ print(f" Ensure consistency with canvas format")if self.summary['missing_spec'] > 0:- print(f" 3. 补充设计规范文件")- print(f" 文件名: 设计规范与内容大纲.md")+ print(f" 3. Add design specification files")def _percentage(self, count: int) -> int:- """计算百分比"""+ """Calculate percentage"""if self.summary['total'] == 0:return 0return int(count / self.summary['total'] * 100)def export_report(self, output_file: str = 'validation_report.txt'):"""- 导出验证报告到文件+ Export validation report to fileArgs:- output_file: 输出文件路径+ output_file: Output file path"""with open(output_file, 'w', encoding='utf-8') as f:- f.write("PPT Master 项目验证报告\n")+ f.write("PPT Master Project Validation Report\n")f.write("=" * 80 + "\n\n")for result in self.results:- status = "[OK] 合格" if result['is_valid'] and not result['warnings'] else \- "[ERROR] 错误" if result['errors'] else "[WARN] 警告"+ status = "[OK] Valid" if result['is_valid'] and not result['warnings'] else \+ "[ERROR] Error" if result['errors'] else "[WARN] Warning"f.write(f"{status} - {result['name']}\n")- f.write(f"路径: {result['path']}\n")+ f.write(f"Path: {result['path']}\n")f.write(- f"格式: {result['format']} | SVG: {result['svg_count']} 个\n")+ f"Format: {result['format']} | SVG: {result['svg_count']} file(s)\n")if result['errors']:- f.write(f"\n错误:\n")+ f.write(f"\nErrors:\n")for error in result['errors']:f.write(f" - {error}\n")if result['warnings']:- f.write(f"\n警告:\n")+ f.write(f"\nWarnings:\n")for warning in result['warnings']:f.write(f" - {warning}\n")f.write("\n" + "-" * 80 + "\n\n")- # 写入摘要+ # Write summaryf.write("\n" + "=" * 80 + "\n")- f.write("验证摘要\n")+ f.write("Validation Summary\n")f.write("=" * 80 + "\n\n")- f.write(f"总项目数: {self.summary['total']}\n")- f.write(f"完全合格: {self.summary['valid']}\n")- f.write(f"有警告: {self.summary['has_warnings']}\n")- f.write(f"有错误: {self.summary['has_errors']}\n")+ f.write(f"Total projects: {self.summary['total']}\n")+ f.write(f"Fully valid: {self.summary['valid']}\n")+ f.write(f"With warnings: {self.summary['has_warnings']}\n")+ f.write(f"With errors: {self.summary['has_errors']}\n")- print(f"\n[REPORT] 验证报告已导出: {output_file}")+ print(f"\n[REPORT] Validation report exported: {output_file}")def main():- """主函数"""+ """Main function"""if len(sys.argv) < 2:- print("PPT Master - 批量项目验证工具\n")- print("用法:")+ print("PPT Master - Batch Project Validation Tool\n")+ print("Usage:")print(" python3 scripts/batch_validate.py <directory>")print(" python3 scripts/batch_validate.py <dir1> <dir2> ...")print(" python3 scripts/batch_validate.py --all")- print("\n示例:")+ print("\nExamples:")print(" python3 scripts/batch_validate.py examples")print(" python3 scripts/batch_validate.py projects")print(" python3 scripts/batch_validate.py examples projects")@@ -273,23 +272,23 @@ def main():validator = BatchValidator()- # 处理参数+ # Process argumentsif '--all' in sys.argv:directories = ['examples', 'projects']else:directories = [arg for arg in sys.argv[1:] if not arg.startswith('--')]- # 验证每个目录+ # Validate each directoryfor directory in directories:if Path(directory).exists():validator.validate_directory(directory)else:- print(f"[WARN] 跳过不存在的目录: {directory}\n")+ print(f"[WARN] Skipping non-existent directory: {directory}\n")- # 打印摘要+ # Print summaryvalidator.print_summary()- # 导出报告(如果指定)+ # Export report (if specified)if '--export' in sys.argv:output_file = 'validation_report.txt'if '--output' in sys.argv:@@ -298,7 +297,7 @@ def main():output_file = sys.argv[idx + 1]validator.export_report(output_file)- # 返回退出码+ # Return exit codeif validator.summary['has_errors'] > 0:sys.exit(1)elif validator.summary['has_warnings'] > 0:diff --git a/skills/ppt-master/scripts/config.py b/skills/ppt-master/scripts/config.pyindex e556c8b2..93173fdf 100644--- a/skills/ppt-master/scripts/config.py+++ b/skills/ppt-master/scripts/config.py@@ -1,16 +1,16 @@#!/usr/bin/env python3"""-PPT Master - 统一配置管理模块+PPT Master - Unified Configuration Management Module-集中管理项目的所有配置项,确保配置的一致性和可维护性。+Centrally manages all project configuration items to ensure consistency and maintainability.-用法:+Usage:from config import Config, CANVAS_FORMATS, DESIGN_COLORS-- # 获取画布格式++ # Get canvas formatppt169 = Config.get_canvas_format('ppt169')-- # 获取配色方案++ # Get color schemecolors = Config.get_color_scheme('consulting')"""@@ -20,29 +20,29 @@ import json# ============================================================-# 路径配置+# Path Configuration# ============================================================-# 项目根目录+# Project root directoryPROJECT_ROOT = Path(__file__).parent.parent-# 核心目录+# Core directoriesSCRIPTS_DIR = PROJECT_ROOT / 'scripts'REFERENCES_DIR = PROJECT_ROOT / 'references'TEMPLATES_DIR = PROJECT_ROOT / 'templates'WORKFLOWS_DIR = PROJECT_ROOT / 'workflows'-# 仓库根目录+# Repository root directoryREPO_ROOT = PROJECT_ROOT.parent.parentEXAMPLES_DIR = REPO_ROOT / 'examples'PROJECTS_DIR = REPO_ROOT / 'projects'-# 模板子目录+# Template subdirectoriesCHART_TEMPLATES_DIR = TEMPLATES_DIR / 'charts'# ============================================================-# 画布格式配置+# Canvas Format Configuration# ============================================================CANVAS_FORMATS = {@@ -53,7 +53,7 @@ CANVAS_FORMATS = {'width': 1280,'height': 720,'aspect_ratio': '16:9',- 'use_case': '现代投影设备、在线演示'+ 'use_case': 'Modern projectors, online presentations'},'ppt43': {'name': 'PPT 4:3',@@ -62,16 +62,16 @@ CANVAS_FORMATS = {'width': 1024,'height': 768,'aspect_ratio': '4:3',- 'use_case': '传统投影设备'+ 'use_case': 'Traditional projectors'},'wechat': {- 'name': '微信公众号头图',+ 'name': 'WeChat Article Header','dimensions': '900×383','viewbox': '0 0 900 383','width': 900,'height': 383,'aspect_ratio': '2.35:1',- 'use_case': '公众号文章配图'+ 'use_case': 'WeChat article cover images'},'xiaohongshu': {'name': '小红书',@@ -80,54 +80,54 @@ CANVAS_FORMATS = {'width': 1242,'height': 1660,'aspect_ratio': '3:4',- 'use_case': '知识分享、产品种草'+ 'use_case': 'Knowledge sharing, product reviews'},'moments': {- 'name': '朋友圈/Instagram',+ 'name': 'Moments/Instagram','dimensions': '1080×1080','viewbox': '0 0 1080 1080','width': 1080,'height': 1080,'aspect_ratio': '1:1',- 'use_case': '社交媒体方形图片'+ 'use_case': 'Social media square images'},'story': {- 'name': 'Story/竖版',+ 'name': 'Story/Vertical','dimensions': '1080×1920','viewbox': '0 0 1080 1920','width': 1080,'height': 1920,'aspect_ratio': '9:16',- 'use_case': '短视频封面、快拍'+ 'use_case': 'Short video covers, stories'},'banner': {- 'name': '横版 Banner',+ 'name': 'Horizontal Banner','dimensions': '1920×1080','viewbox': '0 0 1920 1080','width': 1920,'height': 1080,'aspect_ratio': '16:9',- 'use_case': '网页横幅、大屏展示'+ 'use_case': 'Web banners, large screen displays'},'a4': {- 'name': 'A4 打印',+ 'name': 'A4 Print','dimensions': '1240×1754','viewbox': '0 0 1240 1754','width': 1240,'height': 1754,'aspect_ratio': '√2:1',- 'use_case': '打印文档、PDF导出'+ 'use_case': 'Print documents, PDF export'}}# ============================================================-# 设计配色配置+# Design Color Configuration# ============================================================DESIGN_COLORS = {'consulting': {- 'name': '咨询风格',+ 'name': 'Consulting Style','primary': '#005587','secondary': '#0076A8','accent': '#F5A623',@@ -140,7 +140,7 @@ DESIGN_COLORS = {'background_alt': '#F8F9FA'},'general': {- 'name': '通用灵活风格',+ 'name': 'General Flexible Style','primary': '#2196F3','secondary': '#4CAF50','accent': '#FF9800',@@ -154,7 +154,7 @@ DESIGN_COLORS = {'background_alt': '#F8F9FA'},'tech': {- 'name': '科技风格',+ 'name': 'Tech Style','primary': '#00D1FF','secondary': '#7B61FF','accent': '#00FF88',@@ -167,7 +167,7 @@ DESIGN_COLORS = {'background_alt': '#1A1F2E'},'academic': {- 'name': '学术规范风格',+ 'name': 'Academic Style','primary': '#8B0000','secondary': '#1E3A5F','accent': '#C9B037',@@ -180,7 +180,7 @@ DESIGN_COLORS = {'background_alt': '#F5F5F5'},'government': {- 'name': '政务风格',+ 'name': 'Government Style','primary': '#C41E3A','secondary': '#1E3A5F','accent': '#D4AF37',@@ -196,90 +196,90 @@ DESIGN_COLORS = {# ============================================================-# 行业配色模板+# Industry Color Templates# ============================================================INDUSTRY_COLORS = {'finance': {- 'name': '金融/银行',+ 'name': 'Finance/Banking','primary': '#003366','secondary': '#4A90D9','accent': '#D4AF37'},'healthcare': {- 'name': '医疗/健康',+ 'name': 'Healthcare/Medical','primary': '#00796B','secondary': '#4DB6AC','accent': '#FF7043'},'technology': {- 'name': '科技/互联网',+ 'name': 'Technology/Internet','primary': '#1565C0','secondary': '#42A5F5','accent': '#00E676'},'education': {- 'name': '教育/培训',+ 'name': 'Education/Training','primary': '#5E35B1','secondary': '#7E57C2','accent': '#FFD54F'},'retail': {- 'name': '零售/消费',+ 'name': 'Retail/Consumer','primary': '#E53935','secondary': '#EF5350','accent': '#FFB300'},'manufacturing': {- 'name': '制造/工业',+ 'name': 'Manufacturing/Industrial','primary': '#455A64','secondary': '#78909C','accent': '#FF6F00'},'energy': {- 'name': '能源/环保',+ 'name': 'Energy/Environmental','primary': '#2E7D32','secondary': '#66BB6A','accent': '#FDD835'},'realestate': {- 'name': '房地产/建筑',+ 'name': 'Real Estate/Construction','primary': '#795548','secondary': '#A1887F','accent': '#4CAF50'},'legal': {- 'name': '法律/合规',+ 'name': 'Legal/Compliance','primary': '#37474F','secondary': '#546E7A','accent': '#8D6E63'},'media': {- 'name': '媒体/娱乐',+ 'name': 'Media/Entertainment','primary': '#7B1FA2','secondary': '#AB47BC','accent': '#FF4081'},'logistics': {- 'name': '物流/供应链',+ 'name': 'Logistics/Supply Chain','primary': '#F57C00','secondary': '#FFB74D','accent': '#0288D1'},'agriculture': {- 'name': '农业/食品',+ 'name': 'Agriculture/Food','primary': '#558B2F','secondary': '#8BC34A','accent': '#FFCA28'},'tourism': {- 'name': '旅游/酒店',+ 'name': 'Tourism/Hospitality','primary': '#00ACC1','secondary': '#4DD0E1','accent': '#FF7043'},'automotive': {- 'name': '汽车/交通',+ 'name': 'Automotive/Transportation','primary': '#263238','secondary': '#455A64','accent': '#D32F2F'@@ -288,7 +288,7 @@ INDUSTRY_COLORS = {# ============================================================-# 字体配置+# Font Configuration# ============================================================FONTS = {@@ -311,7 +311,7 @@ FONT_SIZES = {# ============================================================-# 布局配置+# Layout Configuration# ============================================================LAYOUT_MARGINS = {@@ -343,33 +343,33 @@ LAYOUT_MARGINS = {# ============================================================-# SVG 技术规范+# SVG Technical Specifications# ============================================================SVG_CONSTRAINTS = {- # 禁用元素 - PPT 不兼容+ # Forbidden elements - PPT incompatible'forbidden_elements': [- # 裁剪 / 遮罩+ # Clipping / Masking'clipPath','mask',- # 样式系统+ # Style system'style',- # 结构 / 嵌套+ # Structure / Nesting'foreignObject','marker',- # 文本 / 字体+ # Text / Fonts'textPath',- # 动画 / 交互+ # Animation / Interaction'animate','animateMotion','animateTransform','animateColor','set','script',- # 其他+ # Others'iframe',],- # 禁用属性+ # Forbidden attributes'forbidden_attributes': ['class','id',@@ -377,17 +377,17 @@ SVG_CONSTRAINTS = {'onfocus', 'onblur', 'onchange','marker-end',],- # 禁用模式(正则匹配)+ # Forbidden patterns (regex matching)'forbidden_patterns': [- r'@font-face', # Web 字体- r'rgba\s*\(', # rgba 颜色(PPT 不兼容)- r'<\?xml-stylesheet\b', # 外部 CSS+ r'@font-face', # Web fonts+ r'rgba\s*\(', # rgba colors (PPT incompatible)+ r'<\?xml-stylesheet\b', # External CSSr'<link[^>]*rel\s*=\s*["\']stylesheet["\']',- r'@import\s+', # 外部 CSS- r'<g[^>]*\sopacity\s*=', # 组透明度- r'<image[^>]*\sopacity\s*=', # 图片透明度- r'\bon\w+\s*=', # 事件属性- r'(?s)(?=.*<symbol)(?=.*<use\b)', # <symbol> + <use> 复杂用法(顺序无关)+ r'@import\s+', # External CSS+ r'<g[^>]*\sopacity\s*=', # Group opacity+ r'<image[^>]*\sopacity\s*=', # Image opacity+ r'\bon\w+\s*=', # Event attributes+ r'(?s)(?=.*<symbol)(?=.*<use\b)', # <symbol> + <use> complex usage (order-independent)],'recommended_fonts': ['system-ui',@@ -399,123 +399,123 @@ SVG_CONSTRAINTS = {# ============================================================-# 配置管理类+# Configuration Manager Class# ============================================================class Config:- """配置管理器"""+ """Configuration manager."""@staticmethoddef get_canvas_format(format_key: str) -> Optional[Dict]:"""- 获取画布格式配置+ Get canvas format configuration.Args:- format_key: 格式键名(如 'ppt169', 'xiaohongshu')+ format_key: Format key name (e.g. 'ppt169', 'xiaohongshu')Returns:- 格式配置字典,不存在则返回 None+ Format configuration dict, or None if not found"""return CANVAS_FORMATS.get(format_key)@staticmethoddef get_all_canvas_formats() -> Dict:- """获取所有画布格式"""+ """Get all canvas formats."""return CANVAS_FORMATS.copy()@staticmethoddef get_color_scheme(style: str) -> Optional[Dict]:"""- 获取配色方案+ Get color scheme.Args:- style: 风格名称(如 'consulting', 'general', 'tech')+ style: Style name (e.g. 'consulting', 'general', 'tech')Returns:- 配色方案字典+ Color scheme dict"""return DESIGN_COLORS.get(style)@staticmethoddef get_industry_colors(industry: str) -> Optional[Dict]:"""- 获取行业配色+ Get industry color palette.Args:- industry: 行业名称(如 'finance', 'healthcare')+ industry: Industry name (e.g. 'finance', 'healthcare')Returns:- 行业配色字典+ Industry color dict"""return INDUSTRY_COLORS.get(industry)@staticmethoddef get_all_industries() -> List[str]:- """获取所有行业列表"""+ """Get list of all industries."""return list(INDUSTRY_COLORS.keys())@staticmethoddef get_layout_margins(format_key: str) -> Optional[Dict]:"""- 获取布局边距配置+ Get layout margin configuration.Args:- format_key: 格式键名+ format_key: Format key nameReturns:- 边距配置字典+ Margin configuration dict"""return LAYOUT_MARGINS.get(format_key)@staticmethoddef get_font(font_type: str = 'system_ui') -> str:"""- 获取字体声明+ Get font declaration.Args:- font_type: 字体类型('system_ui', 'sans_serif', 'monospace')+ font_type: Font type ('system_ui', 'sans_serif', 'monospace')Returns:- 字体声明字符串+ Font declaration string"""return FONTS.get(font_type, FONTS['system_ui'])@staticmethoddef get_font_size(size_name: str) -> int:"""- 获取字体大小+ Get font size.Args:- size_name: 大小名称(如 'title', 'body', 'caption')+ size_name: Size name (e.g. 'title', 'body', 'caption')Returns:- 字体大小(像素)+ Font size (pixels)"""return FONT_SIZES.get(size_name, FONT_SIZES['body'])@staticmethoddef validate_svg_element(element_name: str) -> bool:"""- 验证 SVG 元素是否允许使用+ Validate whether an SVG element is allowed.Args:- element_name: 元素名称+ element_name: Element nameReturns:- 是否允许使用+ Whether the element is allowed"""return element_name.lower() not in [e.lower() for e in SVG_CONSTRAINTS['forbidden_elements']]@staticmethoddef get_project_path(subdir: str = '') -> Path:"""- 获取项目路径+ Get project path.Args:- subdir: 子目录名称+ subdir: Subdirectory nameReturns:- 完整路径+ Full path"""if subdir:return PROJECT_ROOT / subdir@@ -524,10 +524,10 @@ class Config:@staticmethoddef export_config(output_file: str = 'config_export.json'):"""- 导出配置为 JSON 文件+ Export configuration to a JSON file.Args:- output_file: 输出文件路径+ output_file: Output file path"""config_data = {'canvas_formats': CANVAS_FORMATS,@@ -541,44 +541,44 @@ class Config:with open(output_file, 'w', encoding='utf-8') as f:json.dump(config_data, f, ensure_ascii=False, indent=2)- print(f"配置已导出到: {output_file}")+ print(f"Configuration exported to: {output_file}")# ============================================================-# 命令行接口+# Command Line Interface# ============================================================def main():- """命令行入口"""+ """Command line entry point."""import sysif len(sys.argv) < 2:- print("PPT Master - 配置管理工具\n")- print("用法:")- print(" python3 scripts/config.py list-formats # 列出所有画布格式")- print(" python3 scripts/config.py list-colors # 列出所有配色方案")- print(" python3 scripts/config.py list-industries # 列出所有行业配色")- print(" python3 scripts/config.py export # 导出配置到 JSON")- print(" python3 scripts/config.py format <key> # 查看指定画布格式")+ print("PPT Master - Configuration Management Tool\n")+ print("Usage:")+ print(" python3 scripts/config.py list-formats # List all canvas formats")+ print(" python3 scripts/config.py list-colors # List all color schemes")+ print(" python3 scripts/config.py list-industries # List all industry colors")+ print(" python3 scripts/config.py export # Export configuration to JSON")+ print(" python3 scripts/config.py format <key> # View a specific canvas format")returncommand = sys.argv[1]if command == 'list-formats':- print("\n📐 画布格式列表:\n")+ print("\nCanvas Format List:\n")for key, info in CANVAS_FORMATS.items():print(f" {key:15} | {info['name']:15} | {info['dimensions']:12} | {info['use_case']}")elif command == 'list-colors':- print("\n🎨 配色方案列表:\n")+ print("\nColor Scheme List:\n")for key, info in DESIGN_COLORS.items():- print(f" {key:12} | {info['name']:15} | 主色: {info['primary']}")+ print(f" {key:12} | {info['name']:15} | Primary: {info['primary']}")elif command == 'list-industries':- print("\n🏢 行业配色列表:\n")+ print("\nIndustry Color List:\n")for key, info in INDUSTRY_COLORS.items():- print(f" {key:15} | {info['name']:15} | 主色: {info['primary']}")+ print(f" {key:15} | {info['name']:15} | Primary: {info['primary']}")elif command == 'export':output_file = sys.argv[2] if len(@@ -589,15 +589,15 @@ def main():format_key = sys.argv[2]info = Config.get_canvas_format(format_key)if info:- print(f"\n📐 画布格式: {format_key}\n")+ print(f"\nCanvas Format: {format_key}\n")for key, value in info.items():print(f" {key}: {value}")else:- print(f"❌ 未找到格式: {format_key}")- print(f" 可用格式: {', '.join(CANVAS_FORMATS.keys())}")+ print(f"[ERROR] Format not found: {format_key}")+ print(f" Available formats: {', '.join(CANVAS_FORMATS.keys())}")else:- print(f"❌ 未知命令: {command}")+ print(f"[ERROR] Unknown command: {command}")if __name__ == '__main__':diff --git a/skills/ppt-master/scripts/crop_images.py b/skills/ppt-master/scripts/crop_images.pyindex 8c8f2152..67c41c5e 100644--- a/skills/ppt-master/scripts/crop_images.py+++ b/skills/ppt-master/scripts/crop_images.py@@ -1,18 +1,18 @@#!/usr/bin/env python3"""-PPT Master - 智能图片裁剪工具+PPT Master - Smart Image Cropping Tool-根据 SVG 中 <image> 元素的 preserveAspectRatio 属性智能裁剪图片:-- slice: 裁剪填充(类似 CSS object-fit: cover)-- meet: 完整显示,不裁剪(类似 CSS object-fit: contain)+Smartly crops images based on the preserveAspectRatio attribute of <image> elements in SVG:+- slice: Crop to fill (similar to CSS object-fit: cover)+- meet: Display fully without cropping (similar to CSS object-fit: contain)-支持9种对齐方式:-- xMinYMin / xMidYMin / xMaxYMin (顶部对齐)-- xMinYMid / xMidYMid / xMaxYMid (垂直居中)-- xMinYMax / xMidYMax / xMaxYMax (底部对齐)+Supports 9 alignment modes:+- xMinYMin / xMidYMin / xMaxYMin (top alignment)+- xMinYMid / xMidYMid / xMaxYMid (vertical center)+- xMinYMax / xMidYMax / xMaxYMax (bottom alignment)-用法:- python scripts/crop_images.py <SVG文件或目录> [--dry-run]+Usage:+ python scripts/crop_images.py <SVG file or directory> [--dry-run]"""import os@@ -31,14 +31,14 @@ except ImportError:def parse_preserve_aspect_ratio(attr: str) -> tuple:"""- 解析 preserveAspectRatio 属性-- 返回: (align, meet_or_slice)- align: 如 'xMidYMid'- meet_or_slice: 'meet' 或 'slice'+ Parse the preserveAspectRatio attribute.++ Returns: (align, meet_or_slice)+ align: e.g. 'xMidYMid'+ meet_or_slice: 'meet' or 'slice'"""if not attr:- return ('xMidYMid', 'meet') # 默认值+ return ('xMidYMid', 'meet') # Default valueparts = attr.strip().split()align = parts[0] if parts else 'xMidYMid'@@ -49,11 +49,11 @@ def parse_preserve_aspect_ratio(attr: str) -> tuple:def get_crop_anchor(align: str) -> tuple:"""- 根据 align 值返回裁剪锚点-- 返回: (x_anchor, y_anchor)- x_anchor: 0.0 (左), 0.5 (中), 1.0 (右)- y_anchor: 0.0 (上), 0.5 (中), 1.0 (下)+ Return the crop anchor point based on the align value.++ Returns: (x_anchor, y_anchor)+ x_anchor: 0.0 (left), 0.5 (center), 1.0 (right)+ y_anchor: 0.0 (top), 0.5 (center), 1.0 (bottom)"""x_map = {'xMin': 0.0, 'xMid': 0.5, 'xMax': 1.0}y_map = {'YMin': 0.0, 'YMid': 0.5, 'YMax': 1.0}@@ -77,38 +77,38 @@ def get_crop_anchor(align: str) -> tuple:def crop_image_to_size(img: Image.Image, target_width: int, target_height: int,x_anchor: float = 0.5, y_anchor: float = 0.5) -> Image.Image:"""- 按目标比例裁剪图片,保持原图分辨率(不缩放)-- 新逻辑:只按目标宽高比裁剪原图,不进行任何缩放操作,- 这样可以保持原图的分辨率和清晰度。-+ Crop an image to the target aspect ratio, preserving original resolution (no scaling).++ New logic: Only crops the original image to the target aspect ratio without any scaling,+ thus preserving the original resolution and clarity.+Args:- img: PIL Image 对象- target_width: 目标宽度(用于计算比例)- target_height: 目标高度(用于计算比例)- x_anchor: 水平锚点 (0=左, 0.5=中, 1=右)- y_anchor: 垂直锚点 (0=上, 0.5=中, 1=下)-+ img: PIL Image object+ target_width: Target width (used to calculate ratio)+ target_height: Target height (used to calculate ratio)+ x_anchor: Horizontal anchor (0=left, 0.5=center, 1=right)+ y_anchor: Vertical anchor (0=top, 0.5=center, 1=bottom)+Returns:- 裁剪后的 PIL Image 对象(保持原图分辨率)+ Cropped PIL Image object (preserving original resolution)"""img_width, img_height = img.size- # 计算目标宽高比+ # Calculate target aspect ratiotarget_ratio = target_width / target_heightimg_ratio = img_width / img_height- # 根据比例计算裁剪区域(在原图上裁剪,不缩放)+ # Calculate crop region on the original image based on ratio (no scaling)if img_ratio > target_ratio:- # 原图更宽,需要裁剪左右两侧+ # Original image is wider; crop left and right sidescrop_height = img_heightcrop_width = int(img_height * target_ratio)else:- # 原图更高,需要裁剪上下两侧+ # Original image is taller; crop top and bottom sidescrop_width = img_widthcrop_height = int(img_width / target_ratio)- # 根据锚点计算裁剪位置+ # Calculate crop position based on anchor pointextra_width = img_width - crop_widthextra_height = img_height - crop_height@@ -117,37 +117,37 @@ def crop_image_to_size(img: Image.Image, target_width: int, target_height: int,right = left + crop_widthbottom = top + crop_height- # 只裁剪,不缩放+ # Crop only, no scalingreturn img.crop((left, top, right, bottom))def process_svg_images(svg_file: str, output_dir: str = None, dry_run: bool = False,verbose: bool = True) -> tuple:"""- 处理 SVG 文件中的图片,根据 preserveAspectRatio 属性进行裁剪-+ Process images in an SVG file, cropping based on the preserveAspectRatio attribute.+Args:- svg_file: SVG 文件路径- output_dir: 裁剪后图片的输出目录(默认为 images/cropped/)- dry_run: 仅预览,不实际处理- verbose: 详细输出-+ svg_file: SVG file path+ output_dir: Output directory for cropped images (default: images/cropped/)+ dry_run: Preview only, no actual processing+ verbose: Verbose output+Returns:(processed_count, error_count)"""svg_path = Path(svg_file)svg_dir = svg_path.parent- # 默认输出目录+ # Default output directoryif output_dir is None:- # 查找项目的 images 目录- # svg_output 或 svg_final 的父目录下的 images+ # Find the project's images directory+ # Parent directory of svg_output or svg_final, under imagesproject_dir = svg_dir.parentoutput_dir = project_dir / 'images' / 'cropped'else:output_dir = Path(output_dir)- # 解析 SVG+ # Parse SVGtry:ET.register_namespace('', 'http://www.w3.org/2000/svg')ET.register_namespace('xlink', 'http://www.w3.org/1999/xlink')@@ -155,7 +155,7 @@ def process_svg_images(svg_file: str, output_dir: str = None, dry_run: bool = Faroot = tree.getroot()except Exception as e:if verbose:- print(f" [ERROR] 解析 SVG 失败: {e}")+ print(f" [ERROR] Failed to parse SVG: {e}")return (0, 1)ns = {'svg': 'http://www.w3.org/2000/svg', 'xlink': 'http://www.w3.org/1999/xlink'}@@ -164,26 +164,26 @@ def process_svg_images(svg_file: str, output_dir: str = None, dry_run: bool = Faerror_count = 0modified = False- # 查找所有 image 元素+ # Find all image elementsfor image in root.iter('{http://www.w3.org/2000/svg}image'):- # 获取 href 属性+ # Get href attributehref = image.get('{http://www.w3.org/1999/xlink}href') or image.get('href')if not href:continue- # 跳过 base64 内嵌图片+ # Skip Base64 inline imagesif href.startswith('data:'):continue- # 获取 preserveAspectRatio 属性+ # Get preserveAspectRatio attributepar = image.get('preserveAspectRatio', '')align, mode = parse_preserve_aspect_ratio(par)- # 只处理 slice 模式+ # Only process slice modeif mode != 'slice':continue- # 获取目标尺寸+ # Get target dimensionstry:target_width = int(float(image.get('width', 0)))target_height = int(float(image.get('height', 0)))@@ -193,7 +193,7 @@ def process_svg_images(svg_file: str, output_dir: str = None, dry_run: bool = Faif target_width <= 0 or target_height <= 0:continue- # 解析图片路径+ # Parse image pathhref_decoded = unquote(href)if href_decoded.startswith('../'):img_path = (svg_dir / href_decoded).resolve()@@ -202,10 +202,10 @@ def process_svg_images(svg_file: str, output_dir: str = None, dry_run: bool = Faif not img_path.exists():if verbose:- print(f" [SKIP] 图片不存在: {href}")+ print(f" [SKIP] Image not found: {href}")continue- # 获取裁剪锚点+ # Get crop anchor pointx_anchor, y_anchor = get_crop_anchor(align)if dry_run:@@ -215,25 +215,25 @@ def process_svg_images(svg_file: str, output_dir: str = None, dry_run: bool = Faprocessed_count += 1continue- # 创建输出目录+ # Create output directoryoutput_dir.mkdir(parents=True, exist_ok=True)try:- # 打开并处理图片+ # Open and process imageimg = Image.open(img_path)- # 转换模式+ # Convert modeif img.mode in ('RGBA', 'P'):img = img.convert('RGB')- # 裁剪+ # Cropcropped = crop_image_to_size(img, target_width, target_height, x_anchor, y_anchor)- # 生成输出文件名(保持原文件名,放到 cropped 目录)+ # Generate output filename (keep original name, place in cropped directory)output_filename = img_path.nameoutput_path = output_dir / output_filename- # 保存+ # Saveif img_path.suffix.lower() == '.png':cropped.save(output_path, 'PNG', optimize=True)else:@@ -243,14 +243,14 @@ def process_svg_images(svg_file: str, output_dir: str = None, dry_run: bool = Faprint(f" [OK] {img_path.name}: {img.size} -> {target_width}x{target_height} "f"({align})")- # 更新 SVG 中的图片路径+ # Update image path in SVGnew_href = f"../images/cropped/{output_filename}"if image.get('{http://www.w3.org/1999/xlink}href'):image.set('{http://www.w3.org/1999/xlink}href', new_href)else:image.set('href', new_href)- # 移除 preserveAspectRatio(图片已是正确尺寸)+ # Remove preserveAspectRatio (image is now correctly sized)if 'preserveAspectRatio' in image.attrib:del image.attrib['preserveAspectRatio']@@ -262,7 +262,7 @@ def process_svg_images(svg_file: str, output_dir: str = None, dry_run: bool = Faprint(f" [ERROR] {img_path.name}: {e}")error_count += 1- # 保存修改后的 SVG+ # Save modified SVGif modified and not dry_run:tree.write(str(svg_path), encoding='unicode', xml_declaration=False)@@ -270,14 +270,14 @@ def process_svg_images(svg_file: str, output_dir: str = None, dry_run: bool = Fadef process_directory(directory: str, dry_run: bool = False, verbose: bool = True) -> tuple:- """处理目录中的所有 SVG 文件"""+ """Process all SVG files in a directory."""directory = Path(directory)total_processed = 0total_errors = 0for svg_file in directory.glob('*.svg'):if verbose:- print(f" 处理: {svg_file.name}")+ print(f" Processing: {svg_file.name}")processed, errors = process_svg_images(str(svg_file), dry_run=dry_run, verbose=verbose)total_processed += processedtotal_errors += errors@@ -289,34 +289,34 @@ def main():import argparseparser = argparse.ArgumentParser(- description='PPT Master - 智能图片裁剪工具',+ description='PPT Master - Smart Image Cropping Tool',formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''-示例:+Examples:%(prog)s projects/my_project/svg_output%(prog)s page_01.svg --dry-run--preserveAspectRatio 用法:- xMidYMid slice 居中裁剪(默认)- xMidYMin slice 保留顶部- xMidYMax slice 保留底部- xMinYMid slice 保留左侧- xMaxYMid slice 保留右侧- xMidYMid meet 完整显示,不裁剪++preserveAspectRatio usage:+ xMidYMid slice Center crop (default)+ xMidYMin slice Keep top+ xMidYMax slice Keep bottom+ xMinYMid slice Keep left+ xMaxYMid slice Keep right+ xMidYMid meet Display fully, no cropping''')- parser.add_argument('path', type=Path, help='SVG 文件或目录')- parser.add_argument('--dry-run', '-n', action='store_true', help='仅预览,不实际处理')- parser.add_argument('--quiet', '-q', action='store_true', help='安静模式')+ parser.add_argument('path', type=Path, help='SVG file or directory')+ parser.add_argument('--dry-run', '-n', action='store_true', help='Preview only, no actual processing')+ parser.add_argument('--quiet', '-q', action='store_true', help='Quiet mode')args = parser.parse_args()if not args.path.exists():- print(f"[ERROR] 路径不存在: {args.path}")+ print(f"[ERROR] Path not found: {args.path}")exit(1)-- print("PPT Master - 智能图片裁剪")++ print("PPT Master - Smart Image Cropping")print("=" * 50)if args.path.is_file():@@ -327,7 +327,7 @@ preserveAspectRatio 用法:verbose=not args.quiet)print()- print(f"完成: {processed} 张图片已裁剪, {errors} 个错误")+ print(f"Done: {processed} image(s) cropped, {errors} error(s)")if __name__ == '__main__':diff --git a/skills/ppt-master/scripts/embed_icons.py b/skills/ppt-master/scripts/embed_icons.pyindex d18fe3aa..4ced7da5 100644--- a/skills/ppt-master/scripts/embed_icons.py+++ b/skills/ppt-master/scripts/embed_icons.py@@ -1,25 +1,25 @@#!/usr/bin/env python3"""-SVG 图标嵌入工具+SVG Icon Embedding Tool-将 SVG 文件中的图标占位符替换为实际的图标代码。+Replaces icon placeholders in SVG files with actual icon code.-占位符语法:+Placeholder syntax:<use data-icon="rocket" x="100" y="200" width="48" height="48" fill="#0076A8"/>-替换后:+After replacement:<g transform="translate(100, 200) scale(3)" fill="#0076A8"><path d="..."/></g>-用法:+Usage:python3 scripts/embed_icons.py <svg_file> [svg_file2] ...python3 scripts/embed_icons.py svg_output/*.svg-选项:- --icons-dir <path> 图标目录路径(默认:templates/icons/)- --dry-run 仅显示将要替换的内容,不修改文件- --verbose 显示详细信息+Options:+ --icons-dir <path> Icon directory path (default: templates/icons/)+ --dry-run Only show what would be replaced, without modifying files+ --verbose Show detailed information"""import os@@ -29,35 +29,35 @@ import argparsefrom pathlib import Path-# 默认图标目录+# Default icon directoryDEFAULT_ICONS_DIR = Path(__file__).parent.parent / 'templates' / 'icons'-# 图标基础尺寸+# Icon base sizeICON_BASE_SIZE = 16def extract_paths_from_icon(icon_path: Path) -> list[str]:"""- 从图标 SVG 文件中提取所有 path 元素-+ Extract all path elements from an icon SVG file.+Args:- icon_path: 图标文件路径-+ icon_path: Icon file path+Returns:- path 元素列表(不含 fill 属性)+ List of path elements (without fill attribute)"""if not icon_path.exists():return []content = icon_path.read_text(encoding='utf-8')- # 匹配所有 <path ... /> 元素+ # Match all <path ... /> elementspath_pattern = r'<path\s+([^>]*)/>'matches = re.findall(path_pattern, content, re.DOTALL)paths = []for attrs in matches:- # 移除 fill 属性(将在外层 <g> 上统一设置)+ # Remove fill attribute (will be set uniformly on the outer <g>)attrs_clean = re.sub(r'\s*fill="[^"]*"', '', attrs)paths.append(f'<path {attrs_clean.strip()}/>')@@ -66,28 +66,28 @@ def extract_paths_from_icon(icon_path: Path) -> list[str]:def parse_use_element(use_match: str) -> dict:"""- 解析 use 元素的属性-+ Parse attributes of a use element.+Args:- use_match: use 元素的完整字符串-+ use_match: Complete string of the use element+Returns:- 属性字典+ Attribute dictionary"""attrs = {}- # 提取 data-icon+ # Extract data-iconicon_match = re.search(r'data-icon="([^"]+)"', use_match)if icon_match:attrs['icon'] = icon_match.group(1)- # 提取数值属性+ # Extract numeric attributesfor attr in ['x', 'y', 'width', 'height']:match = re.search(rf'{attr}="([^"]+)"', use_match)if match:attrs[attr] = float(match.group(1))- # 提取 fill 颜色+ # Extract fill colorfill_match = re.search(r'fill="([^"]+)"', use_match)if fill_match:attrs['fill'] = fill_match.group(1)@@ -97,14 +97,14 @@ def parse_use_element(use_match: str) -> dict:def generate_icon_group(attrs: dict, paths: list[str]) -> str:"""- 生成图标的 <g> 元素-+ Generate the icon's <g> element.+Args:- attrs: use 元素的属性- paths: 图标的 path 元素列表-+ attrs: Attributes of the use element+ paths: List of icon path elements+Returns:- 完整的 <g> 元素字符串+ Complete <g> element string"""x = attrs.get('x', 0)y = attrs.get('y', 0)@@ -113,16 +113,16 @@ def generate_icon_group(attrs: dict, paths: list[str]) -> str:fill = attrs.get('fill', '#000000')icon_name = attrs.get('icon', 'unknown')- # 计算缩放比例(基于 width,假设等比缩放)+ # Calculate scale factor (based on width, assuming uniform scaling)scale = width / ICON_BASE_SIZE- # 构建 transform+ # Build transformif scale == 1:transform = f'translate({x}, {y})'else:transform = f'translate({x}, {y}) scale({scale})'- # 生成 <g> 元素+ # Generate <g> elementpaths_str = '\n '.join(paths)return f'''<!-- icon: {icon_name} -->@@ -133,36 +133,36 @@ def generate_icon_group(attrs: dict, paths: list[str]) -> str:def process_svg_file(svg_path: Path, icons_dir: Path, dry_run: bool = False, verbose: bool = False) -> int:"""- 处理单个 SVG 文件,替换所有图标占位符-+ Process a single SVG file, replacing all icon placeholders.+Args:- svg_path: SVG 文件路径- icons_dir: 图标目录路径- dry_run: 是否仅预览不修改- verbose: 是否显示详细信息-+ svg_path: SVG file path+ icons_dir: Icon directory path+ dry_run: Whether to only preview without modifying+ verbose: Whether to show detailed information+Returns:- 替换的图标数量+ Number of icons replaced"""if not svg_path.exists():- print(f"[ERROR] 文件不存在: {svg_path}")+ print(f"[ERROR] File not found: {svg_path}")return 0content = svg_path.read_text(encoding='utf-8')- # 匹配 <use data-icon="xxx" ... /> 元素+ # Match <use data-icon="xxx" ... /> elementsuse_pattern = r'<use\s+[^>]*data-icon="[^"]*"[^>]*/>'matches = list(re.finditer(use_pattern, content))if not matches:if verbose:- print(f"[SKIP] 无图标占位符: {svg_path}")+ print(f"[SKIP] No icon placeholders: {svg_path}")return 0replaced_count = 0new_content = content- # 从后向前替换,避免位置偏移+ # Replace from back to front to avoid position offsetfor match in reversed(matches):use_str = match.group(0)attrs = parse_use_element(use_str)@@ -175,7 +175,7 @@ def process_svg_file(svg_path: Path, icons_dir: Path, dry_run: bool = False, verpaths = extract_paths_from_icon(icon_path)if not paths:- print(f"[WARN] 图标不存在: {icon_name} (in {svg_path.name})")+ print(f"[WARN] Icon not found: {icon_name} (in {svg_path.name})")continuereplacement = generate_icon_group(attrs, paths)@@ -198,10 +198,10 @@ def process_svg_file(svg_path: Path, icons_dir: Path, dry_run: bool = False, verdef main():parser = argparse.ArgumentParser(- description='将 SVG 文件中的图标占位符替换为实际图标代码',+ description='Replace icon placeholders in SVG files with actual icon code',formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''-示例:+Examples:python3 scripts/embed_icons.py svg_output/01_cover.svgpython3 scripts/embed_icons.py svg_output/*.svgpython3 scripts/embed_icons.py --dry-run svg_output/*.svg@@ -209,24 +209,24 @@ def main():''')- parser.add_argument('files', nargs='+', help='要处理的 SVG 文件')+ parser.add_argument('files', nargs='+', help='SVG files to process')parser.add_argument('--icons-dir', type=Path, default=DEFAULT_ICONS_DIR,- help=f'图标目录路径(默认:{DEFAULT_ICONS_DIR})')+ help=f'Icon directory path (default: {DEFAULT_ICONS_DIR})')parser.add_argument('--dry-run', action='store_true',- help='仅显示将要替换的内容,不修改文件')+ help='Only show what would be replaced, without modifying files')parser.add_argument('--verbose', '-v', action='store_true',- help='显示详细信息')+ help='Show detailed information')args = parser.parse_args()- # 验证图标目录+ # Validate icon directoryif not args.icons_dir.exists():- print(f"[ERROR] 图标目录不存在: {args.icons_dir}")+ print(f"[ERROR] Icon directory not found: {args.icons_dir}")sys.exit(1)-- print(f"[DIR] 图标目录: {args.icons_dir}")++ print(f"[DIR] Icon directory: {args.icons_dir}")if args.dry_run:- print("[PREVIEW] 预览模式(不修改文件)")+ print("[PREVIEW] Preview mode (no files will be modified)")print()total_replaced = 0@@ -241,8 +241,8 @@ def main():total_files += 1print()- print(f"[Summary] 总计: {total_files} 个文件, {total_replaced} 个图标" +- (" (预览)" if args.dry_run else " 已替换"))+ print(f"[Summary] Total: {total_files} file(s), {total_replaced} icon(s)" ++ (" (preview)" if args.dry_run else " replaced"))if __name__ == '__main__':diff --git a/skills/ppt-master/scripts/embed_images.py b/skills/ppt-master/scripts/embed_images.pyindex 18579fca..59df0f5a 100644--- a/skills/ppt-master/scripts/embed_images.py+++ b/skills/ppt-master/scripts/embed_images.py@@ -1,14 +1,14 @@#!/usr/bin/env python3"""-SVG 图片嵌入工具-将 SVG 中引用的外部图片转换为 Base64 内嵌格式+SVG Image Embedding Tool+Converts externally referenced images in SVG files to Base64 inline format.-用法:+Usage:python3 embed_images.py <svg_file> [svg_file2] ...python3 embed_images.py *.svg-示例:- python3 embed_images.py examples/ppt169_demo/svg_output/01_封面.svg+Examples:+ python3 embed_images.py examples/ppt169_demo/svg_output/01_cover.svgpython3 embed_images.py examples/ppt169_demo/svg_output/*.svg"""@@ -19,7 +19,7 @@ import sysimport argparsedef get_mime_type(filename):- """根据文件扩展名返回 MIME 类型"""+ """Return the MIME type based on file extension."""ext = filename.lower().split('.')[-1]mime_map = {'png': 'image/png',@@ -32,7 +32,7 @@ def get_mime_type(filename):return mime_map.get(ext, 'application/octet-stream')def get_file_size_str(size_bytes):- """将字节数转换为可读的文件大小"""+ """Convert byte count to a human-readable file size string."""if size_bytes < 1024:return f"{size_bytes} B"elif size_bytes < 1024 * 1024:@@ -42,14 +42,14 @@ def get_file_size_str(size_bytes):def embed_images_in_svg(svg_path, dry_run=False):"""- 将 SVG 文件中的外部图片转换为 Base64 内嵌-+ Convert externally referenced images in an SVG file to Base64 inline format.+Args:- svg_path: SVG 文件路径- dry_run: 如果为 True,只显示会处理的图片,不实际修改文件-+ svg_path: SVG file path+ dry_run: If True, only show which images would be processed without modifying the file+Returns:- tuple: (处理的图片数量, 嵌入后的文件大小)+ tuple: (number of images processed, file size after embedding)"""svg_dir = os.path.dirname(os.path.abspath(svg_path))@@ -58,7 +58,7 @@ def embed_images_in_svg(svg_path, dry_run=False):original_size = len(content.encode('utf-8'))- # 匹配 href="xxx.png" 或 href="xxx.jpg" 等(排除已经是 data: 的)+ # Match href="xxx.png" or href="xxx.jpg" etc. (exclude those already using data:)pattern = r'href="(?!data:)([^"]+\.(png|jpg|jpeg|gif|webp))"'images_found = []@@ -68,11 +68,11 @@ def embed_images_in_svg(svg_path, dry_run=False):nonlocal images_embeddedimg_path = match.group(1)- # 解码 XML/HTML 实体(如 & -> &)+ # Decode XML/HTML entities (e.g., & -> &)import htmlimg_path_decoded = html.unescape(img_path)- # 处理相对路径+ # Handle relative pathsif not os.path.isabs(img_path_decoded):full_path = os.path.join(svg_dir, img_path_decoded)else:@@ -102,7 +102,7 @@ def embed_images_in_svg(svg_path, dry_run=False):new_size = len(new_content.encode('utf-8'))- # 打印处理的图片+ # Print processed imagesif images_found:print(f"\n[FILE] {os.path.basename(svg_path)}")for img_path, status, size in images_found:@@ -124,18 +124,18 @@ def embed_images_in_svg(svg_path, dry_run=False):def main():parser = argparse.ArgumentParser(- description='将 SVG 中引用的外部图片转换为 Base64 内嵌格式',+ description='Convert externally referenced images in SVG files to Base64 inline format',formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''-示例:- %(prog)s 01_封面.svg # 处理单个文件- %(prog)s *.svg # 处理当前目录所有 SVG- %(prog)s --dry-run *.svg # 预览将处理的文件+Examples:+ %(prog)s 01_cover.svg # Process a single file+ %(prog)s *.svg # Process all SVGs in current directory+ %(prog)s --dry-run *.svg # Preview files to be processed''')- parser.add_argument('files', nargs='+', help='要处理的 SVG 文件')+ parser.add_argument('files', nargs='+', help='SVG files to process')parser.add_argument('--dry-run', '-n', action='store_true',- help='只显示将要处理的图片,不实际修改文件')+ help='Only show which images would be processed, without modifying files')args = parser.parse_args()diff --git a/skills/ppt-master/scripts/error_helper.py b/skills/ppt-master/scripts/error_helper.pyindex 77294bf7..424c7966 100644--- a/skills/ppt-master/scripts/error_helper.py+++ b/skills/ppt-master/scripts/error_helper.py@@ -1,293 +1,293 @@#!/usr/bin/env python3"""-PPT Master - 错误消息助手+PPT Master - Error Message Helper-提供友好的错误消息和具体的修复建议。+Provides user-friendly error messages and specific fix suggestions."""from typing import Dict, List, Optionalclass ErrorHelper:- """错误消息助手"""+ """Error message helper."""- # 错误类型和对应的修复建议+ # Error types and their corresponding fix suggestionsERROR_SOLUTIONS = {'missing_readme': {- 'message': '缺少 README.md 文件',+ 'message': 'Missing README.md file','solutions': [- '创建 README.md 文件,包含项目说明、使用方法等',- '参考模板: examples/google_annual_report_ppt169_20251116/README.md',- '或使用命令: cp examples/google_annual_report_ppt169_20251116/README.md <your_project>/'+ 'Create a README.md file with project description, usage instructions, etc.',+ 'Reference template: examples/google_annual_report_ppt169_20251116/README.md',+ 'Or use command: cp examples/google_annual_report_ppt169_20251116/README.md <your_project>/'],'severity': 'error'},'missing_spec': {- 'message': '缺少设计规范文件',+ 'message': 'Missing design specification file','solutions': [- '创建 设计规范与内容大纲.md 文件',- '包含: 画布规格、配色方案、字体规范、布局规范、内容大纲',- '参考 Strategist 角色生成的设计规范'+ 'Create a design_specification.md file',+ 'Include: canvas specs, color scheme, font specs, layout specs, content outline',+ 'Refer to the design specification generated by the Strategist role'],'severity': 'warning'},'missing_svg_output': {- 'message': '缺少 svg_output 目录',+ 'message': 'Missing svg_output directory','solutions': [- '创建 svg_output 目录: mkdir svg_output',- '将生成的 SVG 文件放入该目录',- '确保 SVG 文件命名符合规范: slide_XX_name.svg'+ 'Create the svg_output directory: mkdir svg_output',+ 'Place generated SVG files in this directory',+ 'Ensure SVG files follow naming convention: slide_XX_name.svg'],'severity': 'error'},'empty_svg_output': {- 'message': 'svg_output 目录为空',+ 'message': 'svg_output directory is empty','solutions': [- '使用 AI 角色(Executor)生成 SVG 文件',- '将 SVG 文件保存到 svg_output 目录',- '确保文件命名格式: slide_01_cover.svg, slide_02_content.svg 等'+ 'Use the AI role (Executor) to generate SVG files',+ 'Save SVG files to the svg_output directory',+ 'Ensure file naming format: slide_01_cover.svg, slide_02_content.svg, etc.'],'severity': 'warning'},'invalid_svg_naming': {- 'message': 'SVG 文件命名不规范',+ 'message': 'Non-standard SVG file naming','solutions': [- '重命名 SVG 文件,使用格式: slide_XX_name.svg',- 'XX 为两位数字(01, 02, ...)',- 'name 使用英文或拼音,下划线分隔',- '示例: slide_01_cover.svg, slide_02_overview.svg'+ 'Rename SVG files using format: slide_XX_name.svg',+ 'XX should be a two-digit number (01, 02, ...)',+ 'name should use English or pinyin, separated by underscores',+ 'Example: slide_01_cover.svg, slide_02_overview.svg'],'severity': 'warning'},'missing_project_date': {- 'message': '项目目录缺少日期后缀',+ 'message': 'Project directory missing date suffix','solutions': [- '重命名项目目录,添加日期后缀: _YYYYMMDD',- '格式: {项目名}_{格式}_{YYYYMMDD}',- '示例: my_project_ppt169_20251116',- '命令: mv old_name new_name_ppt169_20251116'+ 'Rename the project directory to add a date suffix: _YYYYMMDD',+ 'Format: {project_name}_{format}_{YYYYMMDD}',+ 'Example: my_project_ppt169_20251116',+ 'Command: mv old_name new_name_ppt169_20251116'],'severity': 'warning'},'viewbox_mismatch': {- 'message': 'SVG viewBox 与画布格式不匹配',+ 'message': 'SVG viewBox does not match canvas format','solutions': [- '检查 SVG 文件的 viewBox 属性',- '确保与项目画布格式一致',- 'PPT 16:9 应为: viewBox="0 0 1280 720"',- 'PPT 4:3 应为: viewBox="0 0 1024 768"',- '参考: references/canvas-formats.md'+ 'Check the viewBox attribute of SVG files',+ 'Ensure it matches the project canvas format',+ 'PPT 16:9 should be: viewBox="0 0 1280 720"',+ 'PPT 4:3 should be: viewBox="0 0 1024 768"',+ 'Reference: references/canvas-formats.md'],'severity': 'warning'},'multiple_viewboxes': {- 'message': '检测到多个不同的 viewBox 设置',+ 'message': 'Multiple different viewBox settings detected','solutions': [- '统一所有 SVG 文件的 viewBox',- '同一项目的所有页面应使用相同的画布尺寸',- '使用查找替换工具批量修正',- '参考第一页的 viewBox 设置'+ 'Unify the viewBox across all SVG files',+ 'All pages in the same project should use the same canvas size',+ 'Use find-and-replace tools for batch correction',+ 'Reference the viewBox setting of the first page'],'severity': 'warning'},'no_viewbox': {- 'message': 'SVG 文件缺少 viewBox 属性',+ 'message': 'SVG file missing viewBox attribute','solutions': [- '在 SVG 根元素添加 viewBox 属性',- '格式: <svg viewBox="0 0 1280 720" ...>',- '确保 width、height 与 viewBox 一致',- '这是 SVG 生成的强制要求'+ 'Add the viewBox attribute to the SVG root element',+ 'Format: <svg viewBox="0 0 1280 720" ...>',+ 'Ensure width, height are consistent with viewBox',+ 'This is a mandatory requirement for SVG generation'],'severity': 'error'},'foreignobject_detected': {- 'message': '检测到禁用的 <foreignObject> 元素',+ 'message': 'Forbidden <foreignObject> element detected','solutions': [- '移除 <foreignObject> 元素',- '使用 <text> + <tspan> 进行手动换行',- '这是项目的技术规范要求',- '参考: references/design-guidelines.md'+ 'Remove <foreignObject> elements',+ 'Use <text> + <tspan> for manual line wrapping',+ 'This is a project technical specification requirement',+ 'Reference: references/design-guidelines.md'],'severity': 'error'},'clippath_detected': {- 'message': '检测到禁用的 <clipPath> 元素',+ 'message': 'Forbidden <clipPath> element detected','solutions': [- '移除 <clipPath> 元素',- 'PPT 不支持 SVG 裁剪路径',- '使用基础形状组合替代裁剪效果'+ 'Remove <clipPath> elements',+ 'PPT does not support SVG clipping paths',+ 'Use basic shape combinations as an alternative to clipping'],'severity': 'error'},'mask_detected': {- 'message': '检测到禁用的 <mask> 元素',+ 'message': 'Forbidden <mask> element detected','solutions': [- '移除 <mask> 元素',- 'PPT 不支持 SVG 遮罩',- '使用不透明度(opacity/fill-opacity)替代'+ 'Remove <mask> elements',+ 'PPT does not support SVG masks',+ 'Use opacity (opacity/fill-opacity) as an alternative'],'severity': 'error'},'style_element_detected': {- 'message': '检测到禁用的 <style> 元素',+ 'message': 'Forbidden <style> element detected','solutions': [- '移除 <style> 元素',- '将 CSS 样式转换为内联属性',- '例如: fill="#000" 而非 class="text-black"'+ 'Remove <style> elements',+ 'Convert CSS styles to inline attributes',+ 'Example: fill="#000" instead of class="text-black"'],'severity': 'error'},'class_attribute_detected': {- 'message': '检测到禁用的 class 属性',+ 'message': 'Forbidden class attribute detected','solutions': [- '移除所有 class 属性',- '使用内联样式替代',- '例如: fill="#000" stroke="#333" 直接写在元素上'+ 'Remove all class attributes',+ 'Use inline styles instead',+ 'Example: fill="#000" stroke="#333" directly on the element'],'severity': 'error'},'id_attribute_detected': {- 'message': '检测到禁用的 id 属性',+ 'message': 'Forbidden id attribute detected','solutions': [- '移除所有 id 属性',- '使用内联样式替代',- '避免依赖选择器定位或样式复用'+ 'Remove all id attributes',+ 'Use inline styles instead',+ 'Avoid relying on selectors for positioning or style reuse'],'severity': 'error'},'external_css_detected': {- 'message': '检测到禁用的外部 CSS 引用',+ 'message': 'Forbidden external CSS reference detected','solutions': [- '移除 <?xml-stylesheet?> 声明',- '移除 <link rel="stylesheet"> 引用',- '移除 @import 外部样式',- '将样式改为内联属性'+ 'Remove <?xml-stylesheet?> declarations',+ 'Remove <link rel="stylesheet"> references',+ 'Remove @import external styles',+ 'Convert styles to inline attributes'],'severity': 'error'},'symbol_use_detected': {- 'message': '检测到禁用的 <symbol> + <use> 复杂用法',+ 'message': 'Forbidden <symbol> + <use> complex usage detected','solutions': [- '将 <symbol> 展开为实际 SVG 代码',- '避免 <symbol> + <use> 的复用结构',- '需要图标时可直接嵌入 SVG 路径'+ 'Expand <symbol> into actual SVG code',+ 'Avoid <symbol> + <use> reuse structures',+ 'Embed SVG paths directly when icons are needed'],'severity': 'error'},'marker_detected': {- 'message': '检测到禁用的 <marker> 元素',+ 'message': 'Forbidden <marker> element detected','solutions': [- '移除 <marker> 定义',- '使用 line + polygon 绘制箭头',- '参考 AGENTS.md 的箭头绘制方案'+ 'Remove <marker> definitions',+ 'Use line + polygon to draw arrows',+ 'Reference the arrow drawing approach in AGENTS.md'],'severity': 'error'},'marker_end_detected': {- 'message': '检测到禁用的 marker-end 属性',+ 'message': 'Forbidden marker-end attribute detected','solutions': [- '移除 marker-end 属性',- '使用 line + polygon 绘制箭头',- '确保箭头方向与线条一致'+ 'Remove marker-end attributes',+ 'Use line + polygon to draw arrows',+ 'Ensure arrow direction matches the line'],'severity': 'error'},'rgba_detected': {- 'message': '检测到禁用的 rgba() 颜色',+ 'message': 'Forbidden rgba() color detected','solutions': [- '将 rgba() 改为 hex + opacity 写法',- '示例: fill="#FFFFFF" fill-opacity="0.1"',- '描边使用 stroke-opacity'+ 'Replace rgba() with hex + opacity notation',+ 'Example: fill="#FFFFFF" fill-opacity="0.1"',+ 'Use stroke-opacity for strokes'],'severity': 'error'},'group_opacity_detected': {- 'message': '检测到禁用的 <g opacity>',+ 'message': 'Forbidden <g opacity> detected','solutions': [- '移除组级 opacity',- '为每个子元素单独设置透明度',- '使用 fill-opacity / stroke-opacity 控制'+ 'Remove group-level opacity',+ 'Set opacity individually on each child element',+ 'Use fill-opacity / stroke-opacity for control'],'severity': 'error'},'image_opacity_detected': {- 'message': '检测到禁用的 <image opacity>',+ 'message': 'Forbidden <image opacity> detected','solutions': [- '移除图片 opacity 属性',- '添加遮罩层 <rect> 控制透明度',- '确保遮罩颜色与背景一致'+ 'Remove image opacity attribute',+ 'Add a <rect> overlay to control transparency',+ 'Ensure overlay color matches the background'],'severity': 'error'},'event_attribute_detected': {- 'message': '检测到禁用的事件属性',+ 'message': 'Forbidden event attribute detected','solutions': [- '移除 onclick/onload 等事件属性',- 'SVG 禁止脚本和事件处理',- '交互请在 PPT 中实现'+ 'Remove onclick/onload and other event attributes',+ 'Scripts and event handling are forbidden in SVG',+ 'Implement interactivity in PPT instead'],'severity': 'error'},'set_detected': {- 'message': '检测到禁用的 <set> 元素',+ 'message': 'Forbidden <set> element detected','solutions': [- '移除 <set> 元素',- 'SVG 动画不会导出到 PPT',- '如需动画效果请在 PPT 中设置'+ 'Remove <set> elements',+ 'SVG animations will not be exported to PPT',+ 'Use PPT native animations for animation effects'],'severity': 'error'},'iframe_detected': {- 'message': '检测到禁用的 <iframe> 元素',+ 'message': 'Forbidden <iframe> element detected','solutions': [- '移除 <iframe> 元素',- 'SVG 中不应嵌入外部页面'+ 'Remove <iframe> elements',+ 'External pages should not be embedded in SVG'],'severity': 'error'},'textpath_detected': {- 'message': '检测到禁用的 <textPath> 元素',+ 'message': 'Forbidden <textPath> element detected','solutions': [- '移除 <textPath> 元素',- '路径文本不兼容 PPT',- '使用普通 <text> 元素并手动调整位置'+ 'Remove <textPath> elements',+ 'Text on path is not compatible with PPT',+ 'Use regular <text> elements and adjust position manually'],'severity': 'error'},'webfont_detected': {- 'message': '检测到禁用的 Web 字体 (@font-face)',+ 'message': 'Forbidden web font (@font-face) detected','solutions': [- '移除 @font-face 声明',- '使用系统字体栈',+ 'Remove @font-face declarations',+ 'Use the system font stack','font-family: system-ui, -apple-system, sans-serif'],'severity': 'error'},'animation_detected': {- 'message': '检测到禁用的 SMIL 动画元素',+ 'message': 'Forbidden SMIL animation element detected','solutions': [- '移除所有 <animate>, <animateMotion>, <animateTransform> 等元素',- 'SVG 动画不会导出到 PPT',- '如需动画效果,在 PPT 中使用 PPT 原生动画'+ 'Remove all <animate>, <animateMotion>, <animateTransform> and similar elements',+ 'SVG animations will not be exported to PPT',+ 'Use PPT native animations for animation effects'],'severity': 'error'},'script_detected': {- 'message': '检测到禁用的 <script> 元素',+ 'message': 'Forbidden <script> element detected','solutions': [- '移除 <script> 元素',- '禁止脚本和事件处理',- 'SVG 中的 JavaScript 不会在 PPT 中执行'+ 'Remove <script> elements',+ 'Scripts and event handling are forbidden',+ 'JavaScript in SVG will not execute in PPT'],'severity': 'error'},'invalid_font': {- 'message': '使用了非标准字体',+ 'message': 'Non-standard font used','solutions': [- '使用系统 UI 字体栈',+ 'Use the system UI font stack','font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',- '避免使用特定字体名称(如 Arial, Helvetica)',- '确保跨平台兼容性'+ 'Avoid using specific font names (e.g. Arial, Helvetica)',+ 'Ensure cross-platform compatibility'],'severity': 'warning'}@@ -296,46 +296,46 @@ class ErrorHelper:@classmethoddef get_solution(cls, error_type: str, context: Optional[Dict] = None) -> Dict:"""- 获取错误的解决方案+ Get the solution for an error.Args:- error_type: 错误类型- context: 上下文信息(可选)+ error_type: Error type+ context: Context information (optional)Returns:- 包含 message, solutions, severity 的字典+ Dictionary containing message, solutions, severity"""if error_type in cls.ERROR_SOLUTIONS:solution = cls.ERROR_SOLUTIONS[error_type].copy()- # 根据上下文定制消息+ # Customize message based on contextif context:solution = cls._customize_solution(solution, context)return solution- # 未知错误类型+ # Unknown error typereturn {- 'message': '未知错误',- 'solutions': ['请查看文档或联系维护者'],+ 'message': 'Unknown error',+ 'solutions': ['Please check the documentation or contact the maintainer'],'severity': 'error'}@classmethoddef _customize_solution(cls, solution: Dict, context: Dict) -> Dict:"""- 根据上下文定制解决方案+ Customize solution based on context.Args:- solution: 原始解决方案- context: 上下文信息+ solution: Original solution+ context: Context informationReturns:- 定制后的解决方案+ Customized solution"""customized = solution.copy()- # 根据项目路径定制+ # Customize based on project pathif 'project_path' in context:project_path = context['project_path']customized['solutions'] = [@@ -344,40 +344,40 @@ class ErrorHelper:for s in customized['solutions']]- # 根据文件名定制+ # Customize based on filenameif 'file_name' in context:file_name = context['file_name']customized['message'] = f"{customized['message']}: {file_name}"- # 根据期望值定制+ # Customize based on expected/actual valuesif 'expected' in context and 'actual' in context:- customized['message'] += f" (期望: {context['expected']}, 实际: {context['actual']})"+ customized['message'] += f" (expected: {context['expected']}, actual: {context['actual']})"return customized@classmethoddef format_error_message(cls, error_type: str, context: Optional[Dict] = None) -> str:"""- 格式化错误消息(用于终端输出)+ Format error message (for terminal output).Args:- error_type: 错误类型- context: 上下文信息+ error_type: Error type+ context: Context informationReturns:- 格式化的错误消息字符串+ Formatted error message string"""solution = cls.get_solution(error_type, context)lines = []- # 错误消息- severity_icon = "❌" if solution['severity'] == 'error' else "⚠️ "+ # Error message+ severity_icon = "[ERROR]" if solution['severity'] == 'error' else "[WARN]"lines.append(f"{severity_icon} {solution['message']}")- # 解决方案+ # Solutionsif solution['solutions']:- lines.append("\n💡 解决方案:")+ lines.append("\nSuggested fixes:")for i, sol in enumerate(solution['solutions'], 1):lines.append(f" {i}. {sol}")@@ -386,44 +386,44 @@ class ErrorHelper:@classmethoddef print_error(cls, error_type: str, context: Optional[Dict] = None):"""- 打印格式化的错误消息+ Print formatted error message.Args:- error_type: 错误类型- context: 上下文信息+ error_type: Error type+ context: Context information"""print(cls.format_error_message(error_type, context))@classmethoddef get_all_error_types(cls) -> List[str]:- """获取所有支持的错误类型"""+ """Get all supported error types."""return list(cls.ERROR_SOLUTIONS.keys())@classmethoddef print_help(cls):- """打印所有错误类型和解决方案"""- print("PPT Master - 错误类型和解决方案\n")+ """Print all error types and solutions."""+ print("PPT Master - Error Types and Solutions\n")print("=" * 80)for error_type, info in cls.ERROR_SOLUTIONS.items():- print(f"\n【{error_type}】")- print(f"消息: {info['message']}")- print(f"严重性: {info['severity']}")- print("解决方案:")+ print(f"\n[{error_type}]")+ print(f"Message: {info['message']}")+ print(f"Severity: {info['severity']}")+ print("Solutions:")for i, sol in enumerate(info['solutions'], 1):print(f" {i}. {sol}")print("-" * 80)def main():- """主函数 - 用于测试"""+ """Main function - for testing."""import sysif len(sys.argv) > 1:error_type = sys.argv[1]context = {}- # 解析上下文参数+ # Parse context parametersfor arg in sys.argv[2:]:if '=' in arg:key, value = arg.split('=', 1)diff --git a/skills/ppt-master/scripts/finalize_svg.py b/skills/ppt-master/scripts/finalize_svg.pyindex 7bba2fef..64d2ccfc 100644--- a/skills/ppt-master/scripts/finalize_svg.py+++ b/skills/ppt-master/scripts/finalize_svg.py@@ -1,28 +1,29 @@#!/usr/bin/env python3"""-PPT Master - SVG 后处理工具(统一入口)+PPT Master - SVG Post-processing Tool (Unified Entry Point)-将 svg_output/ 中的 SVG 文件处理后输出到 svg_final/。-默认执行全部处理,也可通过参数指定部分处理。+Processes SVG files from svg_output/ and outputs them to svg_final/.+By default, all processing steps are executed. You can also specify+individual steps via arguments.-用法:- # 默认执行全部处理(推荐)- python3 scripts/finalize_svg.py <项目目录>-- # 只执行部分处理- python3 scripts/finalize_svg.py <项目目录> --only embed-icons fix-rounded+Usage:+ # Execute all processing steps (recommended)+ python3 scripts/finalize_svg.py <project_directory>-示例:+ # Execute only specific steps+ python3 scripts/finalize_svg.py <project_directory> --only embed-icons fix-rounded++Examples:python3 scripts/finalize_svg.py projects/my_projectpython3 scripts/finalize_svg.py examples/ppt169_demo --only embed-icons-处理选项:- embed-icons - 替换 <use data-icon="..."/> 为实际图标 SVG- crop-images - 根据 preserveAspectRatio="slice" 智能裁剪图片- fix-aspect - 修复图片宽高比(防止 PPT 转形状时拉伸)- embed-images - 将外部图片转换为 Base64 嵌入- flatten-text - 将 <tspan> 转为独立 <text>(用于特殊渲染器)- fix-rounded - 将 <rect rx="..."/> 转为 <path>(用于 PPT 转形状)+Processing options:+ embed-icons - Replace <use data-icon="..."/> with actual icon SVG+ crop-images - Smart crop images based on preserveAspectRatio="slice"+ fix-aspect - Fix image aspect ratio (prevent stretching during PPT shape conversion)+ embed-images - Convert external images to Base64 embedded+ flatten-text - Convert <tspan> to independent <text> (for special renderers)+ fix-rounded - Convert <rect rx="..."/> to <path> (for PPT shape conversion)"""import os@@ -31,7 +32,7 @@ import shutilimport argparsefrom pathlib import Path-# 导入同目录的工具模块+# Import utility modules from the same directorysys.path.insert(0, str(Path(__file__).parent))from embed_icons import process_svg_file as embed_icons_in_filefrom embed_images import embed_images_in_svg@@ -40,7 +41,7 @@ from crop_images import process_svg_images as crop_images_in_svgdef safe_print(text):- """安全打印,处理 Windows 终端编码问题"""+ """Safe print that handles Windows terminal encoding issues"""try:print(text)except UnicodeEncodeError:@@ -50,18 +51,18 @@ def safe_print(text):def process_flatten_text(svg_file: Path, verbose: bool = False) -> bool:- """对单个 SVG 文件进行文本扁平化处理(原地修改)"""+ """Flatten text in a single SVG file (in-place modification)"""try:from flatten_tspan import flatten_text_with_tspansfrom xml.etree import ElementTree as ET-+tree = ET.parse(str(svg_file))changed = flatten_text_with_tspans(tree)-+if changed:tree.write(str(svg_file), encoding='unicode', xml_declaration=False)if verbose:- safe_print(f" [OK] {svg_file.name}: 文本已扁平化")+ safe_print(f" [OK] {svg_file.name}: text flattened")return changedexcept Exception as e:if verbose:@@ -70,20 +71,20 @@ def process_flatten_text(svg_file: Path, verbose: bool = False) -> bool:def process_rounded_rect(svg_file: Path, verbose: bool = False) -> int:- """对单个 SVG 文件进行圆角矩形转换(原地修改)"""+ """Convert rounded rectangles in a single SVG file (in-place modification)"""try:from svg_rect_to_path import process_svg-+with open(svg_file, 'r', encoding='utf-8') as f:content = f.read()-+processed, count = process_svg(content, verbose=False)-+if count > 0:with open(svg_file, 'w', encoding='utf-8') as f:f.write(processed)if verbose:- safe_print(f" [OK] {svg_file.name}: {count} 个圆角矩形")+ safe_print(f" [OK] {svg_file.name}: {count} rounded rectangle(s)")return countexcept Exception as e:if verbose:@@ -93,64 +94,64 @@ def process_rounded_rect(svg_file: Path, verbose: bool = False) -> int:def finalize_project(project_dir: Path, options: dict, dry_run: bool = False, quiet: bool = False):"""- 最终化处理项目中的 SVG 文件-+ Finalize SVG files in the project+Args:- project_dir: 项目目录路径- options: 处理选项字典- dry_run: 是否仅预览不执行- quiet: 安静模式,减少输出+ project_dir: Project directory path+ options: Processing options dictionary+ dry_run: Preview only, do not execute+ quiet: Quiet mode, reduce output"""svg_output = project_dir / 'svg_output'svg_final = project_dir / 'svg_final'icons_dir = Path(__file__).parent.parent / 'templates' / 'icons'-- # 检查 svg_output 是否存在++ # Check if svg_output existsif not svg_output.exists():- safe_print(f"[ERROR] 未找到 svg_output 目录: {svg_output}")+ safe_print(f"[ERROR] svg_output directory not found: {svg_output}")return False-- # 获取 SVG 文件列表++ # Get list of SVG filessvg_files = list(svg_output.glob('*.svg'))if not svg_files:- safe_print(f"[ERROR] svg_output 中没有 SVG 文件")+ safe_print(f"[ERROR] No SVG files in svg_output")return False-+if not quiet:print()- safe_print(f"[DIR] 项目: {project_dir.name}")- safe_print(f"[FILE] {len(svg_files)} 个 SVG 文件")-+ safe_print(f"[DIR] Project: {project_dir.name}")+ safe_print(f"[FILE] {len(svg_files)} SVG file(s)")+if dry_run:- safe_print("[PREVIEW] 预览模式,不执行操作")+ safe_print("[PREVIEW] Preview mode, no operations will be performed")return True-- # 步骤 1: 复制目录++ # Step 1: Copy directoryif svg_final.exists():shutil.rmtree(svg_final)shutil.copytree(svg_output, svg_final)-+if not quiet:print()-- # 步骤 2: 嵌入图标++ # Step 2: Embed iconsif options.get('embed_icons'):if not quiet:- safe_print("[1/6] 嵌入图标...")+ safe_print("[1/6] Embedding icons...")icons_count = 0for svg_file in svg_final.glob('*.svg'):count = embed_icons_in_file(svg_file, icons_dir, dry_run=False, verbose=False)icons_count += countif not quiet:if icons_count > 0:- safe_print(f" {icons_count} 个图标已嵌入")+ safe_print(f" {icons_count} icon(s) embedded")else:- safe_print(" 无图标")-- # 步骤 3: 智能裁剪图片(根据 preserveAspectRatio="slice")+ safe_print(" No icons")++ # Step 3: Smart crop images (based on preserveAspectRatio="slice")if options.get('crop_images'):if not quiet:- safe_print("[2/6] 智能裁剪图片...")+ safe_print("[2/6] Smart cropping images...")crop_count = 0crop_errors = 0for svg_file in svg_final.glob('*.svg'):@@ -159,115 +160,115 @@ def finalize_project(project_dir: Path, options: dict, dry_run: bool = False, qucrop_errors += errorsif not quiet:if crop_count > 0:- safe_print(f" {crop_count} 张图片已裁剪")+ safe_print(f" {crop_count} image(s) cropped")else:- safe_print(" 无需裁剪(无 slice 属性的图片)")-- # 步骤 4: 修复图片宽高比(防止 PPT 转形状时拉伸)+ safe_print(" No cropping needed (no images with slice attribute)")++ # Step 4: Fix image aspect ratio (prevent stretching during PPT shape conversion)if options.get('fix_aspect'):if not quiet:- safe_print("[3/6] 修复图片宽高比...")+ safe_print("[3/6] Fixing image aspect ratios...")aspect_count = 0for svg_file in svg_final.glob('*.svg'):count = fix_image_aspect_in_svg(str(svg_file), dry_run=False, verbose=False)aspect_count += countif not quiet:if aspect_count > 0:- safe_print(f" {aspect_count} 张图片已修复")+ safe_print(f" {aspect_count} image(s) fixed")else:- safe_print(" 无图片")-- # 步骤 5: 嵌入图片+ safe_print(" No images")++ # Step 5: Embed imagesif options.get('embed_images'):if not quiet:- safe_print("[4/6] 嵌入图片...")+ safe_print("[4/6] Embedding images...")images_count = 0for svg_file in svg_final.glob('*.svg'):count, _ = embed_images_in_svg(str(svg_file), dry_run=False)images_count += countif not quiet:if images_count > 0:- safe_print(f" {images_count} 张图片已嵌入")+ safe_print(f" {images_count} image(s) embedded")else:- safe_print(" 无图片")-- # 步骤 6: 文本扁平化+ safe_print(" No images")++ # Step 6: Flatten textif options.get('flatten_text'):if not quiet:- safe_print("[5/6] 文本扁平化...")+ safe_print("[5/6] Flattening text...")flatten_count = 0for svg_file in svg_final.glob('*.svg'):if process_flatten_text(svg_file, verbose=False):flatten_count += 1if not quiet:if flatten_count > 0:- safe_print(f" {flatten_count} 个文件已处理")+ safe_print(f" {flatten_count} file(s) processed")else:- safe_print(" 无需处理")-- # 步骤 7: 圆角转 Path+ safe_print(" No processing needed")++ # Step 7: Convert rounded rects to Pathif options.get('fix_rounded'):if not quiet:- safe_print("[6/6] 圆角转 Path...")+ safe_print("[6/6] Converting rounded rects to Path...")rounded_count = 0for svg_file in svg_final.glob('*.svg'):count = process_rounded_rect(svg_file, verbose=False)rounded_count += countif not quiet:if rounded_count > 0:- safe_print(f" {rounded_count} 个圆角矩形已转换")+ safe_print(f" {rounded_count} rounded rectangle(s) converted")else:- safe_print(" 无圆角矩形")-- # 完成+ safe_print(" No rounded rectangles")++ # Doneif not quiet:print()- safe_print("[OK] 完成!")+ safe_print("[OK] Done!")print()- print("后续操作:")+ print("Next steps:")print(f" python scripts/svg_to_pptx.py \"{project_dir}\" -s final")-+return Truedef main():parser = argparse.ArgumentParser(- description='PPT Master - SVG 后处理工具',+ description='PPT Master - SVG Post-processing Tool',formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''-示例:- %(prog)s projects/my_project # 执行全部处理(默认)+Examples:+ %(prog)s projects/my_project # Execute all processing (default)%(prog)s projects/my_project --only embed-icons fix-rounded- %(prog)s projects/my_project -q # 安静模式--处理选项(用于 --only):- embed-icons 嵌入图标- crop-images 智能裁剪图片(根据 preserveAspectRatio)- fix-aspect 修复图片宽高比(防止 PPT 转形状时拉伸)- embed-images 嵌入图片- flatten-text 文本扁平化- fix-rounded 圆角转 Path+ %(prog)s projects/my_project -q # Quiet mode++Processing options (for --only):+ embed-icons Embed icons+ crop-images Smart crop images (based on preserveAspectRatio)+ fix-aspect Fix image aspect ratio (prevent stretching during PPT shape conversion)+ embed-images Embed images+ flatten-text Flatten text+ fix-rounded Convert rounded rects to Path''')-- parser.add_argument('project_dir', type=Path, help='项目目录路径')++ parser.add_argument('project_dir', type=Path, help='Project directory path')parser.add_argument('--only', nargs='+', metavar='OPTION',choices=['embed-icons', 'crop-images', 'fix-aspect', 'embed-images', 'flatten-text', 'fix-rounded'],- help='只执行指定的处理(默认执行全部)')+ help='Execute only specified processing steps (default: all)')parser.add_argument('--dry-run', '-n', action='store_true',- help='仅预览操作,不实际执行')+ help='Preview only, do not execute')parser.add_argument('--quiet', '-q', action='store_true',- help='安静模式,减少输出')-+ help='Quiet mode, reduce output')+args = parser.parse_args()-+if not args.project_dir.exists():- safe_print(f"[ERROR] 项目目录不存在: {args.project_dir}")+ safe_print(f"[ERROR] Project directory does not exist: {args.project_dir}")sys.exit(1)-- # 确定处理选项++ # Determine processing optionsif args.only:- # 只执行指定的处理+ # Execute only specified stepsoptions = {'embed_icons': 'embed-icons' in args.only,'crop_images': 'crop-images' in args.only,@@ -277,7 +278,7 @@ def main():'fix_rounded': 'fix-rounded' in args.only,}else:- # 默认执行全部+ # Execute all by defaultoptions = {'embed_icons': True,'crop_images': True,@@ -286,7 +287,7 @@ def main():'flatten_text': True,'fix_rounded': True,}-+success = finalize_project(args.project_dir, options, args.dry_run, args.quiet)sys.exit(0 if success else 1)diff --git a/skills/ppt-master/scripts/fix_image_aspect.py b/skills/ppt-master/scripts/fix_image_aspect.pyindex 88ca2e13..7dffb297 100644--- a/skills/ppt-master/scripts/fix_image_aspect.py+++ b/skills/ppt-master/scripts/fix_image_aspect.py@@ -1,26 +1,26 @@#!/usr/bin/env python3"""-SVG 图片宽高比修复工具+SVG Image Aspect Ratio Fix Tool-修复 SVG 中 <image> 元素的尺寸,使其与图片原始宽高比一致。-这样在 PowerPoint 将 SVG 转换为形状时,图片不会被拉伸变形。+Fixes the dimensions of <image> elements in SVG to match the original image aspect ratio.+This prevents images from being stretched when PowerPoint converts SVG to editable shapes.-原理:- PowerPoint 在将 SVG 转换为可编辑形状时,会忽略 preserveAspectRatio 属性,- 直接将图片拉伸以填满 width/height 指定的区域。-- 此工具会读取实际图片的宽高比,重新计算 <image> 元素的 x, y, width, height,- 使图片居中显示且保持原始宽高比。+Principle:+ When PowerPoint converts SVG to editable shapes, it ignores the preserveAspectRatio attribute+ and directly stretches the image to fill the area specified by width/height.++ This tool reads the actual image aspect ratio and recalculates the x, y, width, height of+ <image> elements so that images are centered and maintain their original aspect ratio.-用法:+Usage:python3 scripts/fix_image_aspect.py <svg_file> [svg_file2] ...python3 scripts/fix_image_aspect.py projects/xxx/svg_output/*.svg-- # 预览模式++ # Preview modepython3 scripts/fix_image_aspect.py --dry-run projects/xxx/svg_output/*.svg-示例:- python3 scripts/fix_image_aspect.py projects/应急避难场所专项规划/svg_output/slide_06_current_overview.svg+Examples:+ python3 scripts/fix_image_aspect.py projects/demo/svg_output/slide_06_current_overview.svg"""import os@@ -31,7 +31,7 @@ import argparsefrom pathlib import Pathfrom xml.etree import ElementTree as ET-# 尝试导入 PIL,用于获取图片尺寸+# Try to import PIL for getting image dimensionstry:from PIL import ImageHAS_PIL = True@@ -42,7 +42,7 @@ except ImportError:def get_image_dimensions_pil(image_path):- """使用 PIL 获取图片尺寸"""+ """Get image dimensions using PIL."""try:with Image.open(image_path) as img:return img.width, img.height@@ -52,10 +52,10 @@ def get_image_dimensions_pil(image_path):def get_image_dimensions_basic(image_path):- """基本方法获取图片尺寸(不依赖 PIL)"""+ """Get image dimensions using basic method (no PIL dependency)."""try:with open(image_path, 'rb') as f:- data = f.read(64) # 读取头部信息+ data = f.read(64) # Read header information# PNGif data[:8] == b'\x89PNG\r\n\x1a\n':@@ -65,7 +65,7 @@ def get_image_dimensions_basic(image_path):# JPEGif data[:2] == b'\xff\xd8':- # 需要完整读取文件来解析 JPEG+ # Need to read full file to parse JPEGwith open(image_path, 'rb') as f:f.seek(2)while True:@@ -98,10 +98,10 @@ def get_image_dimensions_basic(image_path):def get_image_dimensions_from_base64(data_uri):- """从 Base64 数据 URI 获取图片尺寸"""+ """Get image dimensions from a Base64 data URI."""import iotry:- # 解析 data URI+ # Parse data URImatch = re.match(r'data:image/(\w+);base64,(.+)', data_uri)if not match:return None, None@@ -114,7 +114,7 @@ def get_image_dimensions_from_base64(data_uri):with Image.open(io.BytesIO(img_bytes)) as img:return img.width, img.heightelse:- # 使用基本方法+ # Use basic methodif img_bytes[:8] == b'\x89PNG\r\n\x1a\n':w = int.from_bytes(img_bytes[16:20], 'big')h = int.from_bytes(img_bytes[20:24], 'big')@@ -127,12 +127,12 @@ def get_image_dimensions_from_base64(data_uri):def get_image_dimensions(href, svg_dir):- """获取图片尺寸"""- # 处理 data URI+ """Get image dimensions."""+ # Handle data URIif href.startswith('data:'):return get_image_dimensions_from_base64(href)- # 处理外部文件+ # Handle external filesif not os.path.isabs(href):full_path = os.path.join(svg_dir, href)else:@@ -150,14 +150,14 @@ def get_image_dimensions(href, svg_dir):def calculate_fitted_dimensions(img_width, img_height, box_width, box_height, mode='meet'):"""- 计算图片在框内的适合尺寸-+ Calculate the fitted dimensions for an image within a bounding box.+Args:- img_width, img_height: 图片原始尺寸- box_width, box_height: 容器框尺寸- mode: 'meet' 保持宽高比,完全显示图片(可能有留白)- 'slice' 保持宽高比,完全填充容器(可能裁剪)-+ img_width, img_height: Original image dimensions+ box_width, box_height: Container box dimensions+ mode: 'meet' preserves aspect ratio and fully displays image (may have whitespace)+ 'slice' preserves aspect ratio and fully fills container (may crop)+Returns:(new_width, new_height, offset_x, offset_y)"""@@ -165,27 +165,27 @@ def calculate_fitted_dimensions(img_width, img_height, box_width, box_height, mobox_ratio = box_width / box_heightif mode == 'meet':- # 完全显示图片,可能有留白+ # Fully display image, may have whitespaceif img_ratio > box_ratio:- # 图片更宽,以宽度为准+ # Image is wider, fit by widthnew_width = box_widthnew_height = box_width / img_ratioelse:- # 图片更高,以高度为准+ # Image is taller, fit by heightnew_height = box_heightnew_width = box_height * img_ratioelse: # slice- # 完全填充容器,可能裁剪+ # Fully fill container, may cropif img_ratio > box_ratio:- # 图片更宽,以高度为准+ # Image is wider, fit by heightnew_height = box_heightnew_width = box_height * img_ratioelse:- # 图片更高,以宽度为准+ # Image is taller, fit by widthnew_width = box_widthnew_height = box_width / img_ratio-- # 居中偏移++ # Center offsetoffset_x = (box_width - new_width) / 2offset_y = (box_height - new_height) / 2@@ -194,22 +194,22 @@ def calculate_fitted_dimensions(img_width, img_height, box_width, box_height, modef fix_image_aspect_in_svg(svg_path, dry_run=False, verbose=True):"""- 修复 SVG 中图片的宽高比-+ Fix image aspect ratios in an SVG file.+Args:- svg_path: SVG 文件路径- dry_run: 是否只预览不修改- verbose: 是否输出详细信息-+ svg_path: SVG file path+ dry_run: Whether to only preview without modifying+ verbose: Whether to output detailed information+Returns:- 修复的图片数量+ Number of images fixed"""svg_dir = os.path.dirname(os.path.abspath(svg_path))with open(svg_path, 'r', encoding='utf-8') as f:content = f.read()- # 注册 SVG 命名空间+ # Register SVG namespacesnamespaces = {'': 'http://www.w3.org/2000/svg','xlink': 'http://www.w3.org/1999/xlink',@@ -231,20 +231,20 @@ def fix_image_aspect_in_svg(svg_path, dry_run=False, verbose=True):print(f" [ERROR] Cannot parse SVG: {e}")return 0- # 查找所有 image 元素+ # Find all image elementsfixed_count = 0- # 检查带命名空间和不带命名空间的 image 元素+ # Check image elements with and without namespacefor ns_prefix in ['', '{http://www.w3.org/2000/svg}']:for image_elem in root.iter(f'{ns_prefix}image'):- # 获取 href 属性(支持 xlink:href 和 href)+ # Get href attribute (supports xlink:href and href)href = image_elem.get('{http://www.w3.org/1999/xlink}href')if href is None:href = image_elem.get('href')if href is None:continue- # 获取当前尺寸和位置+ # Get current dimensions and positiontry:x = float(image_elem.get('x', 0))y = float(image_elem.get('y', 0))@@ -256,59 +256,59 @@ def fix_image_aspect_in_svg(svg_path, dry_run=False, verbose=True):if width <= 0 or height <= 0:continue- # 获取 preserveAspectRatio+ # Get preserveAspectRatiopar = image_elem.get('preserveAspectRatio', 'xMidYMid meet')- # 解析 preserveAspectRatio- # 格式: <align> [<meetOrSlice>]- # 例如: xMidYMid meet, xMidYMid slice, none+ # Parse preserveAspectRatio+ # Format: <align> [<meetOrSlice>]+ # e.g.: xMidYMid meet, xMidYMid slice, nonepar_parts = par.split()align = par_parts[0] if par_parts else 'xMidYMid'meet_or_slice = par_parts[1] if len(par_parts) > 1 else 'meet'if align == 'none':- # 如果是 none,不需要修复+ # If none, no fix neededcontinue- # 获取图片原始尺寸+ # Get original image dimensionsimg_width, img_height = get_image_dimensions(href, svg_dir)if img_width is None or img_height is None:continue- # 计算适合的尺寸+ # Calculate fitted dimensionsmode = 'slice' if meet_or_slice == 'slice' else 'meet'new_width, new_height, offset_x, offset_y = calculate_fitted_dimensions(img_width, img_height, width, height, mode)- # 检查是否需要修改- tolerance = 0.5 # 允许的误差+ # Check if modification is needed+ tolerance = 0.5 # Allowed toleranceif (abs(new_width - width) < tolerance andabs(new_height - height) < tolerance):- # 尺寸已经正确,无需修改+ # Dimensions are already correct, no modification neededcontinueif verbose:img_name = os.path.basename(href.split('?')[0][:50] if not href.startswith('data:') else '[base64]')print(f" [FIX] {img_name}")- print(f" 原图尺寸: {img_width}x{img_height} (ratio: {img_width/img_height:.3f})")- print(f" 原框尺寸: {width}x{height} @ ({x}, {y})")- print(f" 新框尺寸: {new_width:.1f}x{new_height:.1f} @ ({x + offset_x:.1f}, {y + offset_y:.1f})")+ print(f" Original image: {img_width}x{img_height} (ratio: {img_width/img_height:.3f})")+ print(f" Original box: {width}x{height} @ ({x}, {y})")+ print(f" New box: {new_width:.1f}x{new_height:.1f} @ ({x + offset_x:.1f}, {y + offset_y:.1f})")if not dry_run:- # 更新属性+ # Update attributesimage_elem.set('x', f'{x + offset_x:.1f}')image_elem.set('y', f'{y + offset_y:.1f}')image_elem.set('width', f'{new_width:.1f}')image_elem.set('height', f'{new_height:.1f}')- # 移除 preserveAspectRatio,因为现在尺寸已经正确+ # Remove preserveAspectRatio since dimensions are now correctif 'preserveAspectRatio' in image_elem.attrib:del image_elem.attrib['preserveAspectRatio']fixed_count += 1if not dry_run and fixed_count > 0:- # 保存修改+ # Save modificationstree.write(svg_path, encoding='unicode', xml_declaration=True)return fixed_count@@ -316,26 +316,26 @@ def fix_image_aspect_in_svg(svg_path, dry_run=False, verbose=True):def main():parser = argparse.ArgumentParser(- description='修复 SVG 中图片的宽高比,防止 PowerPoint 转换时拉伸变形',+ description='Fix image aspect ratios in SVG to prevent stretching when PowerPoint converts to shapes',formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''-示例:- %(prog)s slide_01.svg # 处理单个文件- %(prog)s *.svg # 处理当前目录所有 SVG- %(prog)s --dry-run *.svg # 预览将处理的文件- %(prog)s projects/xxx/svg_output/*.svg # 处理项目目录+Examples:+ %(prog)s slide_01.svg # Process a single file+ %(prog)s *.svg # Process all SVGs in current directory+ %(prog)s --dry-run *.svg # Preview files to be processed+ %(prog)s projects/xxx/svg_output/*.svg # Process project directory''')- parser.add_argument('files', nargs='+', help='要处理的 SVG 文件')+ parser.add_argument('files', nargs='+', help='SVG files to process')parser.add_argument('--dry-run', '-n', action='store_true',- help='只显示将要修复的图片,不实际修改文件')+ help='Only show which images would be fixed, without modifying files')parser.add_argument('--quiet', '-q', action='store_true',- help='安静模式,减少输出')+ help='Quiet mode, reduce output')args = parser.parse_args()if args.dry_run:- print("[INFO] 预览模式:只显示将要修改的内容,不实际修改文件\n")+ print("[INFO] Preview mode: only showing what would be modified, no files will be changed\n")total_fixed = 0total_files = 0@@ -343,12 +343,12 @@ def main():for svg_file in args.files:if not os.path.exists(svg_file):if not args.quiet:- print(f"[ERROR] 文件不存在: {svg_file}")+ print(f"[ERROR] File not found: {svg_file}")continueif not svg_file.endswith('.svg'):if not args.quiet:- print(f"[SKIP] 跳过非 SVG 文件: {svg_file}")+ print(f"[SKIP] Skipping non-SVG file: {svg_file}")continueif not args.quiet:@@ -360,13 +360,13 @@ def main():total_fixed += fixedtotal_files += 1elif not args.quiet:- print(" 无需修复")+ print(" No fix needed")print(f"\n{'=' * 50}")if args.dry_run:- print(f"[预览] 将修复 {total_fixed} 张图片 (共 {total_files} 个文件)")+ print(f"[PREVIEW] Will fix {total_fixed} image(s) in {total_files} file(s)")else:- print(f"[完成] 已修复 {total_fixed} 张图片 (共 {total_files} 个文件)")+ print(f"[DONE] Fixed {total_fixed} image(s) in {total_files} file(s)")if __name__ == '__main__':diff --git a/skills/ppt-master/scripts/flatten_tspan.py b/skills/ppt-master/scripts/flatten_tspan.pyindex 6e24d1b4..66be6196 100644--- a/skills/ppt-master/scripts/flatten_tspan.py+++ b/skills/ppt-master/scripts/flatten_tspan.py@@ -164,17 +164,17 @@ def flatten_text_with_tspans(tree: ET.ElementTree) -> bool:return el.tag == f"{{{SVG_NS}}}{name}"def is_new_line_tspan(tspan):- """判断 tspan 是否表示换行(有独立 y 或非零 dy)"""+ """Determine whether a tspan represents a new line (has its own y or non-zero dy)."""t_dy_attr = get_attr(tspan, "dy")t_y_attr = get_attr(tspan, "y")t_x_attr = get_attr(tspan, "x")dy_val = parse_first_number(t_dy_attr) if t_dy_attr is not None else None- # 有独立 y 属性,或有非零 dy,或有独立 x 属性(表示新行开始)+ # Has its own y attribute, or has non-zero dy, or has its own x attribute (indicating a new line)if t_y_attr is not None:return Trueif dy_val is not None and dy_val != 0:return True- # 如果 tspan 有 x 属性且前面还有同级 tspan,也认为是新行+ # If tspan has an x attribute and there are preceding sibling tspans, treat it as a new lineif t_x_attr is not None:return Truereturn False@@ -192,7 +192,7 @@ def flatten_text_with_tspans(tree: ET.ElementTree) -> bool:if parent is None:continue- # 先检查是否有任何 tspan 需要扁平化(有 dy 且 dy != 0,或有独立的 y 属性)+ # First check whether any tspan needs flattening (dy != 0 or has its own y attribute)needs_flatten = Falsefor child in list(text_el):if not is_svg_tag(child, "tspan"):@@ -201,7 +201,7 @@ def flatten_text_with_tspans(tree: ET.ElementTree) -> bool:needs_flatten = Truebreak- # 如果没有任何 tspan 需要换行,跳过整个 text 元素+ # If no tspan needs a line break, skip the entire text elementif not needs_flatten:continue@@ -211,7 +211,7 @@ def flatten_text_with_tspans(tree: ET.ElementTree) -> bool:new_texts = []- # 用于收集同一行的 tspan 元素+ # Collect tspan elements belonging to the same linecurrent_line_tspans = []current_line_lead_text = None@@ -226,9 +226,9 @@ def flatten_text_with_tspans(tree: ET.ElementTree) -> bool:content = collect_text_content(child)- # 检查这个 tspan 是否开始了新行+ # Check whether this tspan starts a new lineif is_new_line_tspan(child):- # 先保存之前积累的同一行 tspans+ # Save previously accumulated same-line tspans firstif current_line_tspans or current_line_lead_text:ne = _create_text_element_from_line(text_el, current_line_lead_text, current_line_tspans, cur_x, cur_y@@ -237,15 +237,15 @@ def flatten_text_with_tspans(tree: ET.ElementTree) -> bool:current_line_tspans = []current_line_lead_text = None- # 更新位置+ # Update positionnx, ny = compute_line_positions(text_el, child, cur_x, cur_y)cur_x, cur_y = nx, ny- # 如果内容不为空,添加到当前行+ # If content is not empty, add to the current lineif content.strip():current_line_tspans.append(child)- # 处理最后一行+ # Process the last lineif current_line_tspans or current_line_lead_text:ne = _create_text_element_from_line(text_el, current_line_lead_text, current_line_tspans, cur_x, cur_y@@ -275,9 +275,9 @@ def flatten_text_with_tspans(tree: ET.ElementTree) -> bool:def _create_text_element_from_line(text_el, lead_text, tspans, x, y):"""- 从一行的内容(可能包含前导文本和多个 tspan)创建一个 text 元素。- 如果只有一个 tspan 且没有前导文本,直接创建简单的 text。- 如果有多个 tspan 或前导文本,保留 tspan 结构。+ Create a text element from a line's content (may contain leading text and multiple tspans).+ If there is only one tspan and no leading text, create a simple text element.+ If there are multiple tspans or leading text, preserve the tspan structure."""ne = ET.Element(f"{{{SVG_NS}}}text")@@ -291,7 +291,7 @@ def _create_text_element_from_line(text_el, lead_text, tspans, x, y):if p_tf:ne.set("transform", p_tf)- # 如果只有一个 tspan 且没有前导文本,创建简单的 text+ # If there is only one tspan and no leading text, create a simple text elementif not lead_text and len(tspans) == 1:tspan = tspans[0]content = collect_text_content(tspan)@@ -316,28 +316,28 @@ def _create_text_element_from_line(text_el, lead_text, tspans, x, y):ne.text = contentelse:- # 保留 tspan 结构+ # Preserve tspan structureif lead_text:ne.text = lead_textfor tspan in tspans:- # 创建新的 tspan,但移除位置相关属性+ # Create a new tspan, but remove position-related attributesnew_tspan = ET.SubElement(ne, f"{{{SVG_NS}}}tspan")- # 复制样式属性+ # Copy style attributesfor attr in TEXT_STYLE_ATTRS:cv = tspan.get(attr)if cv is not None:new_tspan.set(attr, cv)- # 复制 style+ # Copy styleif tspan.get("style"):new_tspan.set("style", tspan.get("style"))- # 复制文本内容+ # Copy text contentnew_tspan.text = collect_text_content(tspan)- # 复制 tail(tspan 后面的文本)+ # Copy tail (text following the tspan)if tspan.tail:new_tspan.tail = tspan.tail@@ -380,24 +380,24 @@ def _interactive_get_paths():Interactive mode: prompt the user for input path (SVG file or directory)and optional output path. Returns (inp, out_base) or (None, None) if cancelled."""- print("[交互模式] 未提供参数,将以交互方式运行。")- print("请输入需要处理的路径(SVG 文件或包含 SVG 的目录)。")- print("输入 q 回车可退出。\n")+ print("[Interactive mode] No arguments provided; running interactively.")+ print("Please enter the path to process (SVG file or directory containing SVGs).")+ print("Enter q to quit.\n")while True:- raw = input("输入路径 (file/dir): ").strip()+ raw = input("Input path (file/dir): ").strip()if raw.lower() in {"q", "quit", "exit"} or raw == "":return None, Noneinp = os.path.expanduser(raw)if os.path.exists(inp):break- print("路径不存在,请重新输入或输入 q 退出。")+ print("Path does not exist. Please re-enter or enter q to quit.")default_out = _compute_default_out_base(inp)if os.path.isdir(inp):- prompt = f"输出目录 [默认: {default_out}]: "+ prompt = f"Output directory [default: {default_out}]: "else:- prompt = f"输出文件 [默认: {default_out}]: "+ prompt = f"Output file [default: {default_out}]: "raw_out = input(prompt).strip()out_base = os.path.expanduser(raw_out) if raw_out else default_out@@ -425,7 +425,7 @@ def main():if args.interactive or not args.input:inp, out_base = _interactive_get_paths()if not inp:- print("已取消。用法: python scripts/flatten_tspan.py <input_dir_or_svg> [output_dir]")+ print("Cancelled. Usage: python scripts/flatten_tspan.py <input_dir_or_svg> [output_dir]")sys.exit(0)else:inp = args.inputdiff --git a/skills/ppt-master/scripts/gemini_watermark_remover.py b/skills/ppt-master/scripts/gemini_watermark_remover.pyindex cade95f5..2c4b4680 100644--- a/skills/ppt-master/scripts/gemini_watermark_remover.py+++ b/skills/ppt-master/scripts/gemini_watermark_remover.py@@ -1,25 +1,25 @@#!/usr/bin/env python3"""-PPT Master - Gemini 水印去除工具+PPT Master - Gemini Watermark Remover-去除 Gemini 生成图片右下角的水印 Logo。-使用逆向混合算法还原原始像素。+Removes the watermark logo from the bottom-right corner of Gemini-generated images.+Uses a reverse blending algorithm to restore original pixels.-用法:- python3 scripts/gemini_watermark_remover.py <图片路径>- python3 scripts/gemini_watermark_remover.py <图片路径> -o 输出路径.png+Usage:+ python3 scripts/gemini_watermark_remover.py <image_path>+ python3 scripts/gemini_watermark_remover.py <image_path> -o output_path.png-示例:+Examples:python3 scripts/gemini_watermark_remover.py projects/demo/images/bg_01.pngpython3 scripts/gemini_watermark_remover.py image.jpg -o image_clean.jpg-依赖:+Dependencies:pip install Pillow numpy-注意:- - 支持 PNG、JPG、JPEG 格式- - 自动检测水印尺寸(48px 或 96px)- - 输出文件默认添加 _unwatermarked 后缀+Notes:+ - Supports PNG, JPG, JPEG formats+ - Automatically detects watermark size (48px or 96px)+ - Output file defaults to adding an _unwatermarked suffix"""import sys@@ -29,15 +29,15 @@ from pathlib import Pathimport numpy as npfrom PIL import Image-# 导入同目录模块+# Import modules from the same directorysys.path.insert(0, str(Path(__file__).parent))-# 算法参数-ALPHA_THRESHOLD = 0.002 # Alpha 阈值,低于此值不处理-MAX_ALPHA = 0.99 # 最大 Alpha 值,防止除零-LOGO_VALUE = 255 # Logo 像素值(白色)+# Algorithm parameters+ALPHA_THRESHOLD = 0.002 # Alpha threshold; values below this are not processed+MAX_ALPHA = 0.99 # Maximum alpha value to prevent division by zero+LOGO_VALUE = 255 # Logo pixel value (white)-# 水印背景图路径+# Watermark background image pathsSCRIPT_DIR = Path(__file__).parentBG_48_PATH = SCRIPT_DIR / "assets" / "bg_48.png"BG_96_PATH = SCRIPT_DIR / "assets" / "bg_96.png"@@ -45,14 +45,14 @@ BG_96_PATH = SCRIPT_DIR / "assets" / "bg_96.png"def detect_watermark_config(width: int, height: int) -> dict:"""- 根据图片尺寸检测水印配置-+ Detect watermark configuration based on image dimensions+Args:- width: 图片宽度- height: 图片高度-+ width: Image width+ height: Image height+Returns:- 配置字典,包含 logo_size、margin_right、margin_bottom+ Configuration dict containing logo_size, margin_right, margin_bottom"""if width > 1024 and height > 1024:return {"logo_size": 96, "margin_right": 64, "margin_bottom": 64}@@ -61,15 +61,15 @@ def detect_watermark_config(width: int, height: int) -> dict:def calculate_watermark_position(width: int, height: int, config: dict) -> dict:"""- 计算水印位置-+ Calculate watermark position+Args:- width: 图片宽度- height: 图片高度- config: 水印配置-+ width: Image width+ height: Image height+ config: Watermark configuration+Returns:- 位置字典,包含 x、y、width、height+ Position dict containing x, y, width, height"""logo_size = config["logo_size"]return {@@ -82,13 +82,13 @@ def calculate_watermark_position(width: int, height: int, config: dict) -> dict:def calculate_alpha_map(bg_image: Image.Image) -> np.ndarray:"""- 从水印背景图计算 Alpha 通道映射-+ Calculate the alpha channel map from the watermark background image+Args:- bg_image: 水印背景 PNG 图片-+ bg_image: Watermark background PNG image+Returns:- Alpha 映射数组(0-1 范围)+ Alpha map array (range 0-1)"""bg_array = np.array(bg_image.convert("RGB"), dtype=np.float32)max_channel = np.max(bg_array, axis=2)@@ -97,15 +97,15 @@ def calculate_alpha_map(bg_image: Image.Image) -> np.ndarray:def remove_watermark(image: Image.Image, alpha_map: np.ndarray, position: dict) -> Image.Image:"""- 使用逆向混合算法去除水印-+ Remove watermark using a reverse blending algorithm+Args:- image: 原始图片- alpha_map: Alpha 映射数组- position: 水印位置-+ image: Original image+ alpha_map: Alpha map array+ position: Watermark position+Returns:- 去除水印后的图片+ Image with watermark removed"""img_array = np.array(image.convert("RGBA"), dtype=np.float32)x, y, w, h = position["x"], position["y"], position["width"], position["height"]@@ -129,15 +129,15 @@ def remove_watermark(image: Image.Image, alpha_map: np.ndarray, position: dict)def process_image(input_path: Path, output_path: Path | None = None, verbose: bool = True) -> Path:"""- 处理单张图片,去除水印-+ Process a single image to remove its watermark+Args:- input_path: 输入图片路径- output_path: 输出图片路径(可选)- verbose: 是否输出详细信息-+ input_path: Input image path+ output_path: Output image path (optional)+ verbose: Whether to output detailed information+Returns:- 输出文件路径+ Output file path"""image = Image.open(input_path)width, height = image.size@@ -146,16 +146,16 @@ def process_image(input_path: Path, output_path: Path | None = None, verbose: boposition = calculate_watermark_position(width, height, config)if verbose:- print(f" 图片尺寸: {width} x {height}")- print(f" 水印尺寸: {config['logo_size']} x {config['logo_size']}")- print(f" 水印位置: ({position['x']}, {position['y']})")+ print(f" Image size: {width} x {height}")+ print(f" Watermark size: {config['logo_size']} x {config['logo_size']}")+ print(f" Watermark position: ({position['x']}, {position['y']})")bg_path = BG_96_PATH if config["logo_size"] == 96 else BG_48_PATH-+if not bg_path.exists():- print(f"错误: 水印背景图不存在: {bg_path}")+ print(f"Error: Watermark background image not found: {bg_path}")sys.exit(1)-+bg_image = Image.open(bg_path)alpha_map = calculate_alpha_map(bg_image)@@ -175,41 +175,41 @@ def process_image(input_path: Path, output_path: Path | None = None, verbose: bodef main():parser = argparse.ArgumentParser(- description='PPT Master - Gemini 水印去除工具',+ description='PPT Master - Gemini Watermark Remover',formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''-示例:+Examples:%(prog)s projects/demo/images/bg_01.png%(prog)s image.jpg -o image_clean.jpg-说明:- - 自动检测水印尺寸(大图 96px,小图 48px)- - 支持 PNG、JPG、JPEG 格式- - 默认输出文件添加 _unwatermarked 后缀+Notes:+ - Automatically detects watermark size (96px for large images, 48px for small)+ - Supports PNG, JPG, JPEG formats+ - Output file defaults to adding an _unwatermarked suffix''')-- parser.add_argument('input', type=Path, help='输入图片路径')- parser.add_argument('-o', '--output', type=Path, default=None, help='输出图片路径')- parser.add_argument('-q', '--quiet', action='store_true', help='静默模式')-++ parser.add_argument('input', type=Path, help='Input image path')+ parser.add_argument('-o', '--output', type=Path, default=None, help='Output image path')+ parser.add_argument('-q', '--quiet', action='store_true', help='Quiet mode')+args = parser.parse_args()if not args.input.exists():- print(f"错误: 文件不存在: {args.input}")+ print(f"Error: File not found: {args.input}")sys.exit(1)verbose = not args.quietif verbose:- print("PPT Master - Gemini 水印去除工具")+ print("PPT Master - Gemini Watermark Remover")print("=" * 40)- print(f" 输入文件: {args.input}")+ print(f" Input file: {args.input}")output = process_image(args.input, args.output, verbose=verbose)-+if verbose:print()- print(f"[完成] 已保存: {output}")+ print(f"[Done] Saved to: {output}")if __name__ == "__main__":diff --git a/skills/ppt-master/scripts/generate_examples_index.py b/skills/ppt-master/scripts/generate_examples_index.pyindex 2215c53e..96b240a2 100644--- a/skills/ppt-master/scripts/generate_examples_index.py+++ b/skills/ppt-master/scripts/generate_examples_index.py@@ -1,10 +1,10 @@#!/usr/bin/env python3"""-PPT Master - Examples 索引生成工具+PPT Master - Examples Index Generator-自动扫描 examples 目录并生成 README.md 索引文件。+Automatically scans the examples directory and generates a README.md index file.-用法:+Usage:python3 scripts/generate_examples_index.pypython3 scripts/generate_examples_index.py examples"""@@ -17,83 +17,83 @@ from collections import defaultdicttry:from project_utils import find_all_projects, get_project_info, CANVAS_FORMATSexcept ImportError:- print("错误: 无法导入 project_utils 模块")- print("请确保 project_utils.py 在同一目录下")+ print("Error: Cannot import the project_utils module")+ print("Please ensure project_utils.py is in the same directory")sys.exit(1)def generate_examples_index(examples_dir: str = 'examples') -> str:"""- 生成 examples 目录的 README.md 索引+ Generate a README.md index for the examples directoryArgs:- examples_dir: examples 目录路径+ examples_dir: Path to the examples directoryReturns:- 生成的 README.md 内容+ Generated README.md content"""examples_path = Path(examples_dir)if not examples_path.exists():- print(f"[ERROR] 目录不存在: {examples_dir}")+ print(f"[ERROR] Directory not found: {examples_dir}")return ""- print(f"[SCAN] 扫描目录: {examples_dir}")+ print(f"[SCAN] Scanning directory: {examples_dir}")- # 查找所有项目+ # Find all projectsprojects = find_all_projects(examples_dir)if not projects:- print("[WARN] 未找到任何项目")+ print("[WARN] No projects found")return ""- print(f"找到 {len(projects)} 个项目")+ print(f"Found {len(projects)} project(s)")- # 收集项目信息+ # Collect project informationprojects_info = []for project_path in projects:info = get_project_info(str(project_path))projects_info.append(info)- # 按日期排序(最新的在前)+ # Sort by date (newest first)projects_info.sort(key=lambda x: x['date'], reverse=True)- # 按格式分组+ # Group by formatby_format = defaultdict(list)for info in projects_info:by_format[info['format']].append(info)- # 生成 README 内容+ # Generate README contentcontent = []- content.append("# PPT Master 示例项目索引\n")- content.append("> 本文件由 `skills/ppt-master/scripts/generate_examples_index.py` 自动生成\n")- content.append(f"> 最后更新: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")+ content.append("# PPT Master Example Projects Index\n")+ content.append("> This file is auto-generated by `skills/ppt-master/scripts/generate_examples_index.py`\n")+ content.append(f"> Last updated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")- # 概览统计- content.append("## [Stats] 概览\n")- content.append(f"- **项目总数**: {len(projects_info)} 个")- content.append(f"- **画布格式**: {len(by_format)} 种")+ # Overview statistics+ content.append("## [Stats] Overview\n")+ content.append(f"- **Total projects**: {len(projects_info)}")+ content.append(f"- **Canvas formats**: {len(by_format)} type(s)")total_svgs = sum(info['svg_count'] for info in projects_info)- content.append(f"- **SVG 文件**: {total_svgs} 个")+ content.append(f"- **SVG files**: {total_svgs}")- # 按格式统计- content.append("\n### 格式分布\n")+ # Statistics by format+ content.append("\n### Format Distribution\n")for fmt_key in sorted(by_format.keys(), key=lambda x: len(by_format[x]), reverse=True):count = len(by_format[fmt_key])fmt_name = CANVAS_FORMATS.get(fmt_key, {}).get('name', fmt_key)- content.append(f"- **{fmt_name}**: {count} 个项目")+ content.append(f"- **{fmt_name}**: {count} project(s)")- # 最近更新- content.append("\n## [New] 最近更新\n")+ # Recently updated+ content.append("\n## [New] Recently Updated\n")for info in projects_info[:5]:content.append(f"- **{info['name']}** ({info['format_name']}) - {info['date_formatted']}")- # 按格式分类列表- content.append("\n## [List] 项目列表\n")+ # Project list by format+ content.append("\n## [List] Project List\n")- # 定义格式显示顺序+ # Define format display orderformat_order = ['ppt169', 'ppt43', 'wechat','xiaohongshu', 'moments', 'story', 'banner', 'a4']@@ -108,133 +108,133 @@ def generate_examples_index(examples_dir: str = 'examples') -> str:content.append(f"\n### {fmt_name} ({dimensions})\n")projects_list = by_format[fmt_key]- # 按日期排序+ # Sort by dateprojects_list.sort(key=lambda x: x['date'], reverse=True)for info in projects_list:- # 项目名称和链接+ # Project name and linkproject_link = f"./{info['dir_name']}"- # 构建项目条目+ # Build project entryline = f"- **[{info['name']}]({project_link})**"- # 添加日期+ # Add dateline += f" - {info['date_formatted']}"- # 添加 SVG 数量- line += f" - {info['svg_count']} 页"+ # Add SVG count+ line += f" - {info['svg_count']} page(s)"content.append(line)- # 其他未分类的格式+ # Other uncategorized formatsother_formats = set(by_format.keys()) - set(format_order)if other_formats:- content.append("\n### 其他格式\n")+ content.append("\n### Other Formats\n")for fmt_key in sorted(other_formats):projects_list = by_format[fmt_key]for info in projects_list:project_link = f"./{info['dir_name']}"line = f"- **[{info['name']}]({project_link})**"line += f" ({info['format_name']}) - {info['date_formatted']}"- line += f" - {info['svg_count']} 页"+ line += f" - {info['svg_count']} page(s)"content.append(line)- # 使用说明- content.append("\n## [Docs] 使用说明\n")- content.append("### 预览项目\n")- content.append("每个项目都包含以下文件:\n")- content.append("- `README.md` - 项目说明文档")- content.append("- `设计规范与内容大纲.md` - 完整设计规范")- content.append("- `svg_output/` - SVG 输出文件\n")+ # Usage instructions+ content.append("\n## [Docs] Usage Instructions\n")+ content.append("### Preview Projects\n")+ content.append("Each project contains the following files:\n")+ content.append("- `README.md` - Project documentation")+ content.append("- `Design Spec & Content Outline.md` - Full design specification")+ content.append("- `svg_output/` - SVG output files\n")- content.append("**方法 1: 使用 HTTP 服务器(推荐)**\n")+ content.append("**Method 1: Using an HTTP server (recommended)**\n")content.append("```bash")content.append("python3 -m http.server --directory examples/<project_name>/svg_output 8000")- content.append("# 访问 http://localhost:8000")+ content.append("# Visit http://localhost:8000")content.append("```\n")- content.append("**方法 2: 直接打开 SVG**\n")+ content.append("**Method 2: Open SVG directly**\n")content.append("```bash")content.append("open examples/<project_name>/svg_output/slide_01_cover.svg")content.append("```\n")- # 创建新项目- content.append("### 创建新项目\n")- content.append("参考现有项目结构,或使用项目管理工具:\n")+ # Create new project+ content.append("### Create a New Project\n")+ content.append("Refer to existing project structures, or use the project management tool:\n")content.append("```bash")content.append("python3 scripts/project_manager.py init my_project --format ppt169")content.append("```\n")- # 贡献指南- content.append("## [Contribute] 贡献示例项目\n")- content.append("欢迎分享你的项目到 examples 目录!\n")- content.append("### 项目要求\n")- content.append("1. 遵循标准项目结构")- content.append("2. 包含完整的 README.md 和设计规范")- content.append("3. SVG 文件符合技术规范")- content.append("4. 目录命名格式: `{项目名}_{格式}_{YYYYMMDD}`\n")-- content.append("### 提交流程\n")- content.append("1. 在 `examples/` 目录下创建项目")+ # Contribution guidelines+ content.append("## [Contribute] Contributing Example Projects\n")+ content.append("We welcome you to share your projects in the examples directory!\n")+ content.append("### Project Requirements\n")+ content.append("1. Follow the standard project structure")+ content.append("2. Include a complete README.md and design specification")+ content.append("3. SVG files must comply with technical specifications")+ content.append("4. Directory naming format: `{project_name}_{format}_{YYYYMMDD}`\n")++ content.append("### Submission Process\n")+ content.append("1. Create a project under the `examples/` directory")content.append(- "2. 验证项目: `python3 scripts/project_manager.py validate examples/<project>`")- content.append("3. 更新索引: `python3 scripts/generate_examples_index.py`")- content.append("4. 提交 Pull Request\n")-- # 相关资源- content.append("## [Resources] 相关资源\n")- content.append("- [快速开始](../README.md)")- content.append("- [工作流教程](../../AGENTS.md)")- content.append("- [设计规范](../references/design-guidelines.md)")- content.append("- [画布格式](../references/canvas-formats.md)")- content.append("- [角色定义](../references/)")- content.append("- [图表模板](../templates/charts/README.md)\n")-- # 页脚+ "2. Validate the project: `python3 scripts/project_manager.py validate examples/<project>`")+ content.append("3. Update the index: `python3 scripts/generate_examples_index.py`")+ content.append("4. Submit a Pull Request\n")++ # Related resources+ content.append("## [Resources] Related Resources\n")+ content.append("- [Quick Start](../README.md)")+ content.append("- [Workflow Tutorial](../../AGENTS.md)")+ content.append("- [Design Guidelines](../references/design-guidelines.md)")+ content.append("- [Canvas Formats](../references/canvas-formats.md)")+ content.append("- [Role Definitions](../references/)")+ content.append("- [Chart Templates](../templates/charts/README.md)\n")++ # Footercontent.append("---\n")content.append(- f"*自动生成于 {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} by PPT Master*")+ f"*Auto-generated on {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} by PPT Master*")return "\n".join(content)def main():- """主函数"""+ """Main function"""examples_dir = 'examples'if len(sys.argv) > 1:examples_dir = sys.argv[1]print("=" * 80)- print("PPT Master - Examples 索引生成工具")+ print("PPT Master - Examples Index Generator")print("=" * 80 + "\n")- # 生成索引内容+ # Generate index contentcontent = generate_examples_index(examples_dir)if not content:- print("\n[ERROR] 生成失败")+ print("\n[ERROR] Generation failed")sys.exit(1)- # 写入文件+ # Write to fileoutput_file = Path(examples_dir) / 'README.md'try:with open(output_file, 'w', encoding='utf-8') as f:f.write(content)- print(f"\n[OK] 索引文件已生成: {output_file}")- print(f" 包含 {len(content.splitlines())} 行内容")+ print(f"\n[OK] Index file generated: {output_file}")+ print(f" Contains {len(content.splitlines())} lines")- # 显示统计信息+ # Display statisticsprojects_count = content.count('- **[')- print(f" 索引了 {projects_count} 个项目")+ print(f" Indexed {projects_count} project(s)")except Exception as e:- print(f"\n[ERROR] 写入文件失败: {e}")+ print(f"\n[ERROR] Failed to write file: {e}")sys.exit(1)diff --git a/skills/ppt-master/scripts/nano_banana_gen.py b/skills/ppt-master/scripts/nano_banana_gen.pyindex 3afbeb84..a57fad13 100644--- a/skills/ppt-master/scripts/nano_banana_gen.py+++ b/skills/ppt-master/scripts/nano_banana_gen.py@@ -1,21 +1,21 @@#!/usr/bin/env python3"""Nano Banana Image Generator (Gemini Nano)-通过 Google GenAI API (Gemini) 生成高质量图片的工具。+A tool for generating high-quality images via the Google GenAI API (Gemini).-环境变量:- GEMINI_API_KEY (必需) Gemini API Key,从 https://aistudio.google.com/apikey 获取- GEMINI_BASE_URL (可选) 自定义 API 端点,用于代理服务+Environment variables:+ GEMINI_API_KEY (required) Gemini API Key, obtained from https://aistudio.google.com/apikey+ GEMINI_BASE_URL (optional) Custom API endpoint for proxy services- 配置示例:+ Configuration example:export GEMINI_API_KEY="your-api-key"- export GEMINI_BASE_URL="https://your-proxy-url.com/v1beta" # 仅代理时需要+ export GEMINI_BASE_URL="https://your-proxy-url.com/v1beta" # Only needed when using a proxy-连接方式:- - 无 GEMINI_BASE_URL → 直连 Google 官方 API- - 有 GEMINI_BASE_URL → 通过代理 API (使用相同的 Official 协议)+Connection modes:+ - Without GEMINI_BASE_URL -> Direct connection to the official Google API+ - With GEMINI_BASE_URL -> Via proxy API (using the same Official protocol)-依赖:+Dependencies:pip install google-genai Pillow"""@@ -26,7 +26,7 @@ import argparsefrom google import genaifrom google.genai import types-# 可选依赖: PIL (用于报告图片分辨率)+# Optional dependency: PIL (used to report image resolution)try:from PIL import Image as PILImageHAS_PIL = True@@ -38,23 +38,23 @@ except ImportError:# ║ Constants ║# ╚══════════════════════════════════════════════════════════════════╝-# Gemini 3.1 Flash Image 支持的全部宽高比 (含新增的 1:4, 4:1, 1:8, 8:1)+# All aspect ratios supported by Gemini 3.1 Flash Image (including new 1:4, 4:1, 1:8, 8:1)VALID_ASPECT_RATIOS = ["1:1", "1:4", "1:8","2:3", "3:2", "3:4", "4:1", "4:3","4:5", "5:4", "8:1", "9:16", "16:9", "21:9"]-# 官方文档: "512px", "1K", "2K", "4K" (必须大写 K)+# Official docs: "512px", "1K", "2K", "4K" (K must be uppercase)VALID_IMAGE_SIZES = ["512px", "1K", "2K", "4K"]-# 默认模型+# Default modelDEFAULT_MODEL = "gemini-3.1-flash-image-preview"-# 重试配置-MAX_RETRIES = 3 # 最大重试次数-RETRY_BASE_DELAY = 10 # 首次重试等待 (秒)-RETRY_BACKOFF = 2 # 指数退避倍数+# Retry configuration+MAX_RETRIES = 3 # Maximum number of retries+RETRY_BASE_DELAY = 10 # Initial retry wait (seconds)+RETRY_BACKOFF = 2 # Exponential backoff multiplier# ╔══════════════════════════════════════════════════════════════════╗@@ -62,7 +62,7 @@ RETRY_BACKOFF = 2 # 指数退避倍数# ╚══════════════════════════════════════════════════════════════════╝def save_binary_file(file_name: str, data: bytes):- """保存二进制数据到文件"""+ """Save binary data to a file"""with open(file_name, "wb") as f:f.write(data)print(f"File saved to: {file_name}")@@ -70,7 +70,7 @@ def save_binary_file(file_name: str, data: bytes):def _resolve_output_path(prompt: str, output_dir: str = None,filename: str = None, ext: str = ".png") -> str:- """根据参数计算最终的输出文件路径"""+ """Compute the final output file path based on parameters"""if filename:file_name = os.path.splitext(filename)[0]else:@@ -87,8 +87,8 @@ def _resolve_output_path(prompt: str, output_dir: str = None,def _normalize_image_size(image_size: str) -> str:"""- 大小写容错: 将用户输入规范化为 API 接受的格式。- 例: "2k" → "2K", "4k" → "4K", "512PX" → "512px"+ Case-insensitive normalization: normalize user input to API-accepted format.+ e.g.: "2k" -> "2K", "4k" -> "4K", "512PX" -> "512px""""s = image_size.strip()upper = s.upper()@@ -100,7 +100,7 @@ def _normalize_image_size(image_size: str) -> str:def _report_resolution(path: str):- """尝试用 PIL 报告图片分辨率"""+ """Try to report image resolution using PIL"""if HAS_PIL:try:img = PILImage.open(path)@@ -110,13 +110,13 @@ def _report_resolution(path: str):def _is_rate_limit_error(e: Exception) -> bool:- """判断异常是否为速率限制 (429) 错误"""+ """Check whether the exception is a rate limit (429) error"""err_str = str(e).lower()return "429" in err_str or "rate" in err_str or "quota" in err_str or "resource_exhausted" in err_str# ╔══════════════════════════════════════════════════════════════════╗-# ║ Image Generation — 统一生成逻辑 (Official / Proxy) ║+# ║ Image Generation — Unified generation logic (Official / Proxy) ║# ╚══════════════════════════════════════════════════════════════════╝def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,@@ -124,24 +124,24 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,output_dir: str = None, filename: str = None,model: str = DEFAULT_MODEL, base_url: str = None) -> str:"""- 统一图像生成函数 (流式)。+ Unified image generation function (streaming).- 根据 base_url 是否存在自动选择连接方式:- - 无 base_url → 直连 Google 官方 API- - 有 base_url → 通过代理 API (使用相同的 Official 协议)+ Automatically selects connection mode based on whether base_url is provided:+ - Without base_url -> Direct connection to the official Google API+ - With base_url -> Via proxy API (using the same Official protocol)- 使用 generate_content_stream 实现流式接收,提供实时进度反馈:- - 显示已等待时长- - 收到 chunk 时显示编号和数据大小- - 保留最后一个 image chunk(最高质量)+ Uses generate_content_stream for streaming reception with real-time progress feedback:+ - Displays elapsed time+ - Shows chunk number and data size when a chunk is received+ - Keeps the last image chunk (highest quality)Returns:- 保存的图片文件路径+ Path of the saved image fileRaises:- RuntimeError: 生成失败时+ RuntimeError: When generation fails"""- # 根据是否有 base_url 创建 client+ # Create client based on whether base_url is providedif base_url:client = genai.Client(api_key=api_key, http_options={'base_url': base_url})else:@@ -159,7 +159,7 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,image_size=image_size,),}- # ThinkingConfig 仅 flash 系列模型支持+ # ThinkingConfig is only supported by flash series modelsif "flash" in model.lower():config_kwargs["thinking_config"] = types.ThinkingConfig(thinking_level="MINIMAL",@@ -249,30 +249,30 @@ def generate(prompt: str, negative_prompt: str = None,model: str = DEFAULT_MODEL,max_retries: int = MAX_RETRIES) -> str:"""- 图像生成入口函数(带自动重试)。+ Image generation entry point (with automatic retry).- 根据环境变量 GEMINI_BASE_URL 是否存在,自动选择连接方式:- - 无 GEMINI_BASE_URL → 直连 Google 官方 API- - 有 GEMINI_BASE_URL → 通过代理 API (使用相同的 Official 协议)+ Automatically selects connection mode based on the GEMINI_BASE_URL environment variable:+ - Without GEMINI_BASE_URL -> Direct connection to the official Google API+ - With GEMINI_BASE_URL -> Via proxy API (using the same Official protocol)- 遇到 429 Rate Limit 错误时自动指数退避重试。+ Automatically retries with exponential backoff on 429 Rate Limit errors.Args:- prompt: 正向提示词- negative_prompt: 负面提示词- aspect_ratio: 宽高比- image_size: 图片尺寸 ("512px", "1K", "2K", "4K", 大小写不敏感)- output_dir: 输出目录- filename: 输出文件名 (不含扩展名)- model: 模型名称 (默认 gemini-3.1-flash-image-preview)- max_retries: 最大重试次数+ prompt: Positive prompt text+ negative_prompt: Negative prompt text+ aspect_ratio: Aspect ratio+ image_size: Image size ("512px", "1K", "2K", "4K", case-insensitive)+ output_dir: Output directory+ filename: Output filename (without extension)+ model: Model name (default gemini-3.1-flash-image-preview)+ max_retries: Maximum number of retriesReturns:- 保存的图片文件路径+ Path of the saved image fileRaises:- ValueError: 参数不合法时- RuntimeError: 生成失败且重试耗尽时+ ValueError: When parameters are invalid+ RuntimeError: When generation fails after all retries are exhausted"""api_key = os.environ.get("GEMINI_API_KEY")base_url = os.environ.get("GEMINI_BASE_URL")@@ -280,7 +280,7 @@ def generate(prompt: str, negative_prompt: str = None,if not api_key:raise ValueError("GEMINI_API_KEY environment variable is not set.")- # 大小写容错+ # Case-insensitive normalizationimage_size = _normalize_image_size(image_size)# Validate inputsdiff --git a/skills/ppt-master/scripts/pdf_to_md.py b/skills/ppt-master/scripts/pdf_to_md.pyindex e5b2f671..61898e28 100644--- a/skills/ppt-master/scripts/pdf_to_md.py+++ b/skills/ppt-master/scripts/pdf_to_md.py@@ -1,8 +1,8 @@#!/usr/bin/env python3"""-PDF 转 Markdown 工具-使用 PyMuPDF 提取 PDF 文本内容并转换为 Markdown 格式-支持标题层级、粗体、斜体、列表识别+PDF to Markdown Converter+Uses PyMuPDF to extract PDF text content and convert to Markdown format.+Supports heading levels, bold, italic, and list detection."""import fitz # PyMuPDF@@ -14,9 +14,9 @@ from collections import Counterdef analyze_font_sizes(doc) -> dict:- """分析文档中的字体大小分布,用于推断标题层级"""+ """Analyze font size distribution in the document to infer heading levels."""size_counter = Counter()-+for page in doc:blocks = page.get_text("dict")["blocks"]for block in blocks:@@ -27,16 +27,16 @@ def analyze_font_sizes(doc) -> dict:text = span["text"].strip()if text:size_counter[size] += len(text)-+if not size_counter:return {"body": 12, "h1": 24, "h2": 18, "h3": 14}-+sorted_sizes = sorted(size_counter.items(), key=lambda x: x[1], reverse=True)body_size = sorted_sizes[0][0]-+all_sizes = sorted(size_counter.keys(), reverse=True)larger_sizes = [s for s in all_sizes if s > body_size + 1]-+size_map = {"body": body_size}if len(larger_sizes) >= 1:size_map["h1"] = larger_sizes[0]@@ -44,26 +44,26 @@ def analyze_font_sizes(doc) -> dict:size_map["h2"] = larger_sizes[1]if len(larger_sizes) >= 3:size_map["h3"] = larger_sizes[2]-+return size_map-def get_heading_level(size: float, size_map: dict, text: str = "",+def get_heading_level(size: float, size_map: dict, text: str = "",flags: int = 0, strict: bool = True) -> int:"""- 综合判断标题级别-+ Determine heading level using multiple heuristics.+Args:- size: 字体大小- size_map: 字体大小映射- text: 文本内容(用于辅助判断)- flags: 字体标志(bit 4 = 粗体)- strict: 严格模式,需要满足更多条件-+ size: Font size+ size_map: Font size mapping+ text: Text content (used for additional heuristics)+ flags: Font flags (bit 4 = bold)+ strict: Strict mode, requires more conditions to be met+Returns:- 标题级别(0 表示正文,1-3 表示 H1-H3)+ Heading level (0 = body text, 1-3 = H1-H3)"""- # 基于字体大小的初步判断+ # Initial determination based on font sizelevel = 0if "h1" in size_map and size >= size_map["h1"] - 0.5:level = 1@@ -71,41 +71,41 @@ def get_heading_level(size: float, size_map: dict, text: str = "",level = 2elif "h3" in size_map and size >= size_map["h3"] - 0.5:level = 3-+if level == 0:return 0-- # 非严格模式直接返回(向后兼容)++ # Non-strict mode returns directly (backward compatible)if not strict or not text:return level-- # 严格模式:额外验证条件++ # Strict mode: additional validation conditionstext = text.strip()-- # 排除条件:太长的文本不太可能是标题++ # Exclusion: text too long is unlikely to be a headingif len(text) > 80:return 0-- # 排除条件:以句号等结尾的完整句子++ # Exclusion: complete sentences ending with punctuationsentence_endings = '.。!!??'if text and text[-1] in sentence_endings:- # 但保留编号标题如 "1. 概述" 或 "第一章."+ # But keep numbered headings like "1. Overview" or "Chapter 1."if not re.match(r'^[\d第]+[.、章节]', text):return 0-- # 加分条件:粗体文本更可能是标题++ # Bonus: bold text is more likely to be a headingis_bold = flags & 16if not is_bold and level >= 2:- # 非粗体的小标题需要更严格的字体大小差异+ # Non-bold subheadings require a larger font size differencebody_size = size_map.get("body", 12)if size < body_size + 2:return 0-+return leveldef is_monospace_font(font_name: str) -> bool:"""- 判断是否为等宽字体(通常用于代码)+ Determine if the font is monospace (typically used for code)."""if not font_name:return False@@ -120,14 +120,14 @@ def is_monospace_font(font_name: str) -> bool:def format_span_text(text: str, flags: int) -> str:- """根据字体标志格式化文本(粗体、斜体)"""+ """Format text based on font flags (bold, italic)."""text = text.strip()if not text:return ""-+is_bold = flags & 16is_italic = flags & 2-+if is_bold and is_italic:return f"***{text}***"elif is_bold:@@ -138,9 +138,9 @@ def format_span_text(text: str, flags: int) -> str:def detect_list_item(text: str) -> tuple:- """检测是否为列表项,返回 (是否列表, 列表类型, 内容)"""+ """Detect if the text is a list item. Returns (is_list, list_type, content)."""text = text.strip()-+ul_patterns = [(r'^[•●○◦▪▸►]\s*', '-'),(r'^[-–—]\s+', '-'),@@ -150,157 +150,158 @@ def detect_list_item(text: str) -> tuple:match = re.match(pattern, text)if match:return (True, 'ul', marker + ' ' + text[match.end():])-+ol_pattern = r'^(\d+)[.、)]\s*'match = re.match(ol_pattern, text)if match:num = match.group(1)return (True, 'ol', f"{num}. " + text[match.end():])-+return (False, None, text)def remove_page_footer(text: str) -> str:"""- 移除页脚中的页码模式,如 'November 2025 8' 或 '2025年11月 8'+ Remove page number patterns from footers, e.g. 'November 2025 8' or '2025年11月 8'."""- # 英文月份 + 年份 + 页码+ # English month + year + page numbermonths_en = r'(?:January|February|March|April|May|June|July|August|September|October|November|December)'pattern_en = rf'\s*{months_en}\s+\d{{4}}\s+\d{{1,3}}\s*$'text = re.sub(pattern_en, '', text, flags=re.IGNORECASE)-- # 中文格式:2025年11月 8++ # Chinese format: 2025年11月 8pattern_cn = r'\s*\d{4}年\d{1,2}月\s+\d{1,3}\s*$'text = re.sub(pattern_cn, '', text)-+return text.rstrip()def detect_headers_footers(doc, threshold_ratio: float = 0.6) -> set:"""- 统计检测页眉和页脚-- 原理:页眉和页脚通常在每一页的固定位置(顶部或底部)出现相同的内容。- 我们收集所有页面的顶部和底部文本,如果某个文本出现的频率超过阈值,则视为噪声。+ Detect headers and footers statistically.++ Principle: Headers and footers typically appear at fixed positions (top or bottom)+ on each page with the same content. We collect top and bottom text from all pages,+ and if certain text appears more frequently than the threshold, it is treated as noise."""if len(doc) < 3:return set()headers = []footers = []-- # 采样前 20 页和后 20 页(避免处理太慢)++ # Sample first 20 and last 20 pages (avoid processing too slowly)pages_to_scan = list(range(len(doc)))if len(doc) > 40:pages_to_scan = pages_to_scan[:20] + pages_to_scan[-20:]-+for i in pages_to_scan:page = doc[i]rect = page.recth = rect.height-- # 定义顶部和底部区域 (各 15%)++ # Define top and bottom regions (15% each)top_rect = fitz.Rect(0, 0, rect.width, h * 0.15)bottom_rect = fitz.Rect(0, h * 0.85, rect.width, h)-- # 提取文本块++ # Extract text blocksblocks = page.get_text("blocks")for b in blocks:b_rect = fitz.Rect(b[:4])text = b[4].strip()if not text:continue-- # 使用简单的空间判定++ # Simple spatial determinationif b_rect.intersects(top_rect):headers.append(text)elif b_rect.intersects(bottom_rect):footers.append(text)- # 统计频率+ # Count frequenciesnoise_texts = set()total_scanned = len(pages_to_scan)-+for collection in [headers, footers]:counter = Counter(collection)for text, count in counter.items():# if text appears in > 60% of scanned pages, mark as noiseif count / total_scanned > threshold_ratio:noise_texts.add(text)-+return noise_textsdef merge_adjacent_headings(elements: list) -> list:"""- 合并相邻的同级短标题- 例如: '# Agent Tools &' + '# Interoperability' → '# Agent Tools & Interoperability'+ Merge adjacent same-level short headings.+ Example: '# Agent Tools &' + '# Interoperability' -> '# Agent Tools & Interoperability'"""if not elements:return elements-+merged = []i = 0-+while i < len(elements):el = elements[i]-- # 只处理标题元素++ # Only process heading elementsif el.get("type") != 0 or not el.get("is_heading"):merged.append(el)i += 1continue-+content = el["content"]- # 提取标题级别+ # Extract heading levelmatch = re.match(r'^(#{1,6})\s+(.+)$', content)if not match:merged.append(el)i += 1continue-+level = match.group(1)title_text = match.group(2)-- # 如果标题较短且下一个也是同级标题,尝试合并++ # If heading is short and the next one is also the same level, try to mergej = i + 1while j < len(elements) and len(title_text) < 60:next_el = elements[j]if next_el.get("type") != 0 or not next_el.get("is_heading"):break-+next_match = re.match(r'^(#{1,6})\s+(.+)$', next_el["content"])if not next_match or next_match.group(1) != level:break-+next_text = next_match.group(2)- # 只合并短标题片段+ # Only merge short heading fragmentsif len(next_text) > 40:break-- # 合并++ # Mergetitle_text += " " + next_textj += 1-- # 创建合并后的元素++ # Create merged elementmerged_el = el.copy()merged_el["content"] = f"{level} {title_text}"merged.append(merged_el)i = j-+return mergeddef clean_text(text: str) -> str:- """清理提取的文本"""+ """Clean extracted text."""lines = text.split('\n')cleaned_lines = []prev_empty = False-+for line in lines:line = line.rstrip()is_empty = len(line.strip()) == 0-+if is_empty:if not prev_empty:cleaned_lines.append('')@@ -308,12 +309,12 @@ def clean_text(text: str) -> str:else:cleaned_lines.append(line)prev_empty = False-+return '\n'.join(cleaned_lines)def merge_adjacent_formatting(text: str) -> str:- """合并相邻的格式标记,如 **text1****text2** → **text1 text2**"""+ """Merge adjacent formatting markers, e.g. **text1****text2** -> **text1 text2**"""text = re.sub(r'\*\*\s*\*\*', ' ', text)text = re.sub(r'\*\s*\*', ' ', text)text = re.sub(r'\*\*\*\s*\*\*\*', ' ', text)@@ -321,7 +322,7 @@ def merge_adjacent_formatting(text: str) -> str:def is_sentence_end(text: str) -> bool:- """判断文本是否以句末标点结尾"""+ """Check if the text ends with sentence-ending punctuation."""text = text.rstrip()if not text:return True@@ -330,7 +331,7 @@ def is_sentence_end(text: str) -> bool:def should_merge_lines(current: dict, next_line: dict) -> bool:- """判断两行是否应该合并为同一段落"""+ """Determine if two lines should be merged into the same paragraph."""if current.get("is_heading") or next_line.get("is_heading"):return Falseif current.get("is_list") or next_line.get("is_list"):@@ -342,31 +343,31 @@ def should_merge_lines(current: dict, next_line: dict) -> bool:def extract_pdf_to_markdown(pdf_path: str, output_path: str = None) -> str:"""- 从 PDF 提取文本、图片和表格并转换为 Markdown+ Extract text, images, and tables from a PDF and convert to Markdown."""try:doc = fitz.open(pdf_path)except Exception as e:- print(f"❌ 无法打开 PDF 文件: {e}")+ print(f"[ERROR] Failed to open PDF file: {e}")return ""-+filename = Path(pdf_path).stemtitle = re.sub(r'^\d+-', '', filename).strip()-- print(f"📄 分析文档结构...")++ print(f"[INFO] Analyzing document structure...")size_map = analyze_font_sizes(doc)- print(f" 字体大小映射: 正文={size_map.get('body', 'N/A')}, " ++ print(f" Font size mapping: body={size_map.get('body', 'N/A')}, " +f"H1={size_map.get('h1', 'N/A')}, H2={size_map.get('h2', 'N/A')}, H3={size_map.get('h3', 'N/A')}")-- print(f"🧹 检测重复页眉/页脚...")++ print(f"[INFO] Detecting repeated headers/footers...")noise_texts = detect_headers_footers(doc)if noise_texts:- print(f" 发现 {len(noise_texts)} 个重复噪声文本 (将被移除):")+ print(f" Found {len(noise_texts)} repeated noise texts (will be removed):")for t in list(noise_texts)[:3]:print(f" - {t[:30]}...")-+markdown_content = f"# {title}\n\n"-+img_dir = Nonerel_img_dir = Noneif output_path:@@ -375,60 +376,60 @@ def extract_pdf_to_markdown(pdf_path: str, output_path: str = None) -> str:img_dir = output_path.parent / rel_img_dirif not img_dir.exists():img_dir.mkdir(parents=True, exist_ok=True)-+img_count = 0-+for page_num, page in enumerate(doc, 1):if page_num > 1:- # 添加分页符,方便 LLM 理解上下文切分+ # Add page break marker to help LLM understand context segmentationmarkdown_content += f"\n\n<!-- Page {page_num} -->\n\n"-+try:tabs = page.find_tables()except Exception:tabs = []-+tab_rects = [fitz.Rect(t.bbox) for t in tabs]-+page_elements = []-+for tab in tabs:page_elements.append({"y0": tab.bbox[1],"type": 2,"content": tab.to_markdown()})- print(f" ✓ 发现表格: P{page_num}")+ print(f" [OK] Found table: P{page_num}")blocks = page.get_text("dict")["blocks"]-+for block in blocks:block_rect = fitz.Rect(block["bbox"])-- # 检查是否为表格内容++ # Check if this is table contentis_in_table = Falsefor tab_rect in tab_rects:intersect = block_rect & tab_rectif intersect.get_area() > 0.6 * block_rect.get_area():is_in_table = Truebreak-+if is_in_table:continue-+if block["type"] == 0:- # 检查是否为需要过滤的噪声文本 (Whole block match)+ # Check if this is noise text to be filtered (whole block match)block_text_full = "".join([span["text"] for line in block["lines"] for span in line["spans"]]).strip()if block_text_full in noise_texts:continue-+for line in block["lines"]:line_text = ""line_size = 0line_flags = 0span_count = 0is_code_line = False-+formatted_spans = []for span in line["spans"]:span_text = span["text"]@@ -436,40 +437,40 @@ def extract_pdf_to_markdown(pdf_path: str, output_path: str = None) -> str:if span_text:formatted_spans.append(span_text)continue-+span_size = span["size"]span_flags = span["flags"]-+line_size = max(line_size, span_size)line_flags |= span_flagsspan_count += 1-+heading_level = get_heading_level(span_size, size_map, span_text, span_flags)-- # 检测代码字体++ # Detect code fontfont_name = span.get("font", "")if is_monospace_font(font_name):is_code_line = True- formatted_spans.append(span_text) # 代码不加格式+ formatted_spans.append(span_text) # No formatting for codeelif heading_level > 0:formatted_spans.append(span_text.strip())else:formatted_spans.append(format_span_text(span_text, span_flags))-+line_text = ''.join(formatted_spans).strip()if not line_text:continue-- # 二次检查:行级别是否匹配噪声 (有时 block 被切分了)++ # Secondary check: line-level noise match (sometimes blocks are split)if line_text in noise_texts:continueline_text = merge_adjacent_formatting(line_text)-+heading_level = get_heading_level(line_size, size_map, line_text, line_flags)-+is_list, list_type, list_content = detect_list_item(line_text)-+if heading_level > 0:prefix = '#' * heading_level + ' 'clean_line = re.sub(r'\*+([^*]+)\*+', r'\1', line_text)@@ -478,7 +479,7 @@ def extract_pdf_to_markdown(pdf_path: str, output_path: str = None) -> str:final_text = list_contentelse:final_text = line_text-+page_elements.append({"y0": line["bbox"][1],"type": 0,@@ -487,19 +488,19 @@ def extract_pdf_to_markdown(pdf_path: str, output_path: str = None) -> str:"is_list": is_list,"is_code": is_code_line})-+elif block["type"] == 1:page_elements.append({"y0": block["bbox"][1],"type": 1,"content": block})-+page_elements.sort(key=lambda x: x["y0"])-- # 合并相邻的同级短标题++ # Merge adjacent same-level short headingspage_elements = merge_adjacent_headings(page_elements)-+merged_elements = []i = 0while i < len(page_elements):@@ -525,39 +526,39 @@ def extract_pdf_to_markdown(pdf_path: str, output_path: str = None) -> str:else:merged_elements.append(el)i += 1-+prev_was_list = Falseprev_was_code = Falsecode_block_lines = []-+def flush_code_block():- """输出累积的代码块"""+ """Flush accumulated code block."""nonlocal code_block_lines, markdown_contentif code_block_lines:markdown_content += "```\n"markdown_content += "\n".join(code_block_lines) + "\n"markdown_content += "```\n\n"code_block_lines = []-+for el in merged_elements:if el["type"] == 0:is_list = el.get("is_list", False)is_heading = el.get("is_heading", False)is_code = el.get("is_code", False)-+if is_code:- # 累积代码行+ # Accumulate code linesif prev_was_list:markdown_content += "\n"prev_was_list = Falsecode_block_lines.append(el["content"])prev_was_code = Trueelse:- # 非代码行,先输出累积的代码块+ # Non-code line, flush accumulated code block firstif prev_was_code:flush_code_block()prev_was_code = False-+if is_heading:if prev_was_list:markdown_content += "\n"@@ -571,7 +572,7 @@ def extract_pdf_to_markdown(pdf_path: str, output_path: str = None) -> str:markdown_content += "\n"markdown_content += el["content"] + "\n\n"prev_was_list = False-+elif el["type"] == 2:if prev_was_code:flush_code_block()@@ -580,7 +581,7 @@ def extract_pdf_to_markdown(pdf_path: str, output_path: str = None) -> str:markdown_content += "\n"markdown_content += el["content"] + "\n\n"prev_was_list = False-+elif el["type"] == 1:if prev_was_code:flush_code_block()@@ -592,94 +593,94 @@ def extract_pdf_to_markdown(pdf_path: str, output_path: str = None) -> str:safe_filename = filename.replace(" ", "_")image_name = f"{safe_filename}_p{page_num}_{img_count}.{ext}"image_path = img_dir / image_name-+try:with open(image_path, "wb") as f:f.write(image_data)-+if prev_was_list:markdown_content += "\n"markdown_content += f"\n\n"img_count += 1prev_was_list = False- print(f" ✓ 提取图片: {image_name}")+ print(f" [OK] Extracted image: {image_name}")except Exception as e:- print(f" ⚠️ 图片保存失败: {e}")-- # 页面末尾刷新代码块+ print(f" [WARN] Failed to save image: {e}")++ # Flush code block at end of pageif prev_was_code:flush_code_block()-+doc.close()-+markdown_content = re.sub(r'\n{3,}', '\n\n', markdown_content)markdown_content = markdown_content.strip() + "\n"-+if output_path:os.makedirs(os.path.dirname(output_path) or '.', exist_ok=True)with open(output_path, 'w', encoding='utf-8') as f:f.write(markdown_content)- print(f"✓ 保存 Markdown 到: {output_path}")-+ print(f"[OK] Saved Markdown to: {output_path}")+return markdown_contentdef process_directory(input_dir: str, output_dir: str = None):- """处理目录下的所有 PDF 文件"""+ """Process all PDF files in the directory."""input_path = Path(input_dir)-+if output_dir:output_path = Path(output_dir)else:output_path = input_path-+pdf_files = sorted(input_path.glob('*.pdf'))-- print(f"找到 {len(pdf_files)} 个 PDF 文件")-++ print(f"Found {len(pdf_files)} PDF files")+for pdf_file in pdf_files:output_file = output_path / (pdf_file.stem + '.md')- print(f"处理: {pdf_file.name}")+ print(f"Processing: {pdf_file.name}")extract_pdf_to_markdown(str(pdf_file), str(output_file))def main():parser = argparse.ArgumentParser(- description='PDF 转 Markdown 工具(支持结构识别与 LLM 优化)',+ description='PDF to Markdown converter (with structure detection and LLM optimization)',formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''-示例:- python pdf_to_md.py book.pdf # 转换单个文件- python pdf_to_md.py book.pdf -o output.md # 指定输出文件- python pdf_to_md.py ./pdfs # 转换目录下所有 PDF- python pdf_to_md.py ./pdfs -o ./markdown # 指定输出目录--结构识别功能:- - 自动识别标题层级(基于字体大小)- - 识别粗体和斜体文本- - 识别有序和无序列表- - 提取表格并转为 Markdown 格式 (自动去重)- - [新] 智能检测并移除页面重复的页眉/页脚- - [新] 添加 <!-- Page N --> 分页符,辅助 LLM 理解+Examples:+ python pdf_to_md.py book.pdf # Convert a single file+ python pdf_to_md.py book.pdf -o output.md # Specify output file+ python pdf_to_md.py ./pdfs # Convert all PDFs in directory+ python pdf_to_md.py ./pdfs -o ./markdown # Specify output directory++Structure detection features:+ - Auto-detect heading levels (based on font size)+ - Detect bold and italic text+ - Detect ordered and unordered lists+ - Extract tables and convert to Markdown format (with deduplication)+ - [New] Smart detection and removal of repeated page headers/footers+ - [New] Add <!-- Page N --> page break markers to help LLM understanding''')-- parser.add_argument('input', help='PDF 文件或包含 PDF 的目录')- parser.add_argument('-o', '--output', help='输出文件或目录')-++ parser.add_argument('input', help='PDF file or directory containing PDFs')+ parser.add_argument('-o', '--output', help='Output file or directory')+args = parser.parse_args()-+input_path = Path(args.input)-+if input_path.is_file():output = args.output or str(input_path.with_suffix('.md'))extract_pdf_to_markdown(str(input_path), output)elif input_path.is_dir():process_directory(str(input_path), args.output)else:- print(f"错误: 找不到文件或目录: {args.input}")+ print(f"Error: File or directory not found: {args.input}")return 1-+return 0diff --git a/skills/ppt-master/scripts/pptx_animations.py b/skills/ppt-master/scripts/pptx_animations.pyindex a4a651cf..6377d501 100644--- a/skills/ppt-master/scripts/pptx_animations.py+++ b/skills/ppt-master/scripts/pptx_animations.py@@ -1,72 +1,72 @@#!/usr/bin/env python3"""-PPT Master - PPTX 动画模块+PPT Master - PPTX Animation Module-提供幻灯片切换效果和入场动画的 XML 生成功能。+Provides XML generation for slide transition effects and entrance animations.-支持的切换效果:- - fade: 淡入淡出- - push: 推入- - wipe: 擦除- - split: 分割- - reveal: 揭示- - random: 随机+Supported transition effects:+ - fade: Fade in/out+ - push: Push+ - wipe: Wipe+ - split: Split+ - reveal: Reveal+ - random: Random-支持的入场动画:- - fade: 淡入- - fly: 飞入- - zoom: 缩放- - appear: 出现+Supported entrance animations:+ - fade: Fade in+ - fly: Fly in+ - zoom: Zoom+ - appear: Appear-依赖: 无(纯 XML 生成)+Dependencies: None (pure XML generation)"""from typing import Optional, Dict, Any# ============================================================================-# 切换效果定义+# Transition effect definitions# ============================================================================TRANSITIONS: Dict[str, Dict[str, Any]] = {'fade': {- 'name': '淡入淡出',+ 'name': 'Fade','element': 'fade','attrs': {},},'push': {- 'name': '推入',+ 'name': 'Push','element': 'push',- 'attrs': {'dir': 'r'}, # 从右侧推入+ 'attrs': {'dir': 'r'}, # Push from right},'wipe': {- 'name': '擦除',+ 'name': 'Wipe','element': 'wipe',- 'attrs': {'dir': 'r'}, # 从右侧擦除+ 'attrs': {'dir': 'r'}, # Wipe from right},'split': {- 'name': '分割',+ 'name': 'Split','element': 'split','attrs': {'orient': 'horz', 'dir': 'out'},},'reveal': {- 'name': '揭示',+ 'name': 'Reveal','element': 'strips',- 'attrs': {'dir': 'rd'}, # 右下角揭示+ 'attrs': {'dir': 'rd'}, # Reveal from bottom-right},'cover': {- 'name': '覆盖',+ 'name': 'Cover','element': 'cover','attrs': {'dir': 'r'},},'random': {- 'name': '随机',+ 'name': 'Random','element': 'random','attrs': {},},}-# 速度映射 (秒 -> OOXML 速度值)+# Speed mapping (seconds -> OOXML speed values)SPEED_MAP = {'slow': 1.0,'med': 0.5,@@ -75,7 +75,7 @@ SPEED_MAP = {def duration_to_speed(duration: float) -> str:- """将持续时间(秒)转换为 OOXML 速度值"""+ """Convert duration (seconds) to an OOXML speed value"""if duration >= 0.75:return 'slow'elif duration >= 0.35:@@ -90,65 +90,65 @@ def create_transition_xml(advance_after: Optional[float] = None) -> str:"""- 生成幻灯片切换效果 XML 片段-+ Generate a slide transition effect XML fragment+Args:- effect: 切换效果名称 (fade/push/wipe/split/reveal/cover/random)- duration: 切换持续时间(秒)- advance_after: 自动翻页间隔(秒),None 表示手动翻页-+ effect: Transition effect name (fade/push/wipe/split/reveal/cover/random)+ duration: Transition duration (seconds)+ advance_after: Auto-advance interval (seconds); None means manual advance+Returns:- 可插入 slide XML 的 <p:transition> 元素字符串+ A <p:transition> element string insertable into slide XML"""if effect not in TRANSITIONS:effect = 'fade'-+trans_info = TRANSITIONS[effect]element_name = trans_info['element']attrs = trans_info['attrs']-- # 构建速度属性++ # Build speed attributespeed = duration_to_speed(duration)-- # 构建自动翻页属性++ # Build auto-advance attributeadv_attr = ''if advance_after is not None:- adv_tm = int(advance_after * 1000) # 转换为毫秒+ adv_tm = int(advance_after * 1000) # Convert to millisecondsadv_attr = f' advTm="{adv_tm}"'-- # 构建效果元素属性++ # Build effect element attributeseffect_attrs = ' '.join(f'{k}="{v}"' for k, v in attrs.items())if effect_attrs:effect_attrs = ' ' + effect_attrs-- # 生成 XML++ # Generate XMLreturn f''' <p:transition spd="{speed}"{adv_attr}><p:{element_name}{effect_attrs}/></p:transition>'''# ============================================================================-# 入场动画定义+# Entrance animation definitions# ============================================================================ANIMATIONS: Dict[str, Dict[str, Any]] = {'fade': {- 'name': '淡入',+ 'name': 'Fade In','filter': 'fade',},'fly': {- 'name': '飞入',+ 'name': 'Fly In','filter': 'fly',- 'prLst': 'from(b)', # 从底部飞入+ 'prLst': 'from(b)', # Fly in from bottom},'zoom': {- 'name': '缩放',+ 'name': 'Zoom','filter': 'zoom','prLst': 'in',},'appear': {- 'name': '出现',- 'filter': None, # 无滤镜,仅设置可见性+ 'name': 'Appear',+ 'filter': None, # No filter, only sets visibility},}@@ -160,27 +160,27 @@ def create_timing_xml(shape_id: int = 2) -> str:"""- 生成入场动画 timing XML 片段-+ Generate an entrance animation timing XML fragment+Args:- animation: 动画效果名称 (fade/fly/zoom/appear)- duration: 动画持续时间(秒)- delay: 动画延迟(秒)- shape_id: 目标形状 ID(SVG 图片通常为 2)-+ animation: Animation effect name (fade/fly/zoom/appear)+ duration: Animation duration (seconds)+ delay: Animation delay (seconds)+ shape_id: Target shape ID (SVG image is typically 2)+Returns:- 可插入 slide XML 的 <p:timing> 元素字符串+ A <p:timing> element string insertable into slide XML"""if animation not in ANIMATIONS:animation = 'fade'-+anim_info = ANIMATIONS[animation]dur_ms = int(duration * 1000)delay_ms = int(delay * 1000)-- # 根据动画类型生成不同的效果 XML++ # Generate different effect XML depending on animation typeif anim_info['filter'] is None:- # appear 动画:仅设置可见性+ # appear animation: only sets visibilityeffect_xml = f''' <p:set><p:cBhvr><p:cTn id="5" dur="1" fill="hold">@@ -192,12 +192,12 @@ def create_timing_xml(<p:to><p:strVal val="visible"/></p:to></p:set>'''else:- # 其他动画:设置可见性 + 动画效果+ # Other animations: set visibility + animation effectfilter_name = anim_info['filter']pr_attr = ''if 'prLst' in anim_info:pr_attr = f' prLst="{anim_info["prLst"]}"'-+effect_xml = f''' <p:set><p:cBhvr><p:cTn id="5" dur="1" fill="hold">@@ -214,7 +214,7 @@ def create_timing_xml(<p:tgtEl><p:spTgt spid="{shape_id}"/></p:tgtEl></p:cBhvr></p:animEffect>'''-+return f''' <p:timing><p:tnLst><p:par>@@ -250,35 +250,35 @@ def create_timing_xml(def get_available_transitions() -> list:- """获取所有可用的切换效果列表"""+ """Get a list of all available transition effects"""return list(TRANSITIONS.keys())def get_available_animations() -> list:- """获取所有可用的入场动画列表"""+ """Get a list of all available entrance animations"""return list(ANIMATIONS.keys())def get_transition_help() -> str:- """获取切换效果帮助文本"""- lines = ["可用的切换效果:"]+ """Get help text for transition effects"""+ lines = ["Available transition effects:"]for key, info in TRANSITIONS.items():lines.append(f" {key}: {info['name']}")return '\n'.join(lines)def get_animation_help() -> str:- """获取入场动画帮助文本"""- lines = ["可用的入场动画:"]+ """Get help text for entrance animations"""+ lines = ["Available entrance animations:"]for key, info in ANIMATIONS.items():lines.append(f" {key}: {info['name']}")return '\n'.join(lines)if __name__ == '__main__':- # 测试输出- print("=== 切换效果 XML 示例 (fade) ===")+ # Test output+ print("=== Transition Effect XML Example (fade) ===")print(create_transition_xml('fade', 0.5))print()- print("=== 入场动画 XML 示例 (fade) ===")+ print("=== Entrance Animation XML Example (fade) ===")print(create_timing_xml('fade', 1.0))diff --git a/skills/ppt-master/scripts/project_utils.py b/skills/ppt-master/scripts/project_utils.pyindex fe8239d7..d406d24f 100644--- a/skills/ppt-master/scripts/project_utils.py+++ b/skills/ppt-master/scripts/project_utils.py@@ -1,8 +1,9 @@#!/usr/bin/env python3"""-PPT Master - 项目工具公共模块+PPT Master - Project Utilities Module-提供项目信息解析、验证等公共功能,供其他工具复用。+Provides common functions for project information parsing and validation,+reusable by other tools."""import re@@ -10,11 +11,11 @@ from pathlib import Pathfrom datetime import datetimefrom typing import Dict, List, Optional, Tuple-# 画布格式定义(统一来源)+# Canvas format definitions (unified source)try:from config import CANVAS_FORMATSexcept ImportError:- # 兜底:保持最小可用配置,避免运行时崩溃+ # Fallback: maintain minimal usable configuration to avoid runtime crashesCANVAS_FORMATS = {'ppt169': {'name': 'PPT 16:9',@@ -29,7 +30,7 @@ except ImportError:'aspect_ratio': '4:3'},'wechat': {- 'name': '微信公众号头图',+ 'name': 'WeChat Article Header','dimensions': '900×383','viewbox': '0 0 900 383','aspect_ratio': '2.35:1'@@ -41,25 +42,25 @@ except ImportError:'aspect_ratio': '3:4'},'moments': {- 'name': '朋友圈/Instagram',+ 'name': 'Moments/Instagram','dimensions': '1080×1080','viewbox': '0 0 1080 1080','aspect_ratio': '1:1'},'story': {- 'name': 'Story/竖版',+ 'name': 'Story/Vertical','dimensions': '1080×1920','viewbox': '0 0 1080 1920','aspect_ratio': '9:16'},'banner': {- 'name': '横版 Banner',+ 'name': 'Horizontal Banner','dimensions': '1920×1080','viewbox': '0 0 1920 1080','aspect_ratio': '16:9'},'a4': {- 'name': 'A4 打印',+ 'name': 'A4 Print','dimensions': '1240×1754','viewbox': '0 0 1240 1754','aspect_ratio': '√2:1'@@ -76,7 +77,7 @@ CANVAS_FORMAT_ALIASES = {def normalize_canvas_format(format_key: str) -> str:- """标准化画布格式键名(支持常见别名)。"""+ """Normalize canvas format key name (supports common aliases)."""if not format_key:return ''key = format_key.strip().lower()@@ -85,25 +86,25 @@ def normalize_canvas_format(format_key: str) -> str:def parse_project_name(dir_name: str) -> Dict[str, str]:"""- 从项目目录名解析项目信息+ Parse project information from the project directory name.Args:- dir_name: 项目目录名称+ dir_name: Project directory nameReturns:- 包含 name, format, date 的字典+ Dictionary containing name, format, date"""result = {'name': dir_name,'format': 'unknown',- 'format_name': '未知格式',+ 'format_name': 'Unknown format','date': 'unknown',- 'date_formatted': '未知日期'+ 'date_formatted': 'Unknown date'}dir_name_lower = dir_name.lower()- # 提取日期 (格式: _YYYYMMDD)+ # Extract date (format: _YYYYMMDD)date_match = re.search(r'_(\d{8})$', dir_name)if date_match:date_str = date_match.group(1)@@ -114,7 +115,7 @@ def parse_project_name(dir_name: str) -> Dict[str, str]:except ValueError:pass- # 优先按标准格式解析: name_format_YYYYMMDD+ # Prefer parsing standard format: name_format_YYYYMMDDfull_match = re.match(r'^(?P<name>.+)_(?P<format>[a-z0-9_-]+)_(?P<date>\d{8})$', dir_name_lower)if full_match:raw_format = full_match.group('format')@@ -125,7 +126,7 @@ def parse_project_name(dir_name: str) -> Dict[str, str]:result['name'] = dir_name[:len(full_match.group('name'))]return result- # 兜底:只匹配末尾 `_format`,避免误删项目名内部片段+ # Fallback: only match trailing `_format` to avoid deleting parts of the project namesorted_formats = sorted(CANVAS_FORMATS.keys(), key=len, reverse=True)for fmt_key in sorted_formats:if re.search(rf'_{re.escape(fmt_key)}(?:_\d{{8}})?$', dir_name_lower):@@ -133,7 +134,7 @@ def parse_project_name(dir_name: str) -> Dict[str, str]:result['format_name'] = CANVAS_FORMATS[fmt_key]['name']break- # 提取项目名称(仅移除末尾日期和格式后缀)+ # Extract project name (only remove trailing date and format suffix)name = re.sub(r'_\d{8}$', '', dir_name)if result['format'] != 'unknown':name = re.sub(rf'_{re.escape(result["format"])}$', '', name, flags=re.IGNORECASE)@@ -144,17 +145,17 @@ def parse_project_name(dir_name: str) -> Dict[str, str]:def get_project_info(project_path: str) -> Dict:"""- 获取项目的详细信息+ Get detailed project information.Args:- project_path: 项目目录路径+ project_path: Project directory pathReturns:- 项目信息字典+ Project information dictionary"""project_path = Path(project_path)- # 解析目录名+ # Parse directory nameparsed = parse_project_name(project_path.name)info = {@@ -178,10 +179,10 @@ def get_project_info(project_path: str) -> Dict:if not project_path.exists():return info- # 检查 README.md+ # Check README.mdinfo['has_readme'] = (project_path / 'README.md').exists()- # 检查设计规范文件(多个可能的名称)+ # Check design specification files (multiple possible names)spec_files = ['设计规范与内容大纲.md', 'design_specification.md', '设计规范.md']for spec_file in spec_files:if (project_path / spec_file).exists():@@ -189,7 +190,7 @@ def get_project_info(project_path: str) -> Dict:info['spec_file'] = spec_filebreak- # 检查来源文档+ # Check source documentslegacy_source_file = project_path / '来源文档.md'sources_dir = project_path / 'sources'info['has_source'] = legacy_source_file.exists() or sources_dir.exists()@@ -197,14 +198,14 @@ def get_project_info(project_path: str) -> Dict:if sources_dir.exists():info['source_count'] = len([p for p in sources_dir.iterdir() if p.is_file()])- # 统计 SVG 文件+ # Count SVG filessvg_output = project_path / 'svg_output'if svg_output.exists():svg_files = sorted(svg_output.glob('*.svg'))info['svg_count'] = len(svg_files)info['svg_files'] = [f.name for f in svg_files]- # 获取画布格式详细信息+ # Get canvas format detailsif info['format'] in CANVAS_FORMATS:info['canvas_info'] = CANVAS_FORMATS[info['format']]@@ -213,29 +214,29 @@ def get_project_info(project_path: str) -> Dict:def validate_project_structure(project_path: str, verbose: bool = False) -> Tuple[bool, List[str], List[str]]:"""- 验证项目结构的完整性+ Validate project structure completeness.Args:- project_path: 项目目录路径- verbose: 是否显示详细的修复建议+ project_path: Project directory path+ verbose: Whether to show detailed fix suggestionsReturns:- (是否有效, 错误列表, 警告列表)+ (is_valid, error_list, warning_list)"""project_path = Path(project_path)errors = []warnings = []- # 尝试导入错误助手+ # Try to import error helpertry:from error_helper import ErrorHelperuse_helper = Trueexcept ImportError:use_helper = False- # 检查目录是否存在+ # Check if directory existsif not project_path.exists():- msg = f"项目目录不存在: {project_path}"+ msg = f"Project directory does not exist: {project_path}"if use_helper and verbose:msg += "\n" + ErrorHelper.format_error_message('missing_directory',{'project_path': str(project_path)})@@ -243,59 +244,59 @@ def validate_project_structure(project_path: str, verbose: bool = False) -> Tuplreturn False, errors, warningsif not project_path.is_dir():- errors.append(f"不是有效的目录: {project_path}")+ errors.append(f"Not a valid directory: {project_path}")return False, errors, warnings- # 检查必需文件+ # Check required filesif not (project_path / 'README.md').exists():- msg = "缺少必需文件: README.md"+ msg = "Missing required file: README.md"if use_helper and verbose:msg += "\n" + ErrorHelper.format_error_message('missing_readme',{'project_path': str(project_path)})errors.append(msg)- # 检查设计规范文件+ # Check design specification filespec_files = ['设计规范与内容大纲.md', 'design_specification.md', '设计规范.md']has_spec = any((project_path / f).exists() for f in spec_files)if not has_spec:- msg = "缺少设计规范文件(建议文件名: 设计规范与内容大纲.md)"+ msg = "Missing design specification file (suggested filename: design_specification.md)"if use_helper and verbose:msg += "\n" + ErrorHelper.format_error_message('missing_spec')warnings.append(msg)- # 检查 svg_output 目录+ # Check svg_output directorysvg_output = project_path / 'svg_output'if not svg_output.exists():- msg = "缺少 svg_output 目录"+ msg = "Missing svg_output directory"if use_helper and verbose:msg += "\n" + \ErrorHelper.format_error_message('missing_svg_output')errors.append(msg)elif not svg_output.is_dir():- errors.append("svg_output 不是目录")+ errors.append("svg_output is not a directory")else:- # 检查是否有 SVG 文件+ # Check for SVG filessvg_files = list(svg_output.glob('*.svg'))if not svg_files:- msg = "svg_output 目录为空,没有 SVG 文件"+ msg = "svg_output directory is empty, no SVG files found"if use_helper and verbose:msg += "\n" + \ErrorHelper.format_error_message('empty_svg_output')warnings.append(msg)else:- # 验证 SVG 文件命名(与 project_manager.py 保持一致)+ # Validate SVG file naming (consistent with project_manager.py)for svg_file in svg_files:if not re.match(r'^(slide_\d+_\w+|P?\d+_.+)\.svg$', svg_file.name):- msg = f"SVG 文件命名不规范: {svg_file.name}"+ msg = f"Non-standard SVG file naming: {svg_file.name}"if use_helper and verbose:msg += "\n" + ErrorHelper.format_error_message('invalid_svg_naming',{'file_name': svg_file.name})warnings.append(msg)- # 检查目录命名格式+ # Check directory naming formatdir_name = project_path.nameif not re.search(r'_\d{8}$', dir_name):- msg = f"目录名缺少日期后缀 (_YYYYMMDD): {dir_name}"+ msg = f"Directory name missing date suffix (_YYYYMMDD): {dir_name}"if use_helper and verbose:msg += "\n" + \ErrorHelper.format_error_message('missing_date_suffix')@@ -307,60 +308,60 @@ def validate_project_structure(project_path: str, verbose: bool = False) -> Tupldef validate_svg_viewbox(svg_files: List[Path], expected_format: Optional[str] = None) -> List[str]:"""- 验证 SVG 文件的 viewBox 设置+ Validate the viewBox settings of SVG files.Args:- svg_files: SVG 文件列表- expected_format: 期望的画布格式(如 'ppt169')+ svg_files: List of SVG files+ expected_format: Expected canvas format (e.g. 'ppt169')Returns:- 警告列表+ List of warnings"""warnings = []viewbox_pattern = re.compile(r'viewBox="([^"]+)"')viewboxes = set()- # 确定期望的 viewBox+ # Determine expected viewBoxexpected_viewbox = Noneif expected_format and expected_format in CANVAS_FORMATS:expected_viewbox = CANVAS_FORMATS[expected_format]['viewbox']- for svg_file in svg_files[:10]: # 检查前10个文件+ for svg_file in svg_files[:10]: # Check first 10 filestry:with open(svg_file, 'r', encoding='utf-8') as f:- content = f.read(2000) # 只读取前2000字符+ content = f.read(2000) # Only read first 2000 charactersmatch = viewbox_pattern.search(content)if match:viewbox = match.group(1)viewboxes.add(viewbox)- # 如果指定了期望格式,检查是否匹配+ # If expected format is specified, check for matchif expected_viewbox and viewbox != expected_viewbox:warnings.append(- f"{svg_file.name}: viewBox '{viewbox}' 与期望格式 "- f"'{expected_format}' 不匹配(期望: '{expected_viewbox}')"+ f"{svg_file.name}: viewBox '{viewbox}' does not match expected format "+ f"'{expected_format}' (expected: '{expected_viewbox}')")else:- warnings.append(f"{svg_file.name}: 未找到 viewBox 属性")+ warnings.append(f"{svg_file.name}: viewBox attribute not found")except Exception as e:- warnings.append(f"{svg_file.name}: 读取失败 - {e}")+ warnings.append(f"{svg_file.name}: Failed to read - {e}")- # 检查是否有多个不同的 viewBox+ # Check for multiple different viewBoxesif len(viewboxes) > 1:- warnings.append(f"检测到多个不同的 viewBox 设置: {viewboxes}")+ warnings.append(f"Multiple different viewBox settings detected: {viewboxes}")return warningsdef find_all_projects(base_dir: str) -> List[Path]:"""- 查找指定目录下的所有项目+ Find all projects under the specified directory.Args:- base_dir: 基础目录路径+ base_dir: Base directory pathReturns:- 项目目录列表+ List of project directories"""base_path = Path(base_dir)if not base_path.exists():@@ -369,7 +370,7 @@ def find_all_projects(base_dir: str) -> List[Path]:projects = []for item in base_path.iterdir():if item.is_dir() and not item.name.startswith('.'):- # 检查是否是有效的项目目录(包含 svg_output 或设计规范)+ # Check if it's a valid project directory (contains svg_output or design spec)has_svg_output = (item / 'svg_output').exists()has_spec = any((item / f).exists() for f in['设计规范与内容大纲.md', 'design_specification.md', '设计规范.md'])@@ -382,13 +383,13 @@ def find_all_projects(base_dir: str) -> List[Path]:def format_file_size(size_bytes: int) -> str:"""- 格式化文件大小+ Format file size.Args:- size_bytes: 文件大小(字节)+ size_bytes: File size in bytesReturns:- 格式化的文件大小字符串+ Formatted file size string"""for unit in ['B', 'KB', 'MB', 'GB']:if size_bytes < 1024.0:@@ -399,13 +400,13 @@ def format_file_size(size_bytes: int) -> str:def get_project_stats(project_path: str) -> Dict:"""- 获取项目的统计信息+ Get project statistics.Args:- project_path: 项目目录路径+ project_path: Project directory pathReturns:- 统计信息字典+ Statistics dictionary"""project_path = Path(project_path)stats = {@@ -438,37 +439,37 @@ def get_project_stats(project_path: str) -> Dict:if __name__ == '__main__':- # 测试代码+ # Test codeimport sysif len(sys.argv) > 1:project_path = sys.argv[1]info = get_project_info(project_path)- print(f"\n项目信息: {info['dir_name']}")+ print(f"\nProject Info: {info['dir_name']}")print("=" * 60)- print(f"项目名称: {info['name']}")- print(f"画布格式: {info['format_name']} ({info['format']})")- print(f"创建日期: {info['date_formatted']}")- print(f"SVG 文件: {info['svg_count']} 个")- print(f"README: {'✓' if info['has_readme'] else '✗'}")- print(f"设计规范: {'✓' if info['has_spec'] else '✗'}")-- print("\n验证结果:")+ print(f"Project Name: {info['name']}")+ print(f"Canvas Format: {info['format_name']} ({info['format']})")+ print(f"Created: {info['date_formatted']}")+ print(f"SVG Files: {info['svg_count']}")+ print(f"README: {'Yes' if info['has_readme'] else 'No'}")+ print(f"Design Spec: {'Yes' if info['has_spec'] else 'No'}")++ print("\nValidation Results:")print("-" * 60)is_valid, errors, warnings = validate_project_structure(project_path)if errors:- print("❌ 错误:")+ print("[ERROR]")for error in errors:print(f" - {error}")if warnings:- print("⚠️ 警告:")+ print("[WARN]")for warning in warnings:print(f" - {warning}")if is_valid and not warnings:- print("✅ 项目结构完整,没有问题")+ print("[OK] Project structure is complete, no issues found")else:- print("用法: python3 project_utils.py <project_path>")+ print("Usage: python3 project_utils.py <project_path>")diff --git a/skills/ppt-master/scripts/rotate_images.py b/skills/ppt-master/scripts/rotate_images.pyindex ef52ab0f..7537a6fb 100644--- a/skills/ppt-master/scripts/rotate_images.py+++ b/skills/ppt-master/scripts/rotate_images.py@@ -1,10 +1,11 @@#!/usr/bin/env python3"""-PPT Master - 图片方向管理工具+PPT Master - Image Orientation Management Tool-提供可视化筛选图片方向、生成修正代码及批量旋转图片的功能。+Provides visual image orientation filtering, fix code generation,+and batch image rotation functionality.-用法:+Usage:python3 scripts/rotate_images.py gen <images_directory>python3 scripts/rotate_images.py fix <fixes.json>"""@@ -22,10 +23,10 @@ from PIL import Image, ExifTagsORIENTATION_TAG_ID = 274 # 0x0112class ImageRotator:- """图片方向管理器"""-+ """Image orientation manager"""+def __init__(self):- """初始化管理器"""+ """Initialize the manager"""pass@staticmethod@@ -47,7 +48,7 @@ class ImageRotator:@staticmethoddef _natural_sort_key(s: Union[str, Path]) -> List[Union[int, str]]:- """自然排序键生成器"""+ """Natural sort key generator"""return [int(text) if text.isdigit() else text.lower()for text in re.split(r'(\d+)', str(s))]@@ -86,103 +87,103 @@ class ImageRotator:img.save(file_path, **save_kwargs)def auto_fix_exif(self, target_dir: Union[str, Path]) -> int:- """自动修正目录下所有图片的 EXIF 方向-+ """Auto-fix EXIF orientation for all images in the directory+Args:- target_dir: 目标目录-+ target_dir: Target directory+Returns:- 修正的图片数量+ Number of images fixed"""target_path = Path(target_dir)if not target_path.exists():return 0-- print(f"[AUTO] 正在检查 EXIF 方向信息...")++ print(f"[AUTO] Checking EXIF orientation information...")fixed_count = 0- valid_exts = {'.jpg', '.jpeg', '.webp'} # PNG 通常不带旋转 EXIF-- # 预先收集文件列表,避免遍历时修改导致的问题+ valid_exts = {'.jpg', '.jpeg', '.webp'} # PNG typically does not carry rotation EXIF++ # Pre-collect file list to avoid issues caused by modifying during iterationfiles = [f for f in target_path.iterdir() if f.is_file() and f.suffix.lower() in valid_exts]-+for f in files:if self._fix_single_exif(f):fixed_count += 1-+if fixed_count > 0:- print(f"[OK] 自动修正了 {fixed_count} 张图片的 EXIF 方向")+ print(f"[OK] Auto-fixed EXIF orientation for {fixed_count} image(s)")else:- print(f"[INFO] 没有发现需要 EXIF 修正的图片")-+ print(f"[INFO] No images requiring EXIF correction found")+return fixed_countdef generate_html_tool(self, target_dir: str, output_filename: str = "image_orientation_tool.html") -> str:- """生成图片筛选 HTML 工具-- 生成前会自动执行 EXIF 修正。+ """Generate the image filtering HTML tool++ Automatically performs EXIF correction before generating."""target_path = Path(target_dir).resolve()repo_root = self._repo_root()-+if not target_path.exists():- raise FileNotFoundError(f"目录不存在: {target_path}")+ raise FileNotFoundError(f"Directory not found: {target_path}")- # 1. 先进行自动 EXIF 修正+ # 1. Perform automatic EXIF correction firstself.auto_fix_exif(target_path)-- # 2. 生成 HTML- # 工具生成在父级目录 (projects/)++ # 2. Generate HTML+ # Tool is generated in the parent directory (projects/)project_root = target_path.parenthtml_output_path = project_root / output_filename-- # 收集图片++ # Collect imagesimages = []valid_exts = {'.jpg', '.jpeg', '.png', '.webp', '.bmp'}-- print(f"[SCAN] 正在扫描目录生成网页: {target_path}")-++ print(f"[SCAN] Scanning directory to generate webpage: {target_path}")+files = sorted(target_path.iterdir(), key=lambda p: self._natural_sort_key(p.name))-+for f in files:if f.is_file() and f.suffix.lower() in valid_exts:try:- # src 用于 HTML 显示,保持相对于 HTML 文件的路径 (e.g. "images/1.jpg")+ # src is used for HTML display, keep path relative to the HTML file (e.g. "images/1.jpg")src_rel_path = f.relative_to(project_root).as_posix()-- # path 用于 JSON 数据,使用相对于运行目录(通常是仓库根目录)的路径++ # path is used for JSON data, using path relative to the working directory (usually repo root)# e.g. "projects/Name/images/1.jpg"- # 我们假设脚本是从仓库根目录运行的,或者 target_path 本身就是绝对路径- # 最稳妥的方式是计算相对于仓库根目录的路径(避免 CWD 变化导致 fixes.json 不可用)+ # We assume the script is run from the repo root, or target_path is already absolute+ # The safest approach is to compute a path relative to the repo root (avoids CWD changes making fixes.json unusable)try:repo_rel_path = f.relative_to(repo_root).as_posix()except ValueError:- # 如果文件不在 CWD 下,退回使用绝对路径+ # If the file is not under CWD, fall back to absolute pathrepo_rel_path = str(f.resolve())images.append({'src': src_rel_path, 'path': repo_rel_path})except ValueError:- print(f"[WARN] 警告: {f.name} 无法计算相对路径,已跳过")+ print(f"[WARN] Warning: {f.name} cannot compute relative path, skipped")continueif not images:- raise ValueError("未找到任何图片文件")+ raise ValueError("No image files found")json_data = json.dumps(images)- # HTML 模板嵌入+ # Embed HTML templatehtml_content = self._get_html_template().replace('__IMAGES__', json_data)-+with open(html_output_path, 'w', encoding='utf-8') as f:f.write(html_content)-+return str(html_output_path)def apply_fixes(self, json_source: Union[str, List[Dict]]) -> Dict[str, int]:- """应用图片旋转修正"""+ """Apply image rotation fixes"""tasks = []json_file_dir: Optional[Path] = None-- # 解析输入++ # Parse inputif isinstance(json_source, str):if json_source.endswith('.json') or os.path.exists(json_source):json_file_dir = Path(json_source).resolve().parent@@ -192,24 +193,24 @@ class ImageRotator:try:tasks = json.loads(json_source)except json.JSONDecodeError:- raise ValueError("输入无效:不是文件路径也不是有效的 JSON 字符串")+ raise ValueError("Invalid input: not a file path nor a valid JSON string")elif isinstance(json_source, list):tasks = json_source-- print(f"[WORK] 开始处理 {len(tasks)} 个人工旋转任务...")++ print(f"[WORK] Starting {len(tasks)} manual rotation task(s)...")print("=" * 60)-+cwd = Path(os.getcwd())repo_root = self._repo_root()stats = {'total': len(tasks), 'success': 0}-+for task in tasks:rel_path = self._normalize_task_path(task.get('path', ''))rotation = task.get('rotation')-+if not rel_path or rotation is None:continue-+# Absolute paths should stay absolute; repo-relative paths should resolve from repo root.target_file = Path(rel_path)if not target_file.is_absolute():@@ -221,29 +222,29 @@ class ImageRotator:if json_file_dir:candidates.append(json_file_dir / rel_path)- # 兼容旧逻辑/单纯文件名的情况(尝试在 projects 目录下找)+ # Compatibility with legacy logic / bare filenames (try finding under the projects directory)candidates.append(repo_root / 'projects' / rel_path)candidates.append(cwd / 'projects' / rel_path)if json_file_dir:candidates.append(json_file_dir / 'projects' / rel_path)target_file = next((c for c in candidates if c.exists()), candidates[0])-+if not target_file.exists():- print(f"[SKIP] 文件未找到: {rel_path}")+ print(f"[SKIP] File not found: {rel_path}")continue-+try:self._rotate_single_image(target_file, rotation)- print(f"[OK] {target_file.name} 旋转 {rotation}°")+ print(f"[OK] {target_file.name} rotated {rotation} degrees")stats['success'] += 1except Exception as e:print(f"[ERROR] {target_file.name}: {e}")-+return statsdef _fix_single_exif(self, file_path: Path) -> bool:- """检查并修正单张图片的 EXIF"""+ """Check and fix EXIF orientation for a single image"""try:fixed_img: Optional[Image.Image] = Noneexif_bytes: Optional[bytes] = None@@ -253,17 +254,17 @@ class ImageRotator:with Image.open(file_path) as img:exif = img.getexif()orientation = exif.get(ORIENTATION_TAG_ID, 1) if exif else None-+if not orientation or orientation == 1:return False- print(f" [EXIF] 修正: {file_path.name} (Orientation={orientation})")-- # 应用旋转+ print(f" [EXIF] Fixing: {file_path.name} (Orientation={orientation})")++ # Apply rotationfixed_img = self._apply_exif_orientation(img, orientation)fixed_img.load()-- # 移除具体的 Orientation tag,保留其他 EXIF++ # Remove the specific Orientation tag, keep other EXIF dataif exif:exif[ORIENTATION_TAG_ID] = 1exif_bytes = exif.tobytes()@@ -271,7 +272,7 @@ class ImageRotator:icc_profile = img.info.get('icc_profile')src_format = img.format- # 必须在原文件关闭后保存 (Windows 特性)+ # Must save after the original file is closed (Windows requirement)if fixed_img is None:return False@@ -284,11 +285,11 @@ class ImageRotator:)return Trueexcept Exception as e:- print(f" [WARN] 读取EXIF失败 {file_path.name}: {e}")+ print(f" [WARN] Failed to read EXIF for {file_path.name}: {e}")return Falsedef _get_exif_orientation(self, img: Image.Image) -> Optional[int]:- """获取 Orientation 值"""+ """Get the Orientation value"""try:exif = img._getexif()if exif:@@ -300,7 +301,7 @@ class ImageRotator:return Nonedef _apply_exif_orientation(self, img: Image.Image, orientation: int) -> Image.Image:- """根据 Orientation 值旋转图片"""+ """Rotate image according to the Orientation value"""T = getattr(Image, "Transpose", Image)if orientation == 2:return img.transpose(T.FLIP_LEFT_RIGHT)@@ -319,7 +320,7 @@ class ImageRotator:return imgdef _rotate_single_image(self, file_path: Path, rotation_deg: int):- """人工旋转单张图片"""+ """Manually rotate a single image"""T = getattr(Image, "Transpose", Image)with Image.open(file_path) as img:ccw_angle = (360 - int(rotation_deg)) % 360@@ -355,17 +356,17 @@ class ImageRotator:)def _get_html_template(self) -> str:- """获取 HTML 模板内容"""+ """Get HTML template content"""return """<!DOCTYPE html>-<html lang="zh-CN">+<html lang="en"><head><meta charset="UTF-8">- <title>图片方向筛选工具</title>+ <title>Image Orientation Tool</title><style>body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; padding: 20px; background: #f0f2f5; color: #333; }- .header {- position: sticky; top: 0; background: rgba(255,255,255,0.95); padding: 20px;+ .header {+ position: sticky; top: 0; background: rgba(255,255,255,0.95); padding: 20px;box-shadow: 0 4px 20px rgba(0,0,0,0.08); z-index: 100;border-radius: 12px; margin-bottom: 20px;backdrop-filter: blur(10px);@@ -373,46 +374,46 @@ class ImageRotator:}h2 { margin: 0; font-size: 1.5rem; color: #1a1a1a; }.instructions { color: #666; margin-top: 5px; font-size: 0.9rem; }-- .grid {- display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));- gap: 15px;++ .grid {+ display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));+ gap: 15px;}- .card {- background: white; border-radius: 12px; overflow: hidden;+ .card {+ background: white; border-radius: 12px; overflow: hidden;box-shadow: 0 2px 8px rgba(0,0,0,0.05); text-align: center;cursor: pointer; transition: all 0.2s ease;position: relative; border: 2px solid transparent;}.card:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }.card.modified { border-color: #007bff; background: #f8fbff; }-+.img-wrapper {height: 180px; width: 100%; display: flex; align-items: center; justify-content: center;background: #e9ecef; overflow: hidden; position: relative;}- img {+ img {max-width: 100%; max-height: 100%; object-fit: contain;- transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);+ transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);}-+.info { padding: 10px; font-size: 11px; color: #555; word-break: break-all; border-top: 1px solid #eee; }-+.badge {- position: absolute; top: 10px; right: 10px;- background: #007bff; color: white; padding: 4px 8px;+ position: absolute; top: 10px; right: 10px;+ background: #007bff; color: white; padding: 4px 8px;border-radius: 20px; font-size: 11px; font-weight: bold;opacity: 0; transform: scale(0.8); transition: all 0.2s;box-shadow: 0 2px 4px rgba(0,0,0,0.2);}.card.modified .badge { opacity: 1; transform: scale(1); }-+.btn {background: #007bff; color: white; border: none; padding: 10px 24px;border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.2s;}.btn:hover { background: #0056b3; }-+#output-modal {display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center;@@ -421,8 +422,8 @@ class ImageRotator:background: white; padding: 30px; border-radius: 16px; width: 80%; max-width: 600px;box-shadow: 0 10px 40px rgba(0,0,0,0.2);}- textarea {- width: 100%; height: 200px; padding: 10px; border: 1px solid #ddd; border-radius: 8px;+ textarea {+ width: 100%; height: 200px; padding: 10px; border: 1px solid #ddd; border-radius: 8px;font-family: inherit; resize: vertical; margin: 15px 0;background: #f8f9fa;}@@ -432,21 +433,21 @@ class ImageRotator:<div class="header"><div>- <h2>图片方向修正</h2>- <div class="instructions">点击图片旋转 (90° -> 180° -> 270° -> 0°)。自然顺序排列。</div>+ <h2>Image Orientation Fix</h2>+ <div class="instructions">Click an image to rotate (90 -> 180 -> 270 -> 0). Natural order sorting.</div></div>- <button class="btn" onclick="showCode()">生成修正代码</button>+ <button class="btn" onclick="showCode()">Generate Fix Code</button></div><div class="grid" id="grid"></div><div id="output-modal" onclick="if(event.target===this)this.style.display='none'"><div class="modal-content">- <h3>复制以下代码</h3>- <p style="color:#666; font-size: 0.9em;">请将此 JSON 内容复制并发送给 AI 助手,或保存为 'fixes.json'。</p>+ <h3>Copy the code below</h3>+ <p style="color:#666; font-size: 0.9em;">Copy this JSON content and send it to the AI assistant, or save it as 'fixes.json'.</p><textarea id="output-area" readonly></textarea><div style="text-align: right;">- <button class="btn" onclick="document.getElementById('output-modal').style.display='none'">关闭</button>+ <button class="btn" onclick="document.getElementById('output-modal').style.display='none'">Close</button></div></div></div>@@ -461,9 +462,9 @@ class ImageRotator:card.setAttribute('data-rotation', 0);// use stable path for the data attributecard.setAttribute('data-path', item.path);-+const filename = item.src.split('/').pop();-+card.innerHTML = `<div class="img-wrapper"><img src="${item.src}" alt="${filename}" loading="lazy">@@ -471,25 +472,25 @@ class ImageRotator:</div><div class="info">${filename}</div>`;-+card.onclick = function() {let rot = parseInt(this.getAttribute('data-rotation'));rot = (rot + 90) % 360;this.setAttribute('data-rotation', rot);-+const img = this.querySelector('img');img.style.transform = `rotate(${rot}deg)`;-+const badge = this.querySelector('.badge');badge.innerText = rot + '°';-+if (rot > 0) {this.classList.add('modified');} else {this.classList.remove('modified');}};-+grid.appendChild(card);});@@ -504,11 +505,11 @@ class ImageRotator:});}});-+const jsonStr = JSON.stringify(tasks, null, 2);const modal = document.getElementById('output-modal');const area = document.getElementById('output-area');-+modal.style.display = 'flex';area.value = jsonStr;area.select();@@ -520,61 +521,61 @@ class ImageRotator:"""def main():- """主函数"""+ """Main function"""if len(sys.argv) < 2:print(__doc__)sys.exit(1)-+command = sys.argv[1]rotator = ImageRotator()-+if command == 'gen':if len(sys.argv) < 3:- print("[ERROR] 错误: 需要提供图片目录路径")- print("用法: python3 scripts/rotate_images.py gen <images_directory>")+ print("[ERROR] Error: images directory path is required")+ print("Usage: python3 scripts/rotate_images.py gen <images_directory>")sys.exit(1)-+target_dir = sys.argv[2]try:output_path = rotator.generate_html_tool(target_dir)- print(f"[OK] HTML 工具已创建: {output_path}")- print(f"[LINK] 请在浏览器中打开: file:///{Path(output_path).as_posix()}")+ print(f"[OK] HTML tool created: {output_path}")+ print(f"[LINK] Open in browser: file:///{Path(output_path).as_posix()}")except Exception as e:- print(f"[ERROR] 生成失败: {e}")+ print(f"[ERROR] Generation failed: {e}")sys.exit(1)-+elif command == 'fix':if len(sys.argv) < 3:- print("[ERROR] 错误: 需要提供 fixes.json 路径")- print("用法: python3 scripts/rotate_images.py fix <fixes.json>")+ print("[ERROR] Error: fixes.json path is required")+ print("Usage: python3 scripts/rotate_images.py fix <fixes.json>")sys.exit(1)-+json_file = sys.argv[2]try:stats = rotator.apply_fixes(json_file)- print(f"\n[DONE] 处理完成: 成功 {stats['success']} / 总计 {stats['total']}")+ print(f"\n[DONE] Processing complete: {stats['success']} succeeded / {stats['total']} total")except Exception as e:- print(f"[ERROR] 执行失败: {e}")+ print(f"[ERROR] Execution failed: {e}")sys.exit(1)elif command == 'auto':if len(sys.argv) < 3:- print("[ERROR] 错误: 需要提供图片目录路径")- print("用法: python3 scripts/rotate_images.py auto <images_directory>")+ print("[ERROR] Error: images directory path is required")+ print("Usage: python3 scripts/rotate_images.py auto <images_directory>")sys.exit(1)-+target_dir = sys.argv[2]try:- # 仅执行 EXIF 自动修复+ # Only perform automatic EXIF fixcount = rotator.auto_fix_exif(Path(target_dir))if count == 0:- print("[INFO] 未发现需要自动修复的图片")+ print("[INFO] No images requiring automatic fix found")except Exception as e:- print(f"[ERROR] 自动修复失败: {e}")+ print(f"[ERROR] Automatic fix failed: {e}")sys.exit(1)-+else:- print(f"[ERROR] 错误: 未知命令 '{command}'")+ print(f"[ERROR] Error: unknown command '{command}'")print(__doc__)sys.exit(1)diff --git a/skills/ppt-master/scripts/svg_position_calculator.py b/skills/ppt-master/scripts/svg_position_calculator.pyindex b2020246..6870c6f4 100644--- a/skills/ppt-master/scripts/svg_position_calculator.py+++ b/skills/ppt-master/scripts/svg_position_calculator.py@@ -1,24 +1,25 @@#!/usr/bin/env python3"""-PPT Master - SVG 位置计算与验证工具+PPT Master - SVG Position Calculation and Validation Tool-提供图表坐标的事前计算和事后验证功能,输出清晰的坐标表格。+Provides pre-calculation and post-validation of chart coordinates,+outputting clear coordinate tables.======================================================================-常用命令 (可直接复制使用)+Common Commands (can be copied and used directly)======================================================================-1. 分析 SVG 文件中的所有坐标:- python scripts/svg_position_calculator.py analyze <svg文件>+1. Analyze all coordinates in an SVG file:+ python scripts/svg_position_calculator.py analyze <svg_file>-2. 交互式计算模式:+2. Interactive calculation mode:python scripts/svg_position_calculator.py interactive-3. 从 JSON 配置文件计算:+3. Calculate from JSON config file:python scripts/svg_position_calculator.py from-json <config.json>-4. 快速计算:- python scripts/svg_position_calculator.py calc bar --data "华东:185,华南:142"+4. Quick calculation:+ python scripts/svg_position_calculator.py calc bar --data "East:185,South:142"python scripts/svg_position_calculator.py calc pie --data "A:35,B:25,C:20"python scripts/svg_position_calculator.py calc line --data "0:50,10:80,20:120"python scripts/svg_position_calculator.py calc grid --rows 2 --cols 3@@ -34,7 +35,7 @@ from pathlib import Pathfrom typing import Dict, List, Tuple, Optional, Anyfrom dataclasses import dataclass-# 修复 Windows 下中文输出乱码+# Fix garbled Chinese output on Windowsif sys.platform == 'win32':try:sys.stdout.reconfigure(encoding='utf-8')@@ -45,58 +46,58 @@ if sys.platform == 'win32':sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')-# 导入画布格式配置+# Import canvas format configurationtry:from project_utils import CANVAS_FORMATSexcept ImportError:- # 如果导入失败,使用内置定义+ # Use built-in definitions if import failsCANVAS_FORMATS = {'ppt169': {'name': 'PPT 16:9', 'dimensions': '1280×720', 'viewbox': '0 0 1280 720'},'ppt43': {'name': 'PPT 4:3', 'dimensions': '1024×768', 'viewbox': '0 0 1024 768'},- 'xiaohongshu': {'name': '小红书', 'dimensions': '1242×1660', 'viewbox': '0 0 1242 1660'},- 'moments': {'name': '朋友圈', 'dimensions': '1080×1080', 'viewbox': '0 0 1080 1080'},+ 'xiaohongshu': {'name': 'Xiaohongshu (RED)', 'dimensions': '1242×1660', 'viewbox': '0 0 1242 1660'},+ 'moments': {'name': 'WeChat Moments', 'dimensions': '1080×1080', 'viewbox': '0 0 1080 1080'},}# =============================================================================-# 坐标系统基础类+# Coordinate System Base Classes# =============================================================================@dataclassclass ChartArea:- """图表区域定义"""+ """Chart area definition"""x_min: floaty_min: floatx_max: floaty_max: float-+@propertydef width(self) -> float:return self.x_max - self.x_min-+@propertydef height(self) -> float:return self.y_max - self.y_min-+@propertydef center(self) -> Tuple[float, float]:return ((self.x_min + self.x_max) / 2, (self.y_min + self.y_max) / 2)class CoordinateSystem:- """坐标系统 - 负责数据域到 SVG 画布坐标的映射"""-+ """Coordinate system - maps data domain to SVG canvas coordinates"""+def __init__(self, canvas_format: str = 'ppt169', chart_area: Optional[ChartArea] = None):"""- 初始化坐标系统-+ Initialize the coordinate system+Args:- canvas_format: 画布格式 (ppt169, ppt43, xiaohongshu, moments 等)- chart_area: 图表区域,如果不指定则使用默认值+ canvas_format: Canvas format (ppt169, ppt43, xiaohongshu, moments, etc.)+ chart_area: Chart area; uses default values if not specified"""self.canvas_format = canvas_format-- # 解析画布尺寸++ # Parse canvas dimensionsif canvas_format in CANVAS_FORMATS:viewbox = CANVAS_FORMATS[canvas_format]['viewbox']parts = viewbox.split()@@ -105,63 +106,63 @@ class CoordinateSystem:else:self.canvas_width = 1280self.canvas_height = 720-- # 设置图表区域(默认留出边距)++ # Set chart area (default with margins)if chart_area:self.chart_area = chart_areaelse:- # 默认图表区域:左右边距 140px,上下边距 150px+ # Default chart area: left/right margin 140px, top/bottom margin 150pxself.chart_area = ChartArea(x_min=140,y_min=150,x_max=self.canvas_width - 120,y_max=self.canvas_height - 120)-+def data_to_svg_x(self, data_x: float, x_range: Tuple[float, float]) -> float:"""- 将数据 X 值映射为 SVG X 坐标-+ Map data X value to SVG X coordinate+Args:- data_x: 数据 X 值- x_range: X 轴数据范围 (min, max)+ data_x: Data X value+ x_range: X axis data range (min, max)"""x_min, x_max = x_rangeif x_max == x_min:return self.chart_area.x_min-+ratio = (data_x - x_min) / (x_max - x_min)return self.chart_area.x_min + ratio * self.chart_area.width-+def data_to_svg_y(self, data_y: float, y_range: Tuple[float, float]) -> float:"""- 将数据 Y 值映射为 SVG Y 坐标(注意 SVG Y 轴向下为正)-+ Map data Y value to SVG Y coordinate (note: SVG Y axis points downward)+Args:- data_y: 数据 Y 值- y_range: Y 轴数据范围 (min, max)+ data_y: Data Y value+ y_range: Y axis data range (min, max)"""y_min, y_max = y_rangeif y_max == y_min:return self.chart_area.y_max-+ratio = (data_y - y_min) / (y_max - y_min)- # SVG Y 轴向下,所以要反转+ # SVG Y axis points downward, so invertreturn self.chart_area.y_max - ratio * self.chart_area.height-- def data_to_svg(self, data_x: float, data_y: float,++ def data_to_svg(self, data_x: float, data_y: float,x_range: Tuple[float, float], y_range: Tuple[float, float]) -> Tuple[float, float]:- """将数据点映射为 SVG 坐标"""+ """Map data point to SVG coordinates"""return (self.data_to_svg_x(data_x, x_range), self.data_to_svg_y(data_y, y_range))# =============================================================================-# 柱状图计算器+# Bar Chart Calculator# =============================================================================@dataclassclass BarPosition:- """柱子位置信息"""+ """Bar position information"""index: intlabel: strvalue: float@@ -169,75 +170,75 @@ class BarPosition:y: floatwidth: floatheight: float- label_x: float # 标签 X 位置- label_y: float # 标签 Y 位置(柱子下方)- value_x: float # 数值 X 位置- value_y: float # 数值 Y 位置(柱子上方)+ label_x: float # Label X position+ label_y: float # Label Y position (below bar)+ value_x: float # Value X position+ value_y: float # Value Y position (above bar)class BarChartCalculator:- """柱状图坐标计算器"""-+ """Bar chart coordinate calculator"""+def __init__(self, coord_system: CoordinateSystem):self.coord = coord_system-- def calculate(self, data: Dict[str, float],- bar_width: float = 50,++ def calculate(self, data: Dict[str, float],+ bar_width: float = 50,gap_ratio: float = 0.3,y_min: float = 0,y_max: Optional[float] = None,horizontal: bool = False) -> List[BarPosition]:"""- 计算柱状图位置-+ Calculate bar chart positions+Args:- data: 数据字典 {标签: 值}- bar_width: 柱子宽度(如果为 None 则自动计算)- gap_ratio: 柱子间隔比例(相对于柱宽)- y_min: Y 轴最小值- y_max: Y 轴最大值(如果为 None 则使用数据最大值)- horizontal: 是否为水平柱状图+ data: Data dictionary {label: value}+ bar_width: Bar width (auto-calculated if None)+ gap_ratio: Gap ratio between bars (relative to bar width)+ y_min: Y axis minimum value+ y_max: Y axis maximum value (uses data maximum if None)+ horizontal: Whether to use horizontal bar chart"""labels = list(data.keys())values = list(data.values())n = len(labels)-+if n == 0:return []-- # 计算 Y 轴范围++ # Calculate Y axis rangeif y_max is None:- y_max = max(values) * 1.1 # 留 10% 空间-+ y_max = max(values) * 1.1 # Leave 10% headroom+area = self.coord.chart_area-+if horizontal:- # 水平柱状图+ # Horizontal bar chartreturn self._calculate_horizontal(labels, values, bar_width, gap_ratio, y_min, y_max)-- # 计算柱子布局++ # Calculate bar layouttotal_width = area.widthif bar_width is None:- # 自动计算柱宽:总宽度 / (柱数 * (1 + 间隔比例))+ # Auto-calculate bar width: total width / (bar count * (1 + gap ratio))bar_width = total_width / (n * (1 + gap_ratio))-+gap = bar_width * gap_ratiototal_bars_width = n * bar_width + (n - 1) * gapstart_x = area.x_min + (area.width - total_bars_width) / 2-+results = []for i, (label, value) in enumerate(zip(labels, values)):- # 柱子 X 位置+ # Bar X positionx = start_x + i * (bar_width + gap)-- # 柱子高度和 Y 位置++ # Bar height and Y positionratio = (value - y_min) / (y_max - y_min) if y_max > y_min else 0height = ratio * area.height- y = area.y_max - height # SVG Y 轴向下-- # 标签和数值位置+ y = area.y_max - height # SVG Y axis points downward++ # Label and value positionscenter_x = x + bar_width / 2-+results.append(BarPosition(index=i + 1,label=label,@@ -251,33 +252,33 @@ class BarChartCalculator:value_x=round(center_x, 1),value_y=round(y - 15, 1)))-+return results-+def _calculate_horizontal(self, labels: List[str], values: List[float],bar_height: float, gap_ratio: float,x_min: float, x_max: float) -> List[BarPosition]:- """计算水平柱状图"""+ """Calculate horizontal bar chart"""n = len(labels)area = self.coord.chart_area-+if bar_height is None:bar_height = area.height / (n * (1 + gap_ratio))-+gap = bar_height * gap_ratiototal_bars_height = n * bar_height + (n - 1) * gapstart_y = area.y_min + (area.height - total_bars_height) / 2-+results = []for i, (label, value) in enumerate(zip(labels, values)):y = start_y + i * (bar_height + gap)-+ratio = (value - x_min) / (x_max - x_min) if x_max > x_min else 0width = ratio * area.widthx = area.x_min-+center_y = y + bar_height / 2-+results.append(BarPosition(index=i + 1,label=label,@@ -291,38 +292,38 @@ class BarChartCalculator:value_x=round(x + width + 10, 1),value_y=round(center_y, 1)))-+return results-+def format_table(self, positions: List[BarPosition]) -> str:- """格式化为表格输出"""+ """Format as table output"""lines = []- lines.append("序号 标签 数值 X Y 宽度 高度")+ lines.append("Index Label Value X Y Width Height")lines.append("---- ---------- -------- ------- ------- ------- -------")-+for p in positions:lines.append(f"{p.index:4d} {p.label:<10s} {p.value:>8.1f} {p.x:>7.1f} {p.y:>7.1f} {p.width:>7.1f} {p.height:>7.1f}")-+return "\n".join(lines)# =============================================================================-# 饼图/环形图计算器+# Pie / Donut Chart Calculator# =============================================================================@dataclassclass PieSlice:- """饼图扇区信息"""+ """Pie chart slice information"""index: intlabel: strvalue: floatpercentage: float- start_angle: float # 起始角度(度)- end_angle: float # 终止角度(度)- path_d: str # SVG path d 属性- label_x: float # 标签 X 位置- label_y: float # 标签 Y 位置- # 弧线端点坐标(相对于圆心)+ start_angle: float # Start angle (degrees)+ end_angle: float # End angle (degrees)+ path_d: str # SVG path d attribute+ label_x: float # Label X position+ label_y: float # Label Y position+ # Arc endpoint coordinates (relative to center)start_x: floatstart_y: floatend_x: float@@ -330,57 +331,57 @@ class PieSlice:class PieChartCalculator:- """饼图/环形图计算器"""-+ """Pie / donut chart calculator"""+def __init__(self, center: Tuple[float, float] = (420, 400), radius: float = 200):self.cx, self.cy = centerself.radius = radius-- def calculate(self, data: Dict[str, float],++ def calculate(self, data: Dict[str, float],start_angle: float = -90,inner_radius: float = 0) -> List[PieSlice]:"""- 计算饼图扇区-+ Calculate pie chart slices+Args:- data: 数据字典 {标签: 值}- start_angle: 起始角度(度,-90 表示从 12 点方向开始)- inner_radius: 内半径(0 表示饼图,> 0 表示环形图)+ data: Data dictionary {label: value}+ start_angle: Start angle (degrees, -90 means starting from 12 o'clock)+ inner_radius: Inner radius (0 for pie chart, > 0 for donut chart)"""labels = list(data.keys())values = list(data.values())total = sum(values)-+if total == 0:return []-+results = []current_angle = start_angle-+for i, (label, value) in enumerate(zip(labels, values)):percentage = value / total * 100angle_span = value / total * 360end_angle = current_angle + angle_span-- # 计算弧线端点++ # Calculate arc endpointsstart_rad = math.radians(current_angle)end_rad = math.radians(end_angle)-+start_x = self.radius * math.cos(start_rad)start_y = self.radius * math.sin(start_rad)end_x = self.radius * math.cos(end_rad)end_y = self.radius * math.sin(end_rad)-- # 生成 path++ # Generate pathlarge_arc = 1 if angle_span > 180 else 0-+if inner_radius > 0:- # 环形图+ # Donut chartinner_start_x = inner_radius * math.cos(start_rad)inner_start_y = inner_radius * math.sin(start_rad)inner_end_x = inner_radius * math.cos(end_rad)inner_end_y = inner_radius * math.sin(end_rad)-+path_d = (f"M {inner_start_x:.2f},{inner_start_y:.2f} "f"L {start_x:.2f},{start_y:.2f} "@@ -389,20 +390,20 @@ class PieChartCalculator:f"A {inner_radius},{inner_radius} 0 {large_arc},0 {inner_start_x:.2f},{inner_start_y:.2f} Z")else:- # 饼图+ # Pie chartpath_d = (f"M 0,0 "f"L {start_x:.2f},{start_y:.2f} "f"A {self.radius},{self.radius} 0 {large_arc},1 {end_x:.2f},{end_y:.2f} Z")-- # 标签位置(扇区中心方向,距离圆心的 70% 处)++ # Label position (70% of radius in the direction of slice center)mid_angle = (current_angle + end_angle) / 2mid_rad = math.radians(mid_angle)label_distance = self.radius * 0.7label_x = self.cx + label_distance * math.cos(mid_rad)label_y = self.cy + label_distance * math.sin(mid_rad)-+results.append(PieSlice(index=i + 1,label=label,@@ -418,111 +419,111 @@ class PieChartCalculator:end_x=round(end_x, 2),end_y=round(end_y, 2)))-+current_angle = end_angle-+return results-+def format_table(self, slices: List[PieSlice]) -> str:- """格式化为表格输出"""+ """Format as table output"""lines = []- lines.append(f"圆心: ({self.cx}, {self.cy}) | 半径: {self.radius}")+ lines.append(f"Center: ({self.cx}, {self.cy}) | Radius: {self.radius}")lines.append("")- lines.append("序号 标签 百分比 起始角 终止角 标签X 标签Y")+ lines.append("Index Label Pct Start End LabelX LabelY")lines.append("---- ---------- -------- -------- -------- ------- -------")-+for s in slices:lines.append(f"{s.index:4d} {s.label:<10s} {s.percentage:>6.1f}% {s.start_angle:>8.1f} "f"{s.end_angle:>8.1f} {s.label_x:>7.1f} {s.label_y:>7.1f}")-+lines.append("")- lines.append("=== 弧线端点坐标(相对于圆心)===")- lines.append("序号 起点X 起点Y 终点X 终点Y")+ lines.append("=== Arc Endpoint Coordinates (relative to center) ===")+ lines.append("Index StartX StartY EndX EndY")lines.append("---- --------- --------- --------- ---------")-+for s in slices:lines.append(f"{s.index:4d} {s.start_x:>9.2f} {s.start_y:>9.2f} {s.end_x:>9.2f} {s.end_y:>9.2f}")-+lines.append("")- lines.append("=== Path d 属性 ===")+ lines.append("=== Path d Attribute ===")for s in slices:lines.append(f"{s.index}. {s.label}: {s.path_d}")-+return "\n".join(lines)# =============================================================================-# 雷达图计算器+# Radar Chart Calculator# =============================================================================@dataclassclass RadarPoint:- """雷达图数据点"""+ """Radar chart data point"""index: intlabel: strvalue: float- percentage: float # 相对于最大值的百分比- angle: float # 角度(度)- x: float # 相对于圆心的 X- y: float # 相对于圆心的 Y- abs_x: float # 绝对 X 坐标- abs_y: float # 绝对 Y 坐标- label_x: float # 标签 X 位置- label_y: float # 标签 Y 位置+ percentage: float # Percentage relative to max value+ angle: float # Angle (degrees)+ x: float # X relative to center+ y: float # Y relative to center+ abs_x: float # Absolute X coordinate+ abs_y: float # Absolute Y coordinate+ label_x: float # Label X position+ label_y: float # Label Y positionclass RadarChartCalculator:- """雷达图计算器"""-+ """Radar chart calculator"""+def __init__(self, center: Tuple[float, float] = (640, 400), radius: float = 200):self.cx, self.cy = centerself.radius = radius-- def calculate(self, data: Dict[str, float],++ def calculate(self, data: Dict[str, float],max_value: Optional[float] = None,start_angle: float = -90) -> List[RadarPoint]:"""- 计算雷达图顶点坐标-+ Calculate radar chart vertex coordinates+Args:- data: 数据字典 {维度名: 值}- max_value: 最大值(用于归一化),如果为 None 则使用数据最大值- start_angle: 起始角度(度,-90 表示从 12 点方向开始)+ data: Data dictionary {dimension_name: value}+ max_value: Maximum value (for normalization); uses data maximum if None+ start_angle: Start angle (degrees, -90 means starting from 12 o'clock)"""labels = list(data.keys())values = list(data.values())n = len(labels)-+if n == 0:return []-+if max_value is None:max_value = max(values)-+angle_step = 360 / nresults = []-+for i, (label, value) in enumerate(zip(labels, values)):angle = start_angle + i * angle_steprad = math.radians(angle)-- # 计算归一化后的半径++ # Calculate normalized radiuspercentage = (value / max_value * 100) if max_value > 0 else 0point_radius = self.radius * (value / max_value) if max_value > 0 else 0-- # 计算坐标++ # Calculate coordinatesx = point_radius * math.cos(rad)y = point_radius * math.sin(rad)-- # 标签位置(在最外圈外侧)++ # Label position (outside the outermost ring)label_distance = self.radius + 30label_x = self.cx + label_distance * math.cos(rad)label_y = self.cy + label_distance * math.sin(rad)-+results.append(RadarPoint(index=i + 1,label=label,@@ -536,18 +537,18 @@ class RadarChartCalculator:label_x=round(label_x, 1),label_y=round(label_y, 1)))-+return results-+def calculate_grid(self, levels: int = 5) -> List[List[Tuple[float, float]]]:- """计算网格层坐标(用于绘制背景多边形)"""- n = 6 # 假设 6 个维度+ """Calculate grid layer coordinates (for drawing background polygons)"""+ n = 6 # Assume 6 dimensionsgrids = []-+for level in range(1, levels + 1):level_radius = self.radius * level / levelspoints = []-+angle_step = 360 / nfor i in range(n):angle = -90 + i * angle_step@@ -555,41 +556,41 @@ class RadarChartCalculator:x = level_radius * math.cos(rad)y = level_radius * math.sin(rad)points.append((round(x, 2), round(y, 2)))-+grids.append(points)-+return grids-+def format_table(self, points: List[RadarPoint]) -> str:- """格式化为表格输出"""+ """Format as table output"""lines = []- lines.append(f"圆心: ({self.cx}, {self.cy}) | 半径: {self.radius}")+ lines.append(f"Center: ({self.cx}, {self.cy}) | Radius: {self.radius}")lines.append("")- lines.append("序号 维度 数值 百分比 角度 X Y 绝对X 绝对Y")+ lines.append("Index Dimension Value Pct Angle X Y Abs_X Abs_Y")lines.append("---- ---------- ------ -------- ------ ------- ------- ------- -------")-+for p in points:lines.append(f"{p.index:4d} {p.label:<10s} {p.value:>6.1f} {p.percentage:>6.1f}% "f"{p.angle:>6.1f} {p.x:>7.2f} {p.y:>7.2f} {p.abs_x:>7.1f} {p.abs_y:>7.1f}")-- # 生成 polygon points 属性++ # Generate polygon points attributelines.append("")lines.append("=== SVG Polygon Points ===")points_str = " ".join([f"{p.x},{p.y}" for p in points])lines.append(f'points="{points_str}"')-+return "\n".join(lines)# =============================================================================-# 折线图/散点图计算器+# Line / Scatter Chart Calculator# =============================================================================@dataclassclass DataPoint:- """数据点"""+ """Data point"""index: intx_value: floaty_value: float@@ -599,41 +600,41 @@ class DataPoint:class LineChartCalculator:- """折线图/散点图计算器"""-+ """Line / scatter chart calculator"""+def __init__(self, coord_system: CoordinateSystem):self.coord = coord_system-+def calculate(self, data: List[Tuple[float, float]],x_range: Optional[Tuple[float, float]] = None,y_range: Optional[Tuple[float, float]] = None,labels: Optional[List[str]] = None) -> List[DataPoint]:"""- 计算数据点坐标-+ Calculate data point coordinates+Args:- data: 数据点列表 [(x1, y1), (x2, y2), ...]- x_range: X 轴范围,如果为 None 则自动计算- y_range: Y 轴范围,如果为 None 则自动计算- labels: 点标签列表+ data: Data point list [(x1, y1), (x2, y2), ...]+ x_range: X axis range; auto-calculated if None+ y_range: Y axis range; auto-calculated if None+ labels: Point label list"""if not data:return []-+x_values = [p[0] for p in data]y_values = [p[1] for p in data]-+if x_range is None:x_range = (min(x_values), max(x_values))if y_range is None:y_min = 0y_max = max(y_values) * 1.1y_range = (y_min, y_max)-+results = []for i, (x, y) in enumerate(data):svg_x, svg_y = self.coord.data_to_svg(x, y, x_range, y_range)-+results.append(DataPoint(index=i + 1,x_value=x,@@ -642,55 +643,55 @@ class LineChartCalculator:svg_y=round(svg_y, 1),label=labels[i] if labels and i < len(labels) else None))-+return results-+def generate_path(self, points: List[DataPoint], closed: bool = False) -> str:- """生成 SVG path d 属性"""+ """Generate SVG path d attribute"""if not points:return ""-+parts = [f"M {points[0].svg_x},{points[0].svg_y}"]for p in points[1:]:parts.append(f"L {p.svg_x},{p.svg_y}")-+if closed:parts.append("Z")-+return " ".join(parts)-+def format_table(self, points: List[DataPoint]) -> str:- """格式化为表格输出"""+ """Format as table output"""lines = []area = self.coord.chart_area- lines.append(f"图表区域: ({area.x_min}, {area.y_min}) - ({area.x_max}, {area.y_max})")+ lines.append(f"Chart area: ({area.x_min}, {area.y_min}) - ({area.x_max}, {area.y_max})")lines.append("")- lines.append("序号 X值 Y值 SVG_X SVG_Y")+ lines.append("Index X_Value Y_Value SVG_X SVG_Y")lines.append("---- --------- --------- -------- --------")-+for p in points:label_part = f" ({p.label})" if p.label else ""lines.append(f"{p.index:4d} {p.x_value:>9.2f} {p.y_value:>9.2f} {p.svg_x:>8.1f} {p.svg_y:>8.1f}{label_part}")-+lines.append("")lines.append("=== SVG Path ===")lines.append(self.generate_path(points))-+return "\n".join(lines)# =============================================================================-# 网格布局计算器+# Grid Layout Calculator# =============================================================================@dataclassclass GridCell:- """网格单元格"""+ """Grid cell"""row: intcol: int- index: int # 从 1 开始的索引+ index: int # 1-based indexx: floaty: floatwidth: float@@ -700,40 +701,40 @@ class GridCell:class GridLayoutCalculator:- """网格布局计算器"""-+ """Grid layout calculator"""+def __init__(self, coord_system: CoordinateSystem):self.coord = coord_system-+def calculate(self, rows: int, cols: int,padding: float = 20,gap: float = 20) -> List[GridCell]:"""- 计算网格布局-+ Calculate grid layout+Args:- rows: 行数- cols: 列数- padding: 图表区域内边距- gap: 单元格间距+ rows: Number of rows+ cols: Number of columns+ padding: Chart area inner padding+ gap: Cell spacing"""area = self.coord.chart_area-- # 计算可用区域++ # Calculate available areaavailable_width = area.width - 2 * padding - (cols - 1) * gapavailable_height = area.height - 2 * padding - (rows - 1) * gap-+cell_width = available_width / colscell_height = available_height / rows-+results = []index = 1-+for row in range(rows):for col in range(cols):x = area.x_min + padding + col * (cell_width + gap)y = area.y_min + padding + row * (cell_height + gap)-+results.append(GridCell(row=row + 1,col=col + 1,@@ -746,34 +747,34 @@ class GridLayoutCalculator:center_y=round(y + cell_height / 2, 1)))index += 1-+return results-+def format_table(self, cells: List[GridCell]) -> str:- """格式化为表格输出"""+ """Format as table output"""lines = []area = self.coord.chart_area- lines.append(f"图表区域: ({area.x_min}, {area.y_min}) - ({area.x_max}, {area.y_max})")+ lines.append(f"Chart area: ({area.x_min}, {area.y_min}) - ({area.x_max}, {area.y_max})")lines.append("")- lines.append("序号 行 列 X Y 宽度 高度 中心X 中心Y")+ lines.append("Index Row Col X Y Width Height CenterX CenterY")lines.append("---- ---- ---- ------- ------- ------- ------- ------- -------")-+for c in cells:lines.append(f"{c.index:4d} {c.row:4d} {c.col:4d} {c.x:>7.1f} {c.y:>7.1f} "f"{c.width:>7.1f} {c.height:>7.1f} {c.center_x:>7.1f} {c.center_y:>7.1f}")-+return "\n".join(lines)# =============================================================================-# SVG 验证器+# SVG Validator# =============================================================================@dataclassclass ValidationResult:- """验证结果"""+ """Validation result"""element_type: strelement_id: strattribute: str@@ -784,48 +785,48 @@ class ValidationResult:class SVGPositionValidator:- """SVG 位置验证器"""-+ """SVG position validator"""+def __init__(self, tolerance: float = 1.0):"""- 初始化验证器-+ Initialize the validator+Args:- tolerance: 允许的误差范围(像素)+ tolerance: Allowed deviation (pixels)"""self.tolerance = tolerance-- def validate_from_file(self, svg_file: str,++ def validate_from_file(self, svg_file: str,expected_coords: Dict[str, Dict[str, float]]) -> List[ValidationResult]:"""- 从文件验证坐标-+ Validate coordinates from file+Args:- svg_file: SVG 文件路径- expected_coords: 期望的坐标 {元素ID: {属性: 值}}+ svg_file: SVG file path+ expected_coords: Expected coordinates {element_ID: {attribute: value}}"""svg_path = Path(svg_file)if not svg_path.exists():- raise FileNotFoundError(f"SVG 文件不存在: {svg_file}")-+ raise FileNotFoundError(f"SVG file does not exist: {svg_file}")+with open(svg_path, 'r', encoding='utf-8') as f:content = f.read()-+return self.validate_content(content, expected_coords)-+def validate_content(self, svg_content: str,expected_coords: Dict[str, Dict[str, float]]) -> List[ValidationResult]:- """验证 SVG 内容中的坐标"""+ """Validate coordinates in SVG content"""results = []-+for element_id, attrs in expected_coords.items():for attr, expected in attrs.items():actual = self._extract_attribute(svg_content, element_id, attr)-+if actual is not None:deviation = abs(actual - expected)passed = deviation <= self.tolerance-+results.append(ValidationResult(element_type=self._guess_element_type(element_id),element_id=element_id,@@ -845,30 +846,30 @@ class SVGPositionValidator:deviation=float('inf'),passed=False))-+return results-+def _extract_attribute(self, content: str, element_id: str, attr: str) -> Optional[float]:- """从 SVG 内容中提取属性值"""- # 查找包含该 ID 的元素+ """Extract attribute value from SVG content"""+ # Find element containing the IDpattern = rf'id="{element_id}"[^>]*{attr}="([^"]+)"'match = re.search(pattern, content)-+if not match:- # 尝试反向顺序+ # Try reverse orderpattern = rf'{attr}="([^"]+)"[^>]*id="{element_id}"'match = re.search(pattern, content)-+if match:try:return float(match.group(1))except ValueError:return None-+return None-+def _guess_element_type(self, element_id: str) -> str:- """根据 ID 猜测元素类型"""+ """Guess element type based on ID"""id_lower = element_id.lower()if 'bar' in id_lower or 'rect' in id_lower:return 'rect'@@ -881,12 +882,12 @@ class SVGPositionValidator:elif 'text' in id_lower or 'label' in id_lower:return 'text'return 'unknown'-+def extract_all_positions(self, svg_content: str) -> Dict[str, Dict[str, float]]:- """提取 SVG 中所有元素的位置信息"""+ """Extract position information of all elements in SVG"""positions = {}-- # 提取 rect 元素++ # Extract rect elementsrect_pattern = r'<rect[^>]*(?:id="([^"]*)")?[^>]*x="([^"]*)"[^>]*y="([^"]*)"[^>]*(?:width="([^"]*)")?[^>]*(?:height="([^"]*)")?'for match in re.finditer(rect_pattern, svg_content):id_val = match.group(1) or f"rect_{len(positions)}"@@ -898,8 +899,8 @@ class SVGPositionValidator:positions[id_val]['width'] = float(match.group(4))if match.group(5):positions[id_val]['height'] = float(match.group(5))-- # 提取 circle 元素++ # Extract circle elementscircle_pattern = r'<circle[^>]*(?:id="([^"]*)")?[^>]*cx="([^"]*)"[^>]*cy="([^"]*)"'for match in re.finditer(circle_pattern, svg_content):id_val = match.group(1) or f"circle_{len(positions)}"@@ -907,44 +908,44 @@ class SVGPositionValidator:'cx': float(match.group(2)),'cy': float(match.group(3)),}-+return positions-+def format_results(self, results: List[ValidationResult]) -> str:- """格式化验证结果"""+ """Format validation results"""lines = []- lines.append("=== SVG 位置验证结果 ===")- lines.append(f"容差: {self.tolerance}px")+ lines.append("=== SVG Position Validation Results ===")+ lines.append(f"Tolerance: {self.tolerance}px")lines.append("")- lines.append("状态 元素ID 属性 期望值 实际值 偏差")+ lines.append("Status Element_ID Attr Expected Actual Deviation")lines.append("---- -------------- ------ -------- -------- ------")-+passed_count = 0for r in results:status = "[OK]" if r.passed else "[X]"if r.passed:passed_count += 1-+actual_str = f"{r.actual:.1f}" if not math.isnan(r.actual) else "N/A"deviation_str = f"{r.deviation:.2f}" if not math.isinf(r.deviation) else "N/A"-+lines.append(f"{status} {r.element_id:<14s} {r.attribute:<6s} "f"{r.expected:>8.1f} {actual_str:>8s} {deviation_str:>6s}")-+lines.append("")- lines.append(f"通过: {passed_count}/{len(results)} ({passed_count/len(results)*100:.1f}%)")-+ lines.append(f"Passed: {passed_count}/{len(results)} ({passed_count/len(results)*100:.1f}%)")+return "\n".join(lines)# =============================================================================-# 命令行接口+# Command Line Interface# =============================================================================def parse_data_string(data_str: str) -> Dict[str, float]:- """解析数据字符串 '标签1:值1,标签2:值2' 格式"""+ """Parse data string in 'label1:value1,label2:value2' format"""result = {}for item in data_str.split(','):item = item.strip()@@ -955,14 +956,14 @@ def parse_data_string(data_str: str) -> Dict[str, float]:try:result[label.strip()] = float(value.strip())except ValueError:- print(f"[警告] 无法解析数值: '{value.strip()}', 已跳过")+ print(f"[Warning] Unable to parse value: '{value.strip()}', skipped")else:- print(f"[警告] 格式错误 (应为 '标签:值'): '{item}'")+ print(f"[Warning] Invalid format (expected 'label:value'): '{item}'")return resultdef parse_xy_data_string(data_str: str) -> List[Tuple[float, float]]:- """解析 XY 数据字符串 'x1:y1,x2:y2' 格式"""+ """Parse XY data string in 'x1:y1,x2:y2' format"""result = []for item in data_str.split(','):item = item.strip()@@ -973,45 +974,45 @@ def parse_xy_data_string(data_str: str) -> List[Tuple[float, float]]:try:result.append((float(x.strip()), float(y.strip())))except ValueError:- print(f"[警告] 无法解析坐标: '{item}', 已跳过")+ print(f"[Warning] Unable to parse coordinates: '{item}', skipped")else:- print(f"[警告] 格式错误 (应为 'x:y'): '{item}'")+ print(f"[Warning] Invalid format (expected 'x:y'): '{item}'")return resultdef parse_tuple(s: str) -> Tuple[float, ...]:- """解析逗号分隔的数字元组"""+ """Parse comma-separated numeric tuple"""return tuple(float(x.strip()) for x in s.split(','))def extract_attr(element: str, attr_name: str) -> Optional[str]:- """从元素字符串中提取属性值(属性顺序无关)"""+ """Extract attribute value from element string (attribute order independent)"""pattern = rf'{attr_name}="([^"]*)"'match = re.search(pattern, element)return match.group(1) if match else Nonedef analyze_svg_file(svg_file: str) -> None:- """分析 SVG 文件中的所有图表元素"""+ """Analyze all chart elements in an SVG file"""svg_path = Path(svg_file)if not svg_path.exists():- print(f"[错误] 文件不存在: {svg_file}")+ print(f"[Error] File does not exist: {svg_file}")return-+with open(svg_path, 'r', encoding='utf-8') as f:content = f.read()-+print(f"\n{'='*70}")- print(f"SVG 文件分析: {svg_path.name}")+ print(f"SVG File Analysis: {svg_path.name}")print(f"{'='*70}")-- # 提取 viewBox++ # Extract viewBoxviewbox_match = re.search(r'viewBox="([^"]+)"', content)if viewbox_match:- print(f"画布 viewBox: {viewbox_match.group(1)}")-- # 使用更健壮的方式提取元素(属性顺序无关)- # 提取所有 rect 元素+ print(f"Canvas viewBox: {viewbox_match.group(1)}")++ # Use more robust element extraction (attribute order independent)+ # Extract all rect elementsrect_elements = re.findall(r'<rect[^>]*/?>', content)rects = []for elem in rect_elements:@@ -1021,8 +1022,8 @@ def analyze_svg_file(svg_file: str) -> None:h = extract_attr(elem, 'height')if x is not None and y is not None:rects.append((x, y, w, h))-- # 提取所有 circle 元素++ # Extract all circle elementscircle_elements = re.findall(r'<circle[^>]*/?>', content)circles = []for elem in circle_elements:@@ -1031,183 +1032,183 @@ def analyze_svg_file(svg_file: str) -> None:r = extract_attr(elem, 'r')if cx is not None and cy is not None:circles.append((cx, cy, r))-- # 提取所有 polyline/polygon 元素++ # Extract all polyline/polygon elementspolylines = re.findall(r'<(?:polyline|polygon)[^>]*points="([^"]*)"', content)-- # 提取 path 元素++ # Extract path elementspaths = re.findall(r'<path[^>]*d="([^"]*)"', content)-- print(f"\n元素统计:")- print(f" - rect 矩形: {len(rects)} 个")- print(f" - circle 圆形: {len(circles)} 个")- print(f" - polyline/polygon: {len(polylines)} 个")- print(f" - path 路径: {len(paths)} 个")-- # 详细列出 rect 元素++ print(f"\nElement statistics:")+ print(f" - rect (rectangle): {len(rects)}")+ print(f" - circle: {len(circles)}")+ print(f" - polyline/polygon: {len(polylines)}")+ print(f" - path: {len(paths)}")++ # List rect elements in detailif rects:- print(f"\n=== 矩形元素 (rect) ===")- print(f"{'序号':<4} {'X':<8} {'Y':<8} {'宽度':<8} {'高度':<8}")+ print(f"\n=== Rectangle Elements (rect) ===")+ print(f"{'Index':<6}{'X':<8} {'Y':<8} {'Width':<8} {'Height':<8}")print("-" * 45)- for i, (x, y, w, h) in enumerate(rects[:20], 1): # 只显示前20个+ for i, (x, y, w, h) in enumerate(rects[:20], 1): # Only show first 20w_str = w if w else '-'h_str = h if h else '-'- print(f"{i:<4} {x:<8} {y:<8} {w_str:<8} {h_str:<8}")+ print(f"{i:<6}{x:<8} {y:<8} {w_str:<8} {h_str:<8}")if len(rects) > 20:- print(f"... 还有 {len(rects) - 20} 个矩形")-- # 详细列出 circle 元素+ print(f"... and {len(rects) - 20} more rectangle(s)")++ # List circle elements in detailif circles:- print(f"\n=== 圆形元素 (circle) ===")- print(f"{'序号':<4} {'CX':<10} {'CY':<10} {'半径':<8}")+ print(f"\n=== Circle Elements (circle) ===")+ print(f"{'Index':<6}{'CX':<10} {'CY':<10} {'Radius':<8}")print("-" * 40)for i, (cx, cy, r) in enumerate(circles[:20], 1):r_str = r if r else '-'- print(f"{i:<4} {cx:<10} {cy:<10} {r_str:<8}")+ print(f"{i:<6}{cx:<10} {cy:<10} {r_str:<8}")if len(circles) > 20:- print(f"... 还有 {len(circles) - 20} 个圆形")-- # 列出 polyline points+ print(f"... and {len(circles) - 20} more circle(s)")++ # List polyline pointsif polylines:- print(f"\n=== 折线/多边形 (polyline/polygon) ===")+ print(f"\n=== Polyline/Polygon (polyline/polygon) ===")for i, points in enumerate(polylines, 1):point_list = points.strip().split()- print(f"\n折线 {i} ({len(point_list)} 个点):")- # 解析并显示前几个点+ print(f"\nPolyline {i} ({len(point_list)} points):")+ # Parse and show first few pointsparsed_points = []for p in point_list[:5]:if ',' in p:x, y = p.split(',')parsed_points.append(f"({x},{y})")- print(f" 起始点: {' → '.join(parsed_points)}")+ print(f" Start points: {' -> '.join(parsed_points)}")if len(point_list) > 5:- print(f" ... 共 {len(point_list)} 个点")-+ print(f" ... {len(point_list)} points total")+print(f"\n{'='*70}")def interactive_mode() -> None:- """交互式计算模式"""+ """Interactive calculation mode"""print("\n" + "="*60)- print("SVG 位置计算器 - 交互模式")+ print("SVG Position Calculator - Interactive Mode")print("="*60)- print("\n选择图表类型:")- print(" 1. 柱状图 (bar)")- print(" 2. 饼图 (pie)")- print(" 3. 雷达图 (radar)")- print(" 4. 折线图 (line)")- print(" 5. 网格布局 (grid)")- print(" 6. 自定义折线 (custom)")- print(" 0. 退出")-+ print("\nSelect chart type:")+ print(" 1. Bar chart (bar)")+ print(" 2. Pie chart (pie)")+ print(" 3. Radar chart (radar)")+ print(" 4. Line chart (line)")+ print(" 5. Grid layout (grid)")+ print(" 6. Custom line (custom)")+ print(" 0. Exit")+while True:try:- choice = input("\n请选择 [1-6, 0退出]: ").strip()-+ choice = input("\nSelect [1-6, 0 to exit]: ").strip()+if choice == '0':- print("退出交互模式")+ print("Exiting interactive mode")break-+elif choice == '1':- print("\n=== 柱状图计算 ===")- data_str = input("输入数据 (格式: 标签1:值1,标签2:值2): ").strip()+ print("\n=== Bar Chart Calculation ===")+ data_str = input("Enter data (format: label1:value1,label2:value2): ").strip()if not data_str:- print("示例: 华东:185,华南:142,华北:128")+ print("Example: East:185,South:142,North:128")continue-- canvas = input("画布格式 [ppt169]: ").strip() or 'ppt169'++ canvas = input("Canvas format [ppt169]: ").strip() or 'ppt169'coord = CoordinateSystem(canvas)calc = BarChartCalculator(coord)data = parse_data_string(data_str)positions = calc.calculate(data)print()print(calc.format_table(positions))-+elif choice == '2':- print("\n=== 饼图计算 ===")- data_str = input("输入数据 (格式: 标签1:值1,标签2:值2): ").strip()+ print("\n=== Pie Chart Calculation ===")+ data_str = input("Enter data (format: label1:value1,label2:value2): ").strip()if not data_str:- print("示例: A:35,B:25,C:20,D:12,Other:8")+ print("Example: A:35,B:25,C:20,D:12,Other:8")continue-- center_str = input("圆心坐标 [420,400]: ").strip() or '420,400'- radius = float(input("半径 [200]: ").strip() or '200')-++ center_str = input("Center coordinates [420,400]: ").strip() or '420,400'+ radius = float(input("Radius [200]: ").strip() or '200')+center = parse_tuple(center_str)calc = PieChartCalculator(center, radius)data = parse_data_string(data_str)slices = calc.calculate(data)print()print(calc.format_table(slices))-+elif choice == '3':- print("\n=== 雷达图计算 ===")- data_str = input("输入数据 (格式: 维度1:值1,维度2:值2): ").strip()+ print("\n=== Radar Chart Calculation ===")+ data_str = input("Enter data (format: dim1:value1,dim2:value2): ").strip()if not data_str:- print("示例: 性能:90,安全:85,易用:75,价格:70")+ print("Example: Performance:90,Security:85,Usability:75,Price:70")continue-- center_str = input("圆心坐标 [640,400]: ").strip() or '640,400'- radius = float(input("半径 [200]: ").strip() or '200')-++ center_str = input("Center coordinates [640,400]: ").strip() or '640,400'+ radius = float(input("Radius [200]: ").strip() or '200')+center = parse_tuple(center_str)calc = RadarChartCalculator(center, radius)data = parse_data_string(data_str)points = calc.calculate(data)print()print(calc.format_table(points))-+elif choice == '4':- print("\n=== 折线图计算 ===")- data_str = input("输入数据 (格式: x1:y1,x2:y2): ").strip()+ print("\n=== Line Chart Calculation ===")+ data_str = input("Enter data (format: x1:y1,x2:y2): ").strip()if not data_str:- print("示例: 0:50,10:80,20:120,30:95")+ print("Example: 0:50,10:80,20:120,30:95")continue-- canvas = input("画布格式 [ppt169]: ").strip() or 'ppt169'++ canvas = input("Canvas format [ppt169]: ").strip() or 'ppt169'coord = CoordinateSystem(canvas)calc = LineChartCalculator(coord)data = parse_xy_data_string(data_str)points = calc.calculate(data)print()print(calc.format_table(points))-+elif choice == '5':- print("\n=== 网格布局计算 ===")- rows = int(input("行数: ").strip() or '2')- cols = int(input("列数: ").strip() or '3')- canvas = input("画布格式 [ppt169]: ").strip() or 'ppt169'-+ print("\n=== Grid Layout Calculation ===")+ rows = int(input("Rows: ").strip() or '2')+ cols = int(input("Columns: ").strip() or '3')+ canvas = input("Canvas format [ppt169]: ").strip() or 'ppt169'+coord = CoordinateSystem(canvas)calc = GridLayoutCalculator(coord)cells = calc.calculate(rows, cols)print()print(calc.format_table(cells))-+elif choice == '6':- print("\n=== 自定义折线计算 ===")- print("适用于自定义公式的折线图,如价格指数图")-- base_x = float(input("X起始值 [170]: ").strip() or '170')- step_x = float(input("X步长 [40]: ").strip() or '40')- base_y = float(input("Y基准值 [595]: ").strip() or '595')- scale_y = float(input("Y缩放系数 [20]: ").strip() or '20')- ref_value = float(input("参考基准值 [100]: ").strip() or '100')-- print(f"\n公式: X = {base_x} + 序号 × {step_x}")- print(f" Y = {base_y} - (数值 - {ref_value}) × {scale_y}")-- data_str = input("\n输入数据 (逗号分隔的数值): ").strip()+ print("\n=== Custom Line Calculation ===")+ print("For custom formula line charts, such as price index charts")++ base_x = float(input("X start value [170]: ").strip() or '170')+ step_x = float(input("X step [40]: ").strip() or '40')+ base_y = float(input("Y baseline [595]: ").strip() or '595')+ scale_y = float(input("Y scale factor [20]: ").strip() or '20')+ ref_value = float(input("Reference baseline value [100]: ").strip() or '100')++ print(f"\nFormula: X = {base_x} + index * {step_x}")+ print(f" Y = {base_y} - (value - {ref_value}) * {scale_y}")++ data_str = input("\nEnter data (comma-separated values): ").strip()if data_str:values = [float(v.strip()) for v in data_str.split(',')]- print(f"\n{'序号':<4} {'数值':<10} {'X':<8} {'Y':<8}")+ print(f"\n{'Index':<6}{'Value':<10} {'X':<8} {'Y':<8}")print("-" * 35)for i, v in enumerate(values, 1):x = base_x + i * step_xy = base_y - (v - ref_value) * scale_y- print(f"{i:<4} {v:<10.1f} {x:<8.0f} {y:<8.0f}")-- # 生成 polyline points+ print(f"{i:<6}{v:<10.1f} {x:<8.0f} {y:<8.0f}")++ # Generate polyline pointspoints_list = []for i, v in enumerate(values, 1):x = base_x + i * step_x@@ -1215,49 +1216,49 @@ def interactive_mode() -> None:points_list.append(f"{int(x)},{int(y)}")print(f"\npolyline points:")print(" ".join(points_list))-+else:- print("无效选择,请输入 1-6 或 0")-+ print("Invalid selection, please enter 1-6 or 0")+except KeyboardInterrupt:- print("\n退出交互模式")+ print("\nExiting interactive mode")breakexcept Exception as e:- print(f"错误: {e}")+ print(f"Error: {e}")def from_json_config(config_file: str) -> None:- """从 JSON 配置文件读取并计算"""+ """Read and calculate from JSON config file"""import json-+config_path = Path(config_file)if not config_path.exists():- print(f"[错误] 配置文件不存在: {config_file}")+ print(f"[Error] Config file does not exist: {config_file}")return-+with open(config_path, 'r', encoding='utf-8') as f:config = json.load(f)-+chart_type = config.get('type', 'bar')data = config.get('data', {})-- print(f"\n从配置文件加载: {config_path.name}")- print(f"图表类型: {chart_type}")-++ print(f"\nLoaded from config file: {config_path.name}")+ print(f"Chart type: {chart_type}")+if chart_type == 'bar':canvas = config.get('canvas', 'ppt169')coord = CoordinateSystem(canvas)calc = BarChartCalculator(coord)positions = calc.calculate(data)print(calc.format_table(positions))-+elif chart_type == 'pie':center = tuple(config.get('center', [420, 400]))radius = config.get('radius', 200)calc = PieChartCalculator(center, radius)slices = calc.calculate(data)print(calc.format_table(slices))-+elif chart_type == 'line':canvas = config.get('canvas', 'ppt169')coord = CoordinateSystem(canvas)@@ -1266,220 +1267,219 @@ def from_json_config(config_file: str) -> None:points_data = [(p[0], p[1]) for p in data]points = calc.calculate(points_data)print(calc.format_table(points))-+elif chart_type == 'custom_line':- # 自定义折线图+ # Custom line chartbase_x = config.get('base_x', 170)step_x = config.get('step_x', 40)base_y = config.get('base_y', 595)scale_y = config.get('scale_y', 20)ref_value = config.get('ref_value', 100)values = config.get('values', [])-- print(f"\n公式: X = {base_x} + 序号 × {step_x}")- print(f" Y = {base_y} - (数值 - {ref_value}) × {scale_y}")- print(f"\n{'序号':<4} {'数值':<10} {'X':<8} {'Y':<8}")++ print(f"\nFormula: X = {base_x} + index * {step_x}")+ print(f" Y = {base_y} - (value - {ref_value}) * {scale_y}")+ print(f"\n{'Index':<6}{'Value':<10} {'X':<8} {'Y':<8}")print("-" * 35)-+points_list = []for i, v in enumerate(values, 1):x = base_x + i * step_xy = base_y - (v - ref_value) * scale_y- print(f"{i:<4} {v:<10.1f} {x:<8.0f} {y:<8.0f}")+ print(f"{i:<6}{v:<10.1f} {x:<8.0f} {y:<8.0f}")points_list.append(f"{int(x)},{int(y)}")-+print(f"\npolyline points:")print(" ".join(points_list))def main():parser = argparse.ArgumentParser(- description='SVG 位置计算与验证工具',+ description='SVG Position Calculation and Validation Tool',formatter_class=argparse.RawDescriptionHelpFormatter,epilog="""-常用命令:- # 分析 SVG 文件+Common commands:+ # Analyze SVG filepython svg_position_calculator.py analyze example.svg-- # 交互式模式++ # Interactive modepython svg_position_calculator.py interactive-- # 从 JSON 配置计算++ # Calculate from JSON configpython svg_position_calculator.py from-json config.json-- # 快速计算- python svg_position_calculator.py calc bar --data "华东:185,华南:142"++ # Quick calculation+ python svg_position_calculator.py calc bar --data "East:185,South:142"python svg_position_calculator.py calc pie --data "A:35,B:25,C:20"python svg_position_calculator.py calc line --data "0:50,10:80,20:120"""")-- subparsers = parser.add_subparsers(dest='command', help='命令')-- # calc 子命令- calc_parser = subparsers.add_parser('calc', help='计算坐标')- calc_subparsers = calc_parser.add_subparsers(dest='chart_type', help='图表类型')-- # 柱状图- bar_parser = calc_subparsers.add_parser('bar', help='柱状图')- bar_parser.add_argument('--data', required=True, help='数据 "标签1:值1,标签2:值2"')- bar_parser.add_argument('--canvas', default='ppt169', help='画布格式')- bar_parser.add_argument('--area', help='图表区域 "x_min,y_min,x_max,y_max"')- bar_parser.add_argument('--bar-width', type=float, default=50, help='柱宽')- bar_parser.add_argument('--horizontal', action='store_true', help='水平柱状图')-- # 饼图- pie_parser = calc_subparsers.add_parser('pie', help='饼图/环形图')- pie_parser.add_argument('--data', required=True, help='数据 "标签1:值1,标签2:值2"')- pie_parser.add_argument('--center', default='420,400', help='圆心 "x,y"')- pie_parser.add_argument('--radius', type=float, default=200, help='半径')- pie_parser.add_argument('--inner-radius', type=float, default=0, help='内半径(环形图)')- pie_parser.add_argument('--start-angle', type=float, default=-90, help='起始角度')-- # 雷达图- radar_parser = calc_subparsers.add_parser('radar', help='雷达图')- radar_parser.add_argument('--data', required=True, help='数据 "维度1:值1,维度2:值2"')- radar_parser.add_argument('--center', default='640,400', help='圆心 "x,y"')- radar_parser.add_argument('--radius', type=float, default=200, help='半径')- radar_parser.add_argument('--max-value', type=float, help='最大值')-- # 折线图/散点图- line_parser = calc_subparsers.add_parser('line', help='折线图/散点图')- line_parser.add_argument('--data', required=True, help='数据 "x1:y1,x2:y2"')- line_parser.add_argument('--canvas', default='ppt169', help='画布格式')- line_parser.add_argument('--area', help='图表区域 "x_min,y_min,x_max,y_max"')- line_parser.add_argument('--x-range', help='X 轴范围 "min,max"')- line_parser.add_argument('--y-range', help='Y 轴范围 "min,max"')-- # 网格布局- grid_parser = calc_subparsers.add_parser('grid', help='网格布局')- grid_parser.add_argument('--rows', type=int, required=True, help='行数')- grid_parser.add_argument('--cols', type=int, required=True, help='列数')- grid_parser.add_argument('--canvas', default='ppt169', help='画布格式')- grid_parser.add_argument('--area', help='图表区域 "x_min,y_min,x_max,y_max"')- grid_parser.add_argument('--padding', type=float, default=20, help='内边距')- grid_parser.add_argument('--gap', type=float, default=20, help='间距')-- # validate 子命令- validate_parser = subparsers.add_parser('validate', help='验证 SVG')- validate_parser.add_argument('svg_file', help='SVG 文件路径')- validate_parser.add_argument('--extract', action='store_true', help='提取所有位置信息')- validate_parser.add_argument('--tolerance', type=float, default=1.0, help='容差(像素)')-- # analyze 子命令 - 分析 SVG 文件- analyze_parser = subparsers.add_parser('analyze', help='分析 SVG 文件中的图表元素')- analyze_parser.add_argument('svg_file', help='SVG 文件路径')-- # interactive 子命令 - 交互模式- subparsers.add_parser('interactive', help='交互式计算模式')-- # from-json 子命令 - 从配置文件读取- json_parser = subparsers.add_parser('from-json', help='从 JSON 配置文件计算')- json_parser.add_argument('config_file', help='JSON 配置文件路径')-++ subparsers = parser.add_subparsers(dest='command', help='Command')++ # calc subcommand+ calc_parser = subparsers.add_parser('calc', help='Calculate coordinates')+ calc_subparsers = calc_parser.add_subparsers(dest='chart_type', help='Chart type')++ # Bar chart+ bar_parser = calc_subparsers.add_parser('bar', help='Bar chart')+ bar_parser.add_argument('--data', required=True, help='Data "label1:value1,label2:value2"')+ bar_parser.add_argument('--canvas', default='ppt169', help='Canvas format')+ bar_parser.add_argument('--area', help='Chart area "x_min,y_min,x_max,y_max"')+ bar_parser.add_argument('--bar-width', type=float, default=50, help='Bar width')+ bar_parser.add_argument('--horizontal', action='store_true', help='Horizontal bar chart')++ # Pie chart+ pie_parser = calc_subparsers.add_parser('pie', help='Pie / donut chart')+ pie_parser.add_argument('--data', required=True, help='Data "label1:value1,label2:value2"')+ pie_parser.add_argument('--center', default='420,400', help='Center "x,y"')+ pie_parser.add_argument('--radius', type=float, default=200, help='Radius')+ pie_parser.add_argument('--inner-radius', type=float, default=0, help='Inner radius (donut chart)')+ pie_parser.add_argument('--start-angle', type=float, default=-90, help='Start angle')++ # Radar chart+ radar_parser = calc_subparsers.add_parser('radar', help='Radar chart')+ radar_parser.add_argument('--data', required=True, help='Data "dim1:value1,dim2:value2"')+ radar_parser.add_argument('--center', default='640,400', help='Center "x,y"')+ radar_parser.add_argument('--radius', type=float, default=200, help='Radius')+ radar_parser.add_argument('--max-value', type=float, help='Maximum value')++ # Line / scatter chart+ line_parser = calc_subparsers.add_parser('line', help='Line / scatter chart')+ line_parser.add_argument('--data', required=True, help='Data "x1:y1,x2:y2"')+ line_parser.add_argument('--canvas', default='ppt169', help='Canvas format')+ line_parser.add_argument('--area', help='Chart area "x_min,y_min,x_max,y_max"')+ line_parser.add_argument('--x-range', help='X axis range "min,max"')+ line_parser.add_argument('--y-range', help='Y axis range "min,max"')++ # Grid layout+ grid_parser = calc_subparsers.add_parser('grid', help='Grid layout')+ grid_parser.add_argument('--rows', type=int, required=True, help='Number of rows')+ grid_parser.add_argument('--cols', type=int, required=True, help='Number of columns')+ grid_parser.add_argument('--canvas', default='ppt169', help='Canvas format')+ grid_parser.add_argument('--area', help='Chart area "x_min,y_min,x_max,y_max"')+ grid_parser.add_argument('--padding', type=float, default=20, help='Inner padding')+ grid_parser.add_argument('--gap', type=float, default=20, help='Spacing')++ # validate subcommand+ validate_parser = subparsers.add_parser('validate', help='Validate SVG')+ validate_parser.add_argument('svg_file', help='SVG file path')+ validate_parser.add_argument('--extract', action='store_true', help='Extract all position information')+ validate_parser.add_argument('--tolerance', type=float, default=1.0, help='Tolerance (pixels)')++ # analyze subcommand - analyze SVG file+ analyze_parser = subparsers.add_parser('analyze', help='Analyze chart elements in SVG file')+ analyze_parser.add_argument('svg_file', help='SVG file path')++ # interactive subcommand - interactive mode+ subparsers.add_parser('interactive', help='Interactive calculation mode')++ # from-json subcommand - read from config file+ json_parser = subparsers.add_parser('from-json', help='Calculate from JSON config file')+ json_parser.add_argument('config_file', help='JSON config file path')+args = parser.parse_args()-+if args.command == 'calc':- # 解析图表区域+ # Parse chart areachart_area = Noneif hasattr(args, 'area') and args.area:parts = parse_tuple(args.area)chart_area = ChartArea(parts[0], parts[1], parts[2], parts[3])-+if args.chart_type == 'bar':canvas = args.canvas if hasattr(args, 'canvas') else 'ppt169'coord = CoordinateSystem(canvas, chart_area)calc = BarChartCalculator(coord)data = parse_data_string(args.data)positions = calc.calculate(data, bar_width=args.bar_width, horizontal=args.horizontal)-- print(f"\n=== 柱状图坐标计算 ===")- print(f"画布: {CANVAS_FORMATS.get(canvas, {}).get('dimensions', canvas)}")- print(f"图表区域: ({coord.chart_area.x_min}, {coord.chart_area.y_min}) - "++ print(f"\n=== Bar Chart Coordinate Calculation ===")+ print(f"Canvas: {CANVAS_FORMATS.get(canvas, {}).get('dimensions', canvas)}")+ print(f"Chart area: ({coord.chart_area.x_min}, {coord.chart_area.y_min}) - "f"({coord.chart_area.x_max}, {coord.chart_area.y_max})")print()print(calc.format_table(positions))-+elif args.chart_type == 'pie':center = parse_tuple(args.center)calc = PieChartCalculator(center, args.radius)data = parse_data_string(args.data)slices = calc.calculate(data, start_angle=args.start_angle, inner_radius=args.inner_radius)-- print(f"\n=== 饼图扇区计算 ===")++ print(f"\n=== Pie Chart Slice Calculation ===")print(calc.format_table(slices))-+elif args.chart_type == 'radar':center = parse_tuple(args.center)calc = RadarChartCalculator(center, args.radius)data = parse_data_string(args.data)points = calc.calculate(data, max_value=args.max_value)-- print(f"\n=== 雷达图顶点计算 ===")++ print(f"\n=== Radar Chart Vertex Calculation ===")print(calc.format_table(points))-+elif args.chart_type == 'line':canvas = args.canvas if hasattr(args, 'canvas') else 'ppt169'coord = CoordinateSystem(canvas, chart_area)calc = LineChartCalculator(coord)data = parse_xy_data_string(args.data)-+x_range = parse_tuple(args.x_range) if args.x_range else Noney_range = parse_tuple(args.y_range) if args.y_range else None-+points = calc.calculate(data, x_range, y_range)-- print(f"\n=== 折线图/散点图坐标计算 ===")- print(f"画布: {CANVAS_FORMATS.get(canvas, {}).get('dimensions', canvas)}")++ print(f"\n=== Line / Scatter Chart Coordinate Calculation ===")+ print(f"Canvas: {CANVAS_FORMATS.get(canvas, {}).get('dimensions', canvas)}")print(calc.format_table(points))-+elif args.chart_type == 'grid':canvas = args.canvas if hasattr(args, 'canvas') else 'ppt169'coord = CoordinateSystem(canvas, chart_area)calc = GridLayoutCalculator(coord)cells = calc.calculate(args.rows, args.cols, args.padding, args.gap)-- print(f"\n=== 网格布局计算 ({args.rows}×{args.cols}) ===")- print(f"画布: {CANVAS_FORMATS.get(canvas, {}).get('dimensions', canvas)}")++ print(f"\n=== Grid Layout Calculation ({args.rows}x{args.cols}) ===")+ print(f"Canvas: {CANVAS_FORMATS.get(canvas, {}).get('dimensions', canvas)}")print(calc.format_table(cells))-+else:parser.print_help()-+elif args.command == 'validate':validator = SVGPositionValidator(tolerance=args.tolerance)-+if args.extract:- # 提取模式+ # Extract modewith open(args.svg_file, 'r', encoding='utf-8') as f:content = f.read()-+positions = validator.extract_all_positions(content)-- print(f"\n=== 提取的元素位置 ===")- print(f"文件: {args.svg_file}")++ print(f"\n=== Extracted Element Positions ===")+ print(f"File: {args.svg_file}")print()-+for element_id, attrs in positions.items():print(f"{element_id}:")for attr, value in attrs.items():print(f" {attr}: {value}")else:- print("验证模式需要提供期望坐标文件,请使用 --extract 先提取坐标")-+ print("Validation mode requires an expected coordinates file; use --extract to extract coordinates first")+elif args.command == 'analyze':analyze_svg_file(args.svg_file)-+elif args.command == 'interactive':interactive_mode()-+elif args.command == 'from-json':from_json_config(args.config_file)-+else:parser.print_help()if __name__ == '__main__':main()-diff --git a/skills/ppt-master/scripts/svg_quality_checker.py b/skills/ppt-master/scripts/svg_quality_checker.pyindex 40002950..19da4cec 100644--- a/skills/ppt-master/scripts/svg_quality_checker.py+++ b/skills/ppt-master/scripts/svg_quality_checker.py@@ -1,10 +1,10 @@#!/usr/bin/env python3"""-PPT Master - SVG 质量检查工具+PPT Master - SVG Quality Check Tool-检查 SVG 文件是否符合项目技术规范。+Checks whether SVG files comply with project technical specifications.-用法:+Usage:python3 scripts/svg_quality_checker.py <svg_file>python3 scripts/svg_quality_checker.py <directory>python3 scripts/svg_quality_checker.py --all examples@@ -20,13 +20,13 @@ try:from project_utils import CANVAS_FORMATSfrom error_helper import ErrorHelperexcept ImportError:- print("警告: 无法导入依赖模块")+ print("Warning: Unable to import dependency modules")CANVAS_FORMATS = {}ErrorHelper = Noneclass SVGQualityChecker:- """SVG 质量检查器"""+ """SVG quality checker"""def __init__(self):self.results = []@@ -40,14 +40,14 @@ class SVGQualityChecker:def check_file(self, svg_file: str, expected_format: str = None) -> Dict:"""- 检查单个 SVG 文件+ Check a single SVG fileArgs:- svg_file: SVG 文件路径- expected_format: 期望的画布格式(如 'ppt169')+ svg_file: SVG file path+ expected_format: Expected canvas format (e.g., 'ppt169')Returns:- 检查结果字典+ Check result dictionary"""svg_path = Path(svg_file)@@ -55,7 +55,7 @@ class SVGQualityChecker:return {'file': str(svg_file),'exists': False,- 'errors': ['文件不存在'],+ 'errors': ['File does not exist'],'warnings': [],'passed': False}@@ -74,29 +74,29 @@ class SVGQualityChecker:with open(svg_path, 'r', encoding='utf-8') as f:content = f.read()- # 1. 检查 viewBox+ # 1. Check viewBoxself._check_viewbox(content, result, expected_format)- # 2. 检查禁用元素+ # 2. Check forbidden elementsself._check_forbidden_elements(content, result)- # 3. 检查字体+ # 3. Check fontsself._check_fonts(content, result)- # 4. 检查 width/height 与 viewBox 一致性+ # 4. Check width/height consistency with viewBoxself._check_dimensions(content, result)- # 5. 检查文本换行方式+ # 5. Check text wrapping methodsself._check_text_elements(content, result)- # 判断是否通过+ # Determine pass/failresult['passed'] = len(result['errors']) == 0except Exception as e:- result['errors'].append(f"读取文件失败: {e}")+ result['errors'].append(f"Failed to read file: {e}")result['passed'] = False- # 更新统计+ # Update statisticsself.summary['total'] += 1if result['passed']:if result['warnings']:@@ -106,7 +106,7 @@ class SVGQualityChecker:else:self.summary['errors'] += 1- # 统计问题类型+ # Categorize issue typesfor error in result['errors']:self.issue_types[self._categorize_issue(error)] += 1@@ -114,110 +114,110 @@ class SVGQualityChecker:return resultdef _check_viewbox(self, content: str, result: Dict, expected_format: str = None):- """检查 viewBox 属性"""+ """Check viewBox attribute"""viewbox_match = re.search(r'viewBox="([^"]+)"', content)if not viewbox_match:- result['errors'].append("缺少 viewBox 属性")+ result['errors'].append("Missing viewBox attribute")returnviewbox = viewbox_match.group(1)result['info']['viewbox'] = viewbox- # 检查格式+ # Check formatif not re.match(r'0 0 \d+ \d+', viewbox):- result['warnings'].append(f"viewBox 格式异常: {viewbox}")+ result['warnings'].append(f"Unusual viewBox format: {viewbox}")- # 检查是否与期望格式匹配+ # Check if it matches expected formatif expected_format and expected_format in CANVAS_FORMATS:expected_viewbox = CANVAS_FORMATS[expected_format]['viewbox']if viewbox != expected_viewbox:result['errors'].append(- f"viewBox 不匹配: 期望 '{expected_viewbox}', 实际 '{viewbox}'"+ f"viewBox mismatch: expected '{expected_viewbox}', got '{viewbox}'")def _check_forbidden_elements(self, content: str, result: Dict):- """检查禁用元素(黑名单)"""+ """Check forbidden elements (blocklist)"""content_lower = content.lower()# ============================================================- # 禁用元素黑名单 - PPT 不兼容+ # Forbidden elements blocklist - PPT incompatible# ============================================================- # 裁剪 / 遮罩+ # Clipping / maskingif '<clippath' in content_lower:- result['errors'].append("检测到禁用的 <clipPath> 元素(PPT 不支持 SVG 裁剪路径)")+ result['errors'].append("Detected forbidden <clipPath> element (PPT does not support SVG clip paths)")if '<mask' in content_lower:- result['errors'].append("检测到禁用的 <mask> 元素(PPT 不支持 SVG 遮罩)")+ result['errors'].append("Detected forbidden <mask> element (PPT does not support SVG masks)")- # 样式系统+ # Style systemif '<style' in content_lower:- result['errors'].append("检测到禁用的 <style> 元素(使用内联属性替代)")+ result['errors'].append("Detected forbidden <style> element (use inline attributes instead)")if re.search(r'\bclass\s*=', content):- result['errors'].append("检测到禁用的 class 属性(使用内联样式替代)")- # id 属性:仅当同时存在 <style> 时才报错(id 配合 CSS 选择器才有害)- # <defs> 内的 linearGradient/filter 等必须使用 id,Inkscape 也会自动为元素添加 id,- # 这些单独存在的 id 对 PPT 导出无影响+ result['errors'].append("Detected forbidden class attribute (use inline styles instead)")+ # id attribute: only report error when <style> also exists (id is harmful only with CSS selectors)+ # id inside <defs> for linearGradient/filter etc. is required, Inkscape also auto-adds id to elements,+ # standalone id attributes have no impact on PPT exportif '<style' in content_lower and re.search(r'\bid\s*=', content):result['errors'].append(- "检测到 id 属性与 <style> 配合使用(禁止 CSS 选择器,使用内联样式替代)"+ "Detected id attribute used with <style> (CSS selectors forbidden, use inline styles instead)")if re.search(r'<\?xml-stylesheet\b', content_lower):- result['errors'].append("检测到禁用的 xml-stylesheet(禁止引用外部 CSS)")+ result['errors'].append("Detected forbidden xml-stylesheet (external CSS references forbidden)")if re.search(r'<link[^>]*rel\s*=\s*["\']stylesheet["\']', content_lower):- result['errors'].append("检测到禁用的 <link rel=\"stylesheet\">(禁止引用外部 CSS)")+ result['errors'].append("Detected forbidden <link rel=\"stylesheet\"> (external CSS references forbidden)")if re.search(r'@import\s+', content_lower):- result['errors'].append("检测到禁用的 @import(禁止引用外部 CSS)")+ result['errors'].append("Detected forbidden @import (external CSS references forbidden)")- # 结构 / 嵌套+ # Structure / nestingif '<foreignobject' in content_lower:result['errors'].append(- "检测到禁用的 <foreignObject> 元素(使用 <tspan> 手动换行)")+ "Detected forbidden <foreignObject> element (use <tspan> for manual line breaks)")has_symbol = '<symbol' in content_lowerhas_use = re.search(r'<use\b', content_lower) is not Noneif has_symbol and has_use:- result['errors'].append("检测到禁用的 <symbol> + <use> 复杂用法(请改用基础形状或简单 <use>)")+ result['errors'].append("Detected forbidden <symbol> + <use> complex usage (use basic shapes or simple <use> instead)")if '<marker' in content_lower:- result['errors'].append("检测到禁用的 <marker> 元素(PPT 不支持 SVG marker)")+ result['errors'].append("Detected forbidden <marker> element (PPT does not support SVG markers)")if re.search(r'\bmarker-end\s*=', content_lower):- result['errors'].append("检测到禁用的 marker-end 属性(请用 line + polygon 代替)")+ result['errors'].append("Detected forbidden marker-end attribute (use line + polygon instead)")- # 文本 / 字体+ # Text / fontsif '<textpath' in content_lower:- result['errors'].append("检测到禁用的 <textPath> 元素(路径文本不兼容 PPT)")+ result['errors'].append("Detected forbidden <textPath> element (path text is incompatible with PPT)")if '@font-face' in content_lower:- result['errors'].append("检测到禁用的 @font-face(使用系统字体栈)")+ result['errors'].append("Detected forbidden @font-face (use system font stack)")- # 动画 / 交互+ # Animation / interactionif re.search(r'<animate', content_lower):- result['errors'].append("检测到禁用的 SMIL 动画元素 <animate*>(SVG 动画不导出)")+ result['errors'].append("Detected forbidden SMIL animation element <animate*> (SVG animations are not exported)")if re.search(r'<set\b', content_lower):- result['errors'].append("检测到禁用的 SMIL 动画元素 <set>(SVG 动画不导出)")+ result['errors'].append("Detected forbidden SMIL animation element <set> (SVG animations are not exported)")if '<script' in content_lower:- result['errors'].append("检测到禁用的 <script> 元素(禁止脚本和事件处理)")- if re.search(r'\bon\w+\s*=', content): # onclick, onload 等- result['errors'].append("检测到禁用的事件属性(如 onclick, onload)")+ result['errors'].append("Detected forbidden <script> element (scripts and event handlers forbidden)")+ if re.search(r'\bon\w+\s*=', content): # onclick, onload etc.+ result['errors'].append("Detected forbidden event attributes (e.g., onclick, onload)")- # 其他不推荐的元素+ # Other discouraged elementsif '<iframe' in content_lower:- result['errors'].append("检测到 <iframe> 元素(不应出现在 SVG 中)")+ result['errors'].append("Detected <iframe> element (should not appear in SVG)")if re.search(r'rgba\s*\(', content_lower):- result['errors'].append("检测到禁用的 rgba() 颜色(请用 fill-opacity/stroke-opacity)")+ result['errors'].append("Detected forbidden rgba() color (use fill-opacity/stroke-opacity instead)")if re.search(r'<g[^>]*\sopacity\s*=', content_lower):- result['errors'].append("检测到禁用的 <g opacity>(请为子元素单独设置透明度)")+ result['errors'].append("Detected forbidden <g opacity> (set opacity on each child element individually)")if re.search(r'<image[^>]*\sopacity\s*=', content_lower):- result['errors'].append("检测到禁用的 <image opacity>(请使用遮罩层方案)")+ result['errors'].append("Detected forbidden <image opacity> (use overlay mask approach)")def _check_fonts(self, content: str, result: Dict):- """检查字体使用"""- # 查找 font-family 声明+ """Check font usage"""+ # Find font-family declarationsfont_matches = re.findall(r'font-family[:\s]*["\']([^"\']+)["\']', content, re.IGNORECASE)if font_matches:result['info']['fonts'] = list(set(font_matches))- # 检查是否使用了系统 UI 字体栈+ # Check if system UI font stack is usedrecommended_fonts = ['system-ui', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI']@@ -227,76 +227,76 @@ class SVGQualityChecker:if not has_recommended:result['warnings'].append(- f"建议使用系统 UI 字体栈,当前: {font_family}"+ f"Recommend using system UI font stack, current: {font_family}")- break # 只警告一次+ break # Only warn oncedef _check_dimensions(self, content: str, result: Dict):- """检查 width/height 与 viewBox 的一致性"""+ """Check width/height consistency with viewBox"""width_match = re.search(r'width="(\d+)"', content)height_match = re.search(r'height="(\d+)"', content)if width_match and height_match:width = width_match.group(1)height = height_match.group(1)- result['info']['dimensions'] = f"{width}×{height}"+ result['info']['dimensions'] = f"{width}x{height}"- # 检查是否与 viewBox 一致+ # Check consistency with viewBoxif 'viewbox' in result['info']:viewbox_parts = result['info']['viewbox'].split()if len(viewbox_parts) == 4:vb_width, vb_height = viewbox_parts[2], viewbox_parts[3]if width != vb_width or height != vb_height:result['warnings'].append(- f"width/height ({width}×{height}) 与 viewBox "- f"({vb_width}×{vb_height}) 不一致"+ f"width/height ({width}x{height}) does not match viewBox "+ f"({vb_width}x{vb_height})")def _check_text_elements(self, content: str, result: Dict):- """检查文本元素和换行方式"""- # 统计 text 和 tspan 元素+ """Check text elements and wrapping methods"""+ # Count text and tspan elementstext_count = content.count('<text')tspan_count = content.count('<tspan')result['info']['text_elements'] = text_countresult['info']['tspan_elements'] = tspan_count- # 检查是否有过长的单行文本(可能需要换行)+ # Check for overly long single-line text (may need wrapping)text_matches = re.findall(r'<text[^>]*>([^<]{100,})</text>', content)if text_matches:result['warnings'].append(- f"检测到 {len(text_matches)} 个可能过长的单行文本(建议使用 tspan 换行)"+ f"Detected {len(text_matches)} potentially overly long single-line text(s) (consider using tspan for wrapping)")def _categorize_issue(self, error_msg: str) -> str:- """分类问题类型"""+ """Categorize issue type"""if 'viewBox' in error_msg:- return 'viewBox 问题'+ return 'viewBox issues'elif 'foreignObject' in error_msg:return 'foreignObject'- elif '字体' in error_msg or 'font' in error_msg:- return '字体问题'+ elif 'font' in error_msg.lower():+ return 'Font issues'else:- return '其他'+ return 'Other'def check_directory(self, directory: str, expected_format: str = None) -> List[Dict]:"""- 检查目录下的所有 SVG 文件+ Check all SVG files in a directoryArgs:- directory: 目录路径- expected_format: 期望的画布格式+ directory: Directory path+ expected_format: Expected canvas formatReturns:- 检查结果列表+ List of check results"""dir_path = Path(directory)if not dir_path.exists():- print(f"[ERROR] 目录不存在: {directory}")+ print(f"[ERROR] Directory does not exist: {directory}")return []- # 查找所有 SVG 文件+ # Find all SVG filesif dir_path.is_file():svg_files = [dir_path]else:@@ -306,10 +306,10 @@ class SVGQualityChecker:svg_files = sorted(svg_output.glob('*.svg'))if not svg_files:- print(f"[WARN] 未找到 SVG 文件")+ print(f"[WARN] No SVG files found")return []- print(f"\n[SCAN] 检查 {len(svg_files)} 个 SVG 文件...\n")+ print(f"\n[SCAN] Checking {len(svg_files)} SVG file(s)...\n")for svg_file in svg_files:result = self.check_file(str(svg_file), expected_format)@@ -318,21 +318,21 @@ class SVGQualityChecker:return self.resultsdef _print_result(self, result: Dict):- """打印单个文件的检查结果"""+ """Print check result for a single file"""if result['passed']:if result['warnings']:icon = "[WARN]"- status = "通过(有警告)"+ status = "Passed (with warnings)"else:icon = "[OK]"- status = "通过"+ status = "Passed"else:icon = "[ERROR]"- status = "失败"+ status = "Failed"print(f"{icon} {result['file']} - {status}")- # 显示基本信息+ # Display basic infoif result['info']:info_items = []if 'viewbox' in result['info']:@@ -340,99 +340,99 @@ class SVGQualityChecker:if info_items:print(f" {' | '.join(info_items)}")- # 显示错误+ # Display errorsif result['errors']:for error in result['errors']:print(f" [ERROR] {error}")- # 显示警告+ # Display warningsif result['warnings']:- for warning in result['warnings'][:2]: # 只显示前2个警告+ for warning in result['warnings'][:2]: # Only show first 2 warningsprint(f" [WARN] {warning}")if len(result['warnings']) > 2:- print(f" ... 还有 {len(result['warnings']) - 2} 个警告")+ print(f" ... and {len(result['warnings']) - 2} more warning(s)")print()def print_summary(self):- """打印检查摘要"""+ """Print check summary"""print("=" * 80)- print("[SUMMARY] 检查摘要")+ print("[SUMMARY] Check Summary")print("=" * 80)- print(f"\n总文件数: {self.summary['total']}")+ print(f"\nTotal files: {self.summary['total']}")print(- f" [OK] 完全通过: {self.summary['passed']} ({self._percentage(self.summary['passed'])}%)")+ f" [OK] Fully passed: {self.summary['passed']} ({self._percentage(self.summary['passed'])}%)")print(- f" [WARN] 有警告: {self.summary['warnings']} ({self._percentage(self.summary['warnings'])}%)")+ f" [WARN] With warnings: {self.summary['warnings']} ({self._percentage(self.summary['warnings'])}%)")print(- f" [ERROR] 有错误: {self.summary['errors']} ({self._percentage(self.summary['errors'])}%)")+ f" [ERROR] With errors: {self.summary['errors']} ({self._percentage(self.summary['errors'])}%)")if self.issue_types:- print(f"\n问题分类:")+ print(f"\nIssue categories:")for issue_type, count in sorted(self.issue_types.items(), key=lambda x: x[1], reverse=True):- print(f" {issue_type}: {count} 个")+ print(f" {issue_type}: {count}")- # 修复建议+ # Fix suggestionsif self.summary['errors'] > 0 or self.summary['warnings'] > 0:- print(f"\n[TIP] 常见修复方法:")- print(f" 1. viewBox 问题: 确保与画布格式一致(参考 references/canvas-formats.md)")- print(f" 2. foreignObject: 改用 <text> + <tspan> 进行手动换行")- print(f" 3. 字体问题: 使用系统 UI 字体栈")+ print(f"\n[TIP] Common fixes:")+ print(f" 1. viewBox issues: Ensure consistency with canvas format (see references/canvas-formats.md)")+ print(f" 2. foreignObject: Use <text> + <tspan> for manual line breaks")+ print(f" 3. Font issues: Use system UI font stack")def _percentage(self, count: int) -> int:- """计算百分比"""+ """Calculate percentage"""if self.summary['total'] == 0:return 0return int(count / self.summary['total'] * 100)def export_report(self, output_file: str = 'svg_quality_report.txt'):- """导出检查报告"""+ """Export check report"""with open(output_file, 'w', encoding='utf-8') as f:- f.write("PPT Master SVG 质量检查报告\n")+ f.write("PPT Master SVG Quality Check Report\n")f.write("=" * 80 + "\n\n")for result in self.results:- status = "[OK] 通过" if result['passed'] else "[ERROR] 失败"+ status = "[OK] Passed" if result['passed'] else "[ERROR] Failed"f.write(f"{status} - {result['file']}\n")- f.write(f"路径: {result.get('path', 'N/A')}\n")+ f.write(f"Path: {result.get('path', 'N/A')}\n")if result['info']:- f.write(f"信息: {result['info']}\n")+ f.write(f"Info: {result['info']}\n")if result['errors']:- f.write(f"\n错误:\n")+ f.write(f"\nErrors:\n")for error in result['errors']:f.write(f" - {error}\n")if result['warnings']:- f.write(f"\n警告:\n")+ f.write(f"\nWarnings:\n")for warning in result['warnings']:f.write(f" - {warning}\n")f.write("\n" + "-" * 80 + "\n\n")- # 写入摘要+ # Write summaryf.write("\n" + "=" * 80 + "\n")- f.write("检查摘要\n")+ f.write("Check Summary\n")f.write("=" * 80 + "\n\n")- f.write(f"总文件数: {self.summary['total']}\n")- f.write(f"完全通过: {self.summary['passed']}\n")- f.write(f"有警告: {self.summary['warnings']}\n")- f.write(f"有错误: {self.summary['errors']}\n")+ f.write(f"Total files: {self.summary['total']}\n")+ f.write(f"Fully passed: {self.summary['passed']}\n")+ f.write(f"With warnings: {self.summary['warnings']}\n")+ f.write(f"With errors: {self.summary['errors']}\n")- print(f"\n[REPORT] 检查报告已导出: {output_file}")+ print(f"\n[REPORT] Check report exported: {output_file}")def main():- """主函数"""+ """Main function"""if len(sys.argv) < 2:- print("PPT Master - SVG 质量检查工具\n")- print("用法:")+ print("PPT Master - SVG Quality Check Tool\n")+ print("Usage:")print(" python3 scripts/svg_quality_checker.py <svg_file>")print(" python3 scripts/svg_quality_checker.py <directory>")print(" python3 scripts/svg_quality_checker.py --all examples")- print("\n示例:")+ print("\nExamples:")print(" python3 scripts/svg_quality_checker.py examples/project/svg_output/slide_01.svg")print(" python3 scripts/svg_quality_checker.py examples/project/svg_output")print(" python3 scripts/svg_quality_checker.py examples/project")@@ -440,7 +440,7 @@ def main():checker = SVGQualityChecker()- # 解析参数+ # Parse argumentstarget = sys.argv[1]expected_format = None@@ -449,25 +449,25 @@ def main():if idx + 1 < len(sys.argv):expected_format = sys.argv[idx + 1]- # 执行检查+ # Execute checkif target == '--all':- # 检查所有示例项目+ # Check all example projectsbase_dir = sys.argv[2] if len(sys.argv) > 2 else 'examples'from project_utils import find_all_projectsprojects = find_all_projects(base_dir)for project in projects:print(f"\n{'=' * 80}")- print(f"检查项目: {project.name}")+ print(f"Checking project: {project.name}")print('=' * 80)checker.check_directory(str(project))else:checker.check_directory(target, expected_format)- # 打印摘要+ # Print summarychecker.print_summary()- # 导出报告(如果指定)+ # Export report (if specified)if '--export' in sys.argv:output_file = 'svg_quality_report.txt'if '--output' in sys.argv:@@ -476,7 +476,7 @@ def main():output_file = sys.argv[idx + 1]checker.export_report(output_file)- # 返回退出码+ # Return exit codeif checker.summary['errors'] > 0:sys.exit(1)else:diff --git a/skills/ppt-master/scripts/svg_rect_to_path.py b/skills/ppt-master/scripts/svg_rect_to_path.pyindex 45749237..d0ee3e55 100644--- a/skills/ppt-master/scripts/svg_rect_to_path.py+++ b/skills/ppt-master/scripts/svg_rect_to_path.py@@ -1,22 +1,22 @@#!/usr/bin/env python3"""-PPT Master - SVG 圆角矩形转 Path 工具+PPT Master - SVG Rounded Rectangle to Path Tool-解决 SVG 在 PowerPoint 中「转换为形状」时圆角丢失的问题:-将带 rx/ry 的 <rect> 转换为等效的 <path>+Solves the issue of rounded corners being lost when using "Convert to Shape" in PowerPoint:+Converts <rect> elements with rx/ry to equivalent <path> elements.-用法:- python3 scripts/svg_rect_to_path.py <SVG文件或目录>- python3 scripts/svg_rect_to_path.py <项目路径> -s output- python3 scripts/svg_rect_to_path.py <项目路径> -s final -o svg_rounded+Usage:+ python3 scripts/svg_rect_to_path.py <SVG file or directory>+ python3 scripts/svg_rect_to_path.py <project_path> -s output+ python3 scripts/svg_rect_to_path.py <project_path> -s final -o svg_rounded-示例:+Examples:python3 scripts/svg_rect_to_path.py examples/ppt169_demopython3 scripts/svg_rect_to_path.py examples/ppt169_demo/svg_output/01_cover.svg-输出:- - 目录模式:输出到 svg_rounded/ 子目录- - 文件模式:输出到 <文件名>_rounded.svg+Output:+ - Directory mode: outputs to svg_rounded/ subdirectory+ - File mode: outputs to <filename>_rounded.svg"""import sys@@ -30,20 +30,20 @@ from xml.etree import ElementTree as ETdef rect_to_rounded_path(x: float, y: float, width: float, height: float,rx: float, ry: float) -> str:"""- 将圆角矩形转换为 SVG path 字符串- 使用椭圆弧命令绘制圆角+ Convert a rounded rectangle to an SVG path string.+ Uses elliptical arc commands to draw rounded corners."""- # 限制圆角半径不超过宽高的一半+ # Limit corner radius to half of width/heightrx = min(rx, width / 2)ry = min(ry, height / 2)- # 计算关键点+ # Calculate key pointsx1 = x + rxx2 = x + width - rxy1 = y + ryy2 = y + height - ry- # 构建 path+ # Build pathpath = (f"M{x1:.2f},{y:.2f} "f"H{x2:.2f} "@@ -57,18 +57,18 @@ def rect_to_rounded_path(x: float, y: float, width: float, height: float,f"Z")- # 清理多余的小数+ # Clean up excess decimalspath = re.sub(r'\.00(?=\s|,|[A-Za-z]|$)', '', path)return pathdef parse_float(val: str, default: float = 0.0) -> float:- """安全解析浮点数"""+ """Safely parse a float value."""if not val:return defaulttry:- # 移除单位+ # Remove unitsval = re.sub(r'(px|pt|em|%|rem)$', '', val.strip())return float(val)except ValueError:@@ -77,19 +77,19 @@ def parse_float(val: str, default: float = 0.0) -> float:def process_svg(content: str, verbose: bool = False) -> Tuple[str, int]:"""- 处理 SVG 内容,将圆角矩形转换为 path- 返回 (处理后的内容, 转换数量)+ Process SVG content, converting rounded rectangles to paths.+ Returns (processed content, conversion count)."""converted_count = 0- # 保存原始 XML 声明+ # Save original XML declarationxml_declaration = ''if content.strip().startswith('<?xml'):match = re.match(r'(<\?xml[^?]*\?>)', content)if match:xml_declaration = match.group(1) + '\n'- # 注册 SVG 命名空间+ # Register SVG namespacesET.register_namespace('', 'http://www.w3.org/2000/svg')ET.register_namespace('xlink', 'http://www.w3.org/1999/xlink')@@ -97,31 +97,31 @@ def process_svg(content: str, verbose: bool = False) -> Tuple[str, int]:root = ET.fromstring(content)except ET.ParseError as e:if verbose:- print(f" XML 解析错误: {e}")+ print(f" XML parse error: {e}")return content, 0- # 获取默认命名空间+ # Get default namespacens = ''if root.tag.startswith('{'):ns = root.tag.split('}')[0] + '}'def get_tag_name(tag):- """获取不带命名空间的标签名"""+ """Get tag name without namespace."""if tag.startswith('{'):return tag.split('}')[1]return tagdef process_element(elem):- """处理单个元素"""+ """Process a single element."""nonlocal converted_counttag_name = get_tag_name(elem.tag)- # 处理圆角矩形+ # Process rounded rectanglesif tag_name == 'rect':rx = parse_float(elem.get('rx', '0'))ry = parse_float(elem.get('ry', '0'))- # 如果只指定了一个,另一个取相同值+ # If only one is specified, the other takes the same valueif rx == 0 and ry > 0:rx = ryelif ry == 0 and rx > 0:@@ -134,36 +134,36 @@ def process_svg(content: str, verbose: bool = False) -> Tuple[str, int]:height = parse_float(elem.get('height', '0'))if width > 0 and height > 0:- # 生成 path+ # Generate pathpath_d = rect_to_rounded_path(x, y, width, height, rx, ry)- # rect 特有属性+ # rect-specific attributesrect_attrs = {'x', 'y', 'width', 'height', 'rx', 'ry'}- # 修改元素为 path+ # Change element to pathelem.tag = ns + 'path' if ns else 'path'elem.set('d', path_d)- # 移除 rect 特有属性+ # Remove rect-specific attributesfor attr in rect_attrs:if attr in elem.attrib:del elem.attrib[attr]converted_count += 1if verbose:- print(f" 转换圆角矩形: rx={rx}, ry={ry}")+ print(f" Converted rounded rect: rx={rx}, ry={ry}")- # 递归处理子元素+ # Recursively process child elementsfor child in elem:process_element(child)- # 处理所有元素+ # Process all elementsprocess_element(root)- # 转换回字符串+ # Convert back to stringresult = ET.tostring(root, encoding='unicode')- # 添加 XML 声明(如果原来有的话)+ # Add XML declaration (if originally present)if xml_declaration:result = xml_declaration + result@@ -171,14 +171,14 @@ def process_svg(content: str, verbose: bool = False) -> Tuple[str, int]:def process_svg_file(input_path: Path, output_path: Path, verbose: bool = False) -> Tuple[bool, int]:- """处理单个 SVG 文件"""+ """Process a single SVG file."""try:with open(input_path, 'r', encoding='utf-8') as f:content = f.read()processed, count = process_svg(content, verbose)- # 确保输出目录存在+ # Ensure output directory existsoutput_path.parent.mkdir(parents=True, exist_ok=True)with open(output_path, 'w', encoding='utf-8') as f:@@ -188,12 +188,12 @@ def process_svg_file(input_path: Path, output_path: Path, verbose: bool = False)except Exception as e:if verbose:- print(f" 错误: {e}")+ print(f" Error: {e}")return False, 0def find_svg_files(project_path: Path, source: str = 'output') -> Tuple[List[Path], str]:- """查找项目中的 SVG 文件"""+ """Find SVG files in a project."""dir_map = {'output': 'svg_output','final': 'svg_final',@@ -220,52 +220,52 @@ def find_svg_files(project_path: Path, source: str = 'output') -> Tuple[List[Patdef main():parser = argparse.ArgumentParser(- description='PPT Master - SVG 圆角矩形转 Path 工具',+ description='PPT Master - SVG Rounded Rectangle to Path Tool',formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''-示例:+Examples:%(prog)s examples/ppt169_demo%(prog)s examples/ppt169_demo -s final%(prog)s examples/ppt169_demo/svg_output/01_cover.svg-处理内容:- 将带 rx/ry 的 <rect> 转换为等效的 <path>- 处理后的 SVG 在 PowerPoint 中「转换为形状」时能保留圆角+What it does:+ Converts <rect> elements with rx/ry to equivalent <path> elements.+ Processed SVGs preserve rounded corners when using "Convert to Shape" in PowerPoint.''')- parser.add_argument('path', type=str, help='SVG 文件或项目目录路径')+ parser.add_argument('path', type=str, help='SVG file or project directory path')parser.add_argument('-s', '--source', type=str, default='output',- help='SVG 来源: output/final/flat/final_flat 或子目录名 (默认: output)')+ help='SVG source: output/final/flat/final_flat or subdirectory name (default: output)')parser.add_argument('-o', '--output', type=str, default='svg_rounded',- help='输出目录名 (默认: svg_rounded)')- parser.add_argument('-v', '--verbose', action='store_true', help='详细输出')- parser.add_argument('-q', '--quiet', action='store_true', help='静默模式')+ help='Output directory name (default: svg_rounded)')+ parser.add_argument('-v', '--verbose', action='store_true', help='Verbose output')+ parser.add_argument('-q', '--quiet', action='store_true', help='Quiet mode')args = parser.parse_args()input_path = Path(args.path)if not input_path.exists():- print(f"错误: 路径不存在: {input_path}")+ print(f"Error: Path not found: {input_path}")sys.exit(1)verbose = args.verbose and not args.quietquiet = args.quietif not quiet:- print("PPT Master - SVG 圆角矩形转 Path 工具")+ print("PPT Master - SVG Rounded Rectangle to Path Tool")print("=" * 50)total_converted = 0if input_path.is_file() and input_path.suffix.lower() == '.svg':- # 单文件模式+ # Single file modeoutput_path = input_path.with_stem(input_path.stem + '_rounded')-+if not quiet:- print(f" 输入: {input_path}")- print(f" 输出: {output_path}")+ print(f" Input: {input_path}")+ print(f" Output: {output_path}")print()success, count = process_svg_file(input_path, output_path, verbose)@@ -273,26 +273,26 @@ def main():if success:if not quiet:- print(f"[完成] 已保存: {output_path}")+ print(f"[DONE] Saved: {output_path}")else:- print(f"[失败] 处理失败")+ print(f"[FAIL] Processing failed")sys.exit(1)else:- # 目录/项目模式+ # Directory/project modesvg_files, source_dir = find_svg_files(input_path, args.source)if not svg_files:- print("错误: 未找到 SVG 文件")+ print("Error: No SVG files found")sys.exit(1)output_dir = input_path / args.outputif not quiet:- print(f" 项目路径: {input_path}")- print(f" SVG 来源: {source_dir}")- print(f" 输出目录: {args.output}")- print(f" 文件数量: {len(svg_files)}")+ print(f" Project path: {input_path}")+ print(f" SVG source: {source_dir}")+ print(f" Output directory: {args.output}")+ print(f" File count: {len(svg_files)}")print()success_count = 0@@ -315,13 +315,13 @@ def main():if not quiet:print()- print(f"[完成] 成功: {success_count}/{len(svg_files)}")- print(f" 输出目录: {output_dir}")+ print(f"[DONE] Succeeded: {success_count}/{len(svg_files)}")+ print(f" Output directory: {output_dir}")- # 显示统计+ # Show statisticsif not quiet:print()- print(f"转换统计: 圆角矩形 -> path: {total_converted} 个")+ print(f"Conversion stats: rounded rect -> path: {total_converted}")sys.exit(0)diff --git a/skills/ppt-master/scripts/svg_to_pptx.py b/skills/ppt-master/scripts/svg_to_pptx.pyindex 0f296b54..f06d62b1 100644--- a/skills/ppt-master/scripts/svg_to_pptx.py+++ b/skills/ppt-master/scripts/svg_to_pptx.py@@ -1,26 +1,26 @@#!/usr/bin/env python3"""-PPT Master - SVG 转 PPTX 工具+PPT Master - SVG to PPTX Conversion Tool-将项目中的 SVG 文件批量转换为 PowerPoint 演示文稿。-每个 SVG 文件对应一张幻灯片,SVG 以原生矢量格式嵌入。+Batch converts SVG files in a project into a PowerPoint presentation.+Each SVG file corresponds to one slide, with SVG embedded in native vector format.-用法:- python3 scripts/svg_to_pptx.py <项目路径>- python3 scripts/svg_to_pptx.py <项目路径> -o output.pptx- python3 scripts/svg_to_pptx.py <项目路径> --use-final+Usage:+ python3 scripts/svg_to_pptx.py <project_path>+ python3 scripts/svg_to_pptx.py <project_path> -o output.pptx+ python3 scripts/svg_to_pptx.py <project_path> --use-final-示例:+Examples:python3 scripts/svg_to_pptx.py examples/ppt169_demopython3 scripts/svg_to_pptx.py examples/ppt169_demo -o presentation.pptxpython3 scripts/svg_to_pptx.py examples/ppt169_demo --use-final-依赖:+Dependencies:pip install python-pptx-注意:- - SVG 以原生矢量格式嵌入,保持可编辑性- - 需要 PowerPoint 2016+ 才能正确显示+Notes:+ - SVG is embedded in native vector format, preserving editability+ - Requires PowerPoint 2016+ to display correctly"""import sys@@ -34,16 +34,16 @@ from pathlib import Pathfrom typing import Optional, Tuple, Listfrom xml.etree import ElementTree as ET-# 检查 python-pptx 是否已安装+# Check if python-pptx is installedtry:from pptx import Presentationfrom pptx.util import Emuexcept ImportError:- print("错误: 缺少 python-pptx 库")- print("请运行: pip install python-pptx")+ print("Error: python-pptx library is missing")+ print("Please run: pip install python-pptx")sys.exit(1)-# 导入项目工具模块+# Import project utility modulessys.path.insert(0, str(Path(__file__).parent))try:from project_utils import get_project_info@@ -56,7 +56,7 @@ except ImportError:def get_project_info(path):return {'format': 'unknown', 'name': Path(path).name}-# 导入动画模块+# Import animation moduletry:from pptx_animations import create_transition_xml, TRANSITIONSANIMATIONS_AVAILABLE = True@@ -64,8 +64,8 @@ except ImportError:ANIMATIONS_AVAILABLE = FalseTRANSITIONS = {}-# SVG 转 PNG 库检测(用于 Office 兼容模式)-# 优先使用 CairoSVG(渲染质量更好),降级到 svglib+# SVG to PNG library detection (for Office compatibility mode)+# Prefer CairoSVG (better rendering quality), fall back to svglibPNG_RENDERER = None # 'cairosvg' | 'svglib' | Nonetry:@@ -80,20 +80,20 @@ except (ImportError, OSError):passdef get_png_renderer_info() -> tuple:- """获取 PNG 渲染器信息"""+ """Get PNG renderer information"""if PNG_RENDERER == 'cairosvg':- return ('cairosvg', '(渐变/滤镜完整)', None)+ return ('cairosvg', '(full gradient/filter support)', None)elif PNG_RENDERER == 'svglib':- return ('svglib', '(部分渐变可能丢失)', '安装 cairosvg 可获得更好效果: pip install cairosvg')+ return ('svglib', '(some gradients may be lost)', 'Install cairosvg for better results: pip install cairosvg')else:- return (None, '(未安装)', '安装方法: pip install cairosvg 或 pip install svglib reportlab')+ return (None, '(not installed)', 'Install via: pip install cairosvg or pip install svglib reportlab')-# EMU 转换常量+# EMU conversion constantsEMU_PER_INCH = 914400EMU_PER_PIXEL = EMU_PER_INCH / 96-# XML 命名空间+# XML namespacesNAMESPACES = {'a': 'http://schemas.openxmlformats.org/drawingml/2006/main','r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',@@ -101,19 +101,19 @@ NAMESPACES = {'asvg': 'http://schemas.microsoft.com/office/drawing/2016/SVG/main',}-# 注册命名空间+# Register namespacesfor prefix, uri in NAMESPACES.items():ET.register_namespace(prefix, uri)def get_slide_dimensions(canvas_format: str, custom_pixels: Optional[Tuple[int, int]] = None) -> Tuple[int, int]:- """获取幻灯片尺寸(EMU 单位)"""+ """Get slide dimensions (in EMU units)"""if custom_pixels:width_px, height_px = custom_pixelselse:if canvas_format not in CANVAS_FORMATS:canvas_format = 'ppt169'-+dimensions = CANVAS_FORMATS[canvas_format]['dimensions']match = re.match(r'(\d+)[×x](\d+)', dimensions)if match:@@ -121,18 +121,18 @@ def get_slide_dimensions(canvas_format: str, custom_pixels: Optional[Tuple[int,height_px = int(match.group(2))else:width_px, height_px = 1280, 720-+return int(width_px * EMU_PER_PIXEL), int(height_px * EMU_PER_PIXEL)def get_pixel_dimensions(canvas_format: str, custom_pixels: Optional[Tuple[int, int]] = None) -> Tuple[int, int]:- """获取画布像素尺寸"""+ """Get canvas pixel dimensions"""if custom_pixels:return custom_pixels-+if canvas_format not in CANVAS_FORMATS:canvas_format = 'ppt169'-+dimensions = CANVAS_FORMATS[canvas_format]['dimensions']match = re.match(r'(\d+)[×x](\d+)', dimensions)if match:@@ -141,35 +141,35 @@ def get_pixel_dimensions(canvas_format: str, custom_pixels: Optional[Tuple[int,def get_viewbox_dimensions(svg_path: Path) -> Optional[Tuple[int, int]]:- """从 SVG 的 viewBox 提取像素尺寸(返回整数)"""+ """Extract pixel dimensions from SVG viewBox (returns integers)"""try:with open(svg_path, 'r', encoding='utf-8') as f:content = f.read(2000)-+match = re.search(r'viewBox="([^"]+)"', content)if not match:return None-+parts = re.split(r'[\s,]+', match.group(1).strip())if len(parts) < 4:return None-+width = float(parts[2])height = float(parts[3])if width <= 0 or height <= 0:return None-+return int(round(width)), int(round(height))except Exception:return Nonedef detect_format_from_svg(svg_path: Path) -> Optional[str]:- """从 SVG 文件的 viewBox 检测画布格式"""+ """Detect canvas format from SVG file's viewBox"""try:with open(svg_path, 'r', encoding='utf-8') as f:content = f.read(2000)-+match = re.search(r'viewBox="([^"]+)"', content)if match:viewbox = match.group(1)@@ -183,23 +183,23 @@ def detect_format_from_svg(svg_path: Path) -> Optional[str]:def convert_svg_to_png(svg_path: Path, png_path: Path, width: int = None, height: int = None) -> bool:"""- 将 SVG 转换为 PNG-+ Convert SVG to PNG+Args:- svg_path: SVG 文件路径- png_path: 输出 PNG 文件路径- width: 输出宽度(像素)- height: 输出高度(像素)-+ svg_path: SVG file path+ png_path: Output PNG file path+ width: Output width (pixels)+ height: Output height (pixels)+Returns:- 是否成功转换+ Whether the conversion was successful"""if PNG_RENDERER is None:return False-+try:if PNG_RENDERER == 'cairosvg':- # 使用 CairoSVG(渲染质量更好)+ # Use CairoSVG (better rendering quality)cairosvg.svg2png(url=str(svg_path),write_to=str(png_path),@@ -207,15 +207,15 @@ def convert_svg_to_png(svg_path: Path, png_path: Path, width: int = None, heightoutput_height=height)return True-+elif PNG_RENDERER == 'svglib':- # 使用 svglib(轻量级,但渐变支持有限)+ # Use svglib (lightweight, but limited gradient support)drawing = svg2rlg(str(svg_path))if drawing is None:- print(f" 警告: 无法解析 SVG ({svg_path.name})")+ print(f" Warning: Unable to parse SVG ({svg_path.name})")return False-- # 渲染为 PNG++ # Render to PNGrenderPM.drawToFile(drawing,str(png_path),@@ -223,75 +223,75 @@ def convert_svg_to_png(svg_path: Path, png_path: Path, width: int = None, heightconfigPIL={'quality': 95})return True-+except Exception as e:- print(f" 警告: SVG 转 PNG 失败 ({svg_path.name}): {e}")+ print(f" Warning: SVG to PNG conversion failed ({svg_path.name}): {e}")return False-+return Falsedef find_svg_files(project_path: Path, source: str = 'output') -> Tuple[List[Path], str]:"""- 查找项目中的 SVG 文件-+ Find SVG files in the project+Args:- project_path: 项目目录路径- source: SVG 来源目录- - 'output': svg_output(原始版本)- - 'final': svg_final(后处理完成,推荐)- - 或任意子目录名称-+ project_path: Project directory path+ source: SVG source directory+ - 'output': svg_output (original version)+ - 'final': svg_final (post-processed, recommended)+ - or any subdirectory name+Returns:- (SVG 文件列表, 实际使用的目录名)+ (list of SVG files, actual directory name used)"""- # 预定义目录映射+ # Predefined directory mappingdir_map = {'output': 'svg_output','final': 'svg_final',}-- # 获取目录名(支持预定义别名或直接指定目录名)++ # Get directory name (supports predefined aliases or direct directory names)dir_name = dir_map.get(source, source)svg_dir = project_path / dir_name-+if not svg_dir.exists():- print(f" 警告: {dir_name} 目录不存在,尝试 svg_output")+ print(f" Warning: {dir_name} directory does not exist, trying svg_output")dir_name = 'svg_output'svg_dir = project_path / dir_name-+if not svg_dir.exists():- # 直接在指定目录查找+ # Search directly in the specified directoryif project_path.is_dir():svg_dir = project_pathdir_name = project_path.nameelse:return [], ''-+return sorted(svg_dir.glob('*.svg')), dir_namedef find_notes_files(project_path: Path, svg_files: List[Path] = None) -> dict:"""- 查找项目中的备注文件-- 支持两种匹配模式(支持混合匹配):- 1. 按文件名匹配(优先):notes/01_封面.md 对应 01_封面.svg- 2. 按序号匹配(向后兼容):notes/slide01.md 对应第1个 SVG-+ Find notes files in the project++ Supports two matching modes (mixed matching supported):+ 1. Match by filename (priority): notes/01_cover.md corresponds to 01_cover.svg+ 2. Match by index (backward compatible): notes/slide01.md corresponds to the 1st SVG+Args:- project_path: 项目目录路径- svg_files: SVG 文件列表(用于按文件名匹配)-+ project_path: Project directory path+ svg_files: SVG file list (for filename matching)+Returns:- 字典,key 为 SVG 文件名(不含扩展名),value 为备注内容+ Dictionary where key is SVG filename (without extension) and value is notes content"""notes_dir = project_path / 'notes'notes = {}-+if not notes_dir.exists():return notes-+svg_stems_mapping = {}svg_index_mapping = {}if svg_files:@@ -299,17 +299,17 @@ def find_notes_files(project_path: Path, svg_files: List[Path] = None) -> dict:svg_stems_mapping[svg_path.stem] = isvg_index_mapping[i] = svg_path.stem- # 收集所有 notes 文件信息+ # Collect all notes file informationfor notes_file in notes_dir.glob('*.md'):try:with open(notes_file, 'r', encoding='utf-8') as f:content = f.read().strip()if not content:continue-+stem = notes_file.stem- # 尝试提取序号(向后兼容 slide01.md 格式)+ # Try to extract index (backward compatible with slide01.md format)match = re.search(r'slide[_]?(\d+)', stem)if match:index = int(match.group(1))@@ -317,24 +317,24 @@ def find_notes_files(project_path: Path, svg_files: List[Path] = None) -> dict:if mapped_stem:notes[mapped_stem] = content- # 按文件名提取(覆盖向后兼容的格式)+ # Match by filename (overrides backward compatible format)if stem in svg_stems_mapping:notes[stem] = contentexcept Exception:pass-+return notesdef markdown_to_plain_text(md_content: str) -> str:"""- 将 Markdown 备注转换为纯文本(用于 PPTX 备注)-+ Convert Markdown notes to plain text (for PPTX notes)+Args:- md_content: Markdown 格式的备注内容-+ md_content: Markdown formatted notes content+Returns:- 纯文本内容+ Plain text content"""def strip_inline_bold(text: str) -> str:# Remove Markdown bold markers while keeping content@@ -344,27 +344,27 @@ def markdown_to_plain_text(md_content: str) -> str:lines = []for line in md_content.split('\n'):- # 跳过标题行(# 开头)+ # Skip heading lines (starting with #)if line.startswith('#'):- # 提取标题文本+ # Extract heading texttext = re.sub(r'^#+\s*', '', line).strip()text = strip_inline_bold(text)if text:lines.append(text)- lines.append('') # 空行- # 处理列表项(- 开头)+ lines.append('') # Empty line+ # Handle list items (starting with -)elif line.strip().startswith('- '):item_text = line.strip()[2:]item_text = strip_inline_bold(item_text)lines.append('• ' + item_text)- # 普通行+ # Regular lineselif line.strip():text = strip_inline_bold(line.strip())lines.append(text)else:lines.append('')-- # 合并连续空行++ # Merge consecutive empty linesresult = []prev_empty = Falsefor line in lines:@@ -375,25 +375,25 @@ def markdown_to_plain_text(md_content: str) -> str:else:result.append(line)prev_empty = False-+return '\n'.join(result).strip()def create_notes_slide_xml(slide_num: int, notes_text: str) -> str:"""- 创建备注幻灯片 XML-+ Create notes slide XML+Args:- slide_num: 幻灯片序号- notes_text: 备注文本(纯文本格式)-+ slide_num: Slide number+ notes_text: Notes text (plain text format)+Returns:- 备注幻灯片 XML 字符串+ Notes slide XML string"""- # 转义 XML 特殊字符+ # Escape XML special charactersnotes_text = notes_text.replace('&', '&').replace('<', '<').replace('>', '>')-- # 将换行转换为 <a:p> 段落++ # Convert line breaks to <a:p> paragraphsparagraphs = []for para in notes_text.split('\n'):if para.strip():@@ -405,9 +405,9 @@ def create_notes_slide_xml(slide_num: int, notes_text: str) -> str:</a:p>''')else:paragraphs.append('<a:p><a:endParaRPr lang="zh-CN" dirty="0"/></a:p>')-+paragraphs_xml = '\n '.join(paragraphs) if paragraphs else '<a:p><a:endParaRPr lang="zh-CN" dirty="0"/></a:p>'-+return f'''<?xml version="1.0" encoding="UTF-8" standalone="yes"?><p:notes xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"@@ -466,13 +466,13 @@ def create_notes_slide_xml(slide_num: int, notes_text: str) -> str:def create_notes_slide_rels_xml(slide_num: int) -> str:"""- 创建备注幻灯片关系文件 XML-+ Create notes slide relationship file XML+Args:- slide_num: 幻灯片序号-+ slide_num: Slide number+Returns:- 关系文件 XML 字符串+ Relationship file XML string"""return f'''<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">@@ -482,10 +482,10 @@ def create_notes_slide_rels_xml(slide_num: int) -> str:def create_slide_xml_with_svg(- slide_num: int,+ slide_num: int,png_rid: str,- svg_rid: str,- width_emu: int,+ svg_rid: str,+ width_emu: int,height_emu: int,transition: Optional[str] = None,transition_duration: float = 0.5,@@ -493,20 +493,20 @@ def create_slide_xml_with_svg(use_compat_mode: bool = True) -> str:"""- 创建包含 SVG 图片的幻灯片 XML-+ Create slide XML containing an SVG image+Args:- slide_num: 幻灯片序号- png_rid: PNG 后备图片关系 ID- svg_rid: SVG 关系 ID- width_emu: 宽度(EMU)- height_emu: 高度(EMU)- transition: 切换效果名称- transition_duration: 切换持续时间(秒)- auto_advance: 自动翻页间隔(秒)- use_compat_mode: 是否使用兼容模式(PNG + SVG 双格式)+ slide_num: Slide number+ png_rid: PNG fallback image relationship ID+ svg_rid: SVG relationship ID+ width_emu: Width (EMU)+ height_emu: Height (EMU)+ transition: Transition effect name+ transition_duration: Transition duration (seconds)+ auto_advance: Auto-advance interval (seconds)+ use_compat_mode: Whether to use compatibility mode (PNG + SVG dual format)"""- # 生成切换效果 XML+ # Generate transition effect XMLtransition_xml = ''if transition and ANIMATIONS_AVAILABLE:transition_xml = '\n' + create_transition_xml(@@ -514,8 +514,8 @@ def create_slide_xml_with_svg(duration=transition_duration,advance_after=auto_advance)-- # 兼容模式:PNG 主图片 + SVG 扩展(Office 官方推荐)++ # Compatibility mode: PNG main image + SVG extension (Office official recommendation)if use_compat_mode:blip_xml = f'''<a:blip r:embed="{png_rid}"><a:extLst>@@ -525,9 +525,9 @@ def create_slide_xml_with_svg(</a:extLst></a:blip>'''else:- # 纯 SVG 模式(仅新版 Office 支持)+ # Pure SVG mode (only supported by newer Office versions)blip_xml = f'<a:blip r:embed="{svg_rid}"/>'-+return f'''<?xml version="1.0" encoding="UTF-8" standalone="yes"?><p:sld xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"@@ -581,14 +581,14 @@ def create_slide_xml_with_svg(def create_slide_rels_xml(png_rid: str, png_filename: str, svg_rid: str, svg_filename: str, use_compat_mode: bool = True) -> str:"""- 创建幻灯片关系文件 XML-+ Create slide relationship file XML+Args:- png_rid: PNG 图片关系 ID- png_filename: PNG 文件名- svg_rid: SVG 关系 ID- svg_filename: SVG 文件名- use_compat_mode: 是否使用兼容模式+ png_rid: PNG image relationship ID+ png_filename: PNG filename+ svg_rid: SVG relationship ID+ svg_filename: SVG filename+ use_compat_mode: Whether to use compatibility mode"""if use_compat_mode:return f'''<?xml version="1.0" encoding="UTF-8" standalone="yes"?>@@ -618,120 +618,120 @@ def create_pptx_with_native_svg(enable_notes: bool = True) -> bool:"""- 创建包含原生 SVG 的 PPTX 文件-+ Create a PPTX file with native SVG+Args:- svg_files: SVG 文件列表- output_path: 输出路径- canvas_format: 画布格式- verbose: 是否输出详细信息- transition: 切换效果 (fade/push/wipe/split/reveal/cover/random)- transition_duration: 切换持续时间(秒)- auto_advance: 自动翻页间隔(秒)- use_compat_mode: 使用 Office 兼容模式(PNG + SVG 双格式,默认开启)- notes: 备注字典,key 为幻灯片编号,value 为备注内容- enable_notes: 是否启用备注嵌入(默认开启)+ svg_files: List of SVG files+ output_path: Output path+ canvas_format: Canvas format+ verbose: Whether to output detailed information+ transition: Transition effect (fade/push/wipe/split/reveal/cover/random)+ transition_duration: Transition duration (seconds)+ auto_advance: Auto-advance interval (seconds)+ use_compat_mode: Use Office compatibility mode (PNG + SVG dual format, enabled by default)+ notes: Notes dictionary, key is slide number, value is notes content+ enable_notes: Whether to enable notes embedding (enabled by default)"""if not svg_files:- print("错误: 没有找到 SVG 文件")+ print("Error: No SVG files found")return False-- # 检查兼容模式依赖++ # Check compatibility mode dependenciesrenderer_name, renderer_status, renderer_hint = get_png_renderer_info()if use_compat_mode and PNG_RENDERER is None:- print("警告: 未安装 PNG 渲染库,无法使用兼容模式")+ print("Warning: No PNG rendering library installed, cannot use compatibility mode")print(f" {renderer_hint}")- print(" 将使用纯 SVG 模式(可能在 Office LTSC 2021 等版本中不显示)")+ print(" Will use pure SVG mode (may not display in Office LTSC 2021 and similar versions)")use_compat_mode = False-- # 自动检测画布格式或从 viewBox 获取尺寸++ # Auto-detect canvas format or get dimensions from viewBoxcustom_pixels: Optional[Tuple[int, int]] = Noneif canvas_format is None:canvas_format = detect_format_from_svg(svg_files[0])if canvas_format and verbose:format_name = CANVAS_FORMATS.get(canvas_format, {}).get('name', canvas_format)- print(f" 检测到画布格式: {format_name}")-+ print(f" Detected canvas format: {format_name}")+if canvas_format is None:custom_pixels = get_viewbox_dimensions(svg_files[0])if custom_pixels and verbose:- print(f" 使用 SVG viewBox 尺寸: {custom_pixels[0]} x {custom_pixels[1]} px")-+ print(f" Using SVG viewBox dimensions: {custom_pixels[0]} x {custom_pixels[1]} px")+if canvas_format is None and custom_pixels is None:canvas_format = 'ppt169'if verbose:- print(f" 使用默认格式: PPT 16:9")-+ print(f" Using default format: PPT 16:9")+width_emu, height_emu = get_slide_dimensions(canvas_format or 'ppt169', custom_pixels)pixel_width, pixel_height = get_pixel_dimensions(canvas_format or 'ppt169', custom_pixels)-+if verbose:- print(f" 幻灯片尺寸: {pixel_width} x {pixel_height} px")- print(f" SVG 文件数: {len(svg_files)}")+ print(f" Slide dimensions: {pixel_width} x {pixel_height} px")+ print(f" SVG file count: {len(svg_files)}")if use_compat_mode:- print(f" 兼容模式: 开启 (PNG + SVG 双格式)")- print(f" PNG 渲染: {renderer_name} {renderer_status}")+ print(f" Compatibility mode: Enabled (PNG + SVG dual format)")+ print(f" PNG renderer: {renderer_name} {renderer_status}")else:- print(f" 兼容模式: 关闭 (纯 SVG)")+ print(f" Compatibility mode: Disabled (pure SVG)")if transition:trans_name = TRANSITIONS.get(transition, {}).get('name', transition) if TRANSITIONS else transition- print(f" 切换效果: {trans_name}")+ print(f" Transition effect: {trans_name}")if enable_notes and notes:- print(f" 演讲备注: {len(notes)} 页")+ print(f" Speaker notes: {len(notes)} page(s)")elif enable_notes:- print(f" 演讲备注: 已启用(未找到备注文件)")+ print(f" Speaker notes: Enabled (no notes files found)")else:- print(f" 演讲备注: 已禁用")+ print(f" Speaker notes: Disabled")print()-- # 创建临时目录++ # Create temporary directorytemp_dir = Path(tempfile.mkdtemp())-+try:- # 首先用 python-pptx 创建基础 PPTX+ # First create base PPTX with python-pptxprs = Presentation()prs.slide_width = width_emuprs.slide_height = height_emu-- # 添加空白幻灯片作为占位++ # Add blank slides as placeholdersblank_layout = prs.slide_layouts[6]for _ in svg_files:prs.slides.add_slide(blank_layout)-- # 保存基础 PPTX++ # Save base PPTXbase_pptx = temp_dir / 'base.pptx'prs.save(str(base_pptx))-- # 解压 PPTX++ # Extract PPTXextract_dir = temp_dir / 'pptx_content'with zipfile.ZipFile(base_pptx, 'r') as zf:zf.extractall(extract_dir)-- # 创建 media 目录++ # Create media directorymedia_dir = extract_dir / 'ppt' / 'media'media_dir.mkdir(exist_ok=True)-- # 处理每个 SVG 文件++ # Process each SVG filesuccess_count = 0any_png_generated = False-+for i, svg_path in enumerate(svg_files, 1):slide_num = isvg_filename = f'image{i}.svg'png_filename = f'image{i}.png'png_rid = 'rId2'svg_rid = 'rId3' if use_compat_mode else 'rId2'-+try:- # 复制 SVG 到 media 目录+ # Copy SVG to media directoryshutil.copy(svg_path, media_dir / svg_filename)-- # 兼容模式:生成 PNG 后备图片++ # Compatibility mode: generate PNG fallback imageslide_has_png = Falseif use_compat_mode:png_path = media_dir / png_filenamepng_success = convert_svg_to_png(- svg_path,+ svg_path,png_path,width=pixel_width,height=pixel_height@@ -740,18 +740,18 @@ def create_pptx_with_native_svg(slide_has_png = Trueany_png_generated = Trueelse:- # PNG 生成失败,降级为纯 SVG+ # PNG generation failed, fall back to pure SVGif verbose:- print(f" [{i}/{len(svg_files)}] {svg_path.name} - PNG 生成失败,使用纯 SVG")+ print(f" [{i}/{len(svg_files)}] {svg_path.name} - PNG generation failed, using pure SVG")svg_rid = 'rId2'-- # 更新幻灯片 XML++ # Update slide XMLslide_xml_path = extract_dir / 'ppt' / 'slides' / f'slide{slide_num}.xml'slide_xml = create_slide_xml_with_svg(- slide_num,+ slide_num,png_rid=png_rid,- svg_rid=svg_rid,- width_emu=width_emu,+ svg_rid=svg_rid,+ width_emu=width_emu,height_emu=height_emu,transition=transition,transition_duration=transition_duration,@@ -760,82 +760,82 @@ def create_pptx_with_native_svg()with open(slide_xml_path, 'w', encoding='utf-8') as f:f.write(slide_xml)-- # 创建/更新关系文件++ # Create/update relationship filerels_dir = extract_dir / 'ppt' / 'slides' / '_rels'rels_dir.mkdir(exist_ok=True)rels_path = rels_dir / f'slide{slide_num}.xml.rels'rels_xml = create_slide_rels_xml(png_rid=png_rid,png_filename=png_filename,- svg_rid=svg_rid,+ svg_rid=svg_rid,svg_filename=svg_filename,use_compat_mode=(use_compat_mode and slide_has_png))with open(rels_path, 'w', encoding='utf-8') as f:f.write(rels_xml)-- # 处理备注++ # Process notesnotes_content = ''if enable_notes:- # 按文件名匹配(新逻辑)或按序号匹配(向后兼容)+ # Match by filename (new logic) or by index (backward compatible)svg_stem = svg_path.stemnotes_content = notes.get(svg_stem, '') if notes else ''if notes_content:notes_text = markdown_to_plain_text(notes_content)else:- notes_text = '' # 空备注-- # 创建 notesSlides 目录+ notes_text = '' # Empty notes++ # Create notesSlides directorynotes_slides_dir = extract_dir / 'ppt' / 'notesSlides'notes_slides_dir.mkdir(exist_ok=True)-- # 创建备注幻灯片 XML++ # Create notes slide XMLnotes_xml_path = notes_slides_dir / f'notesSlide{slide_num}.xml'notes_xml = create_notes_slide_xml(slide_num, notes_text)with open(notes_xml_path, 'w', encoding='utf-8') as f:f.write(notes_xml)-- # 创建备注幻灯片关系文件++ # Create notes slide relationship filenotes_rels_dir = notes_slides_dir / '_rels'notes_rels_dir.mkdir(exist_ok=True)notes_rels_path = notes_rels_dir / f'notesSlide{slide_num}.xml.rels'notes_rels_xml = create_notes_slide_rels_xml(slide_num)with open(notes_rels_path, 'w', encoding='utf-8') as f:f.write(notes_rels_xml)-- # 更新 slide.xml.rels 添加备注关联++ # Update slide.xml.rels to add notes associationwith open(rels_path, 'r', encoding='utf-8') as f:slide_rels_content = f.read()notes_rel = f' <Relationship Id="rId10" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide" Target="../notesSlides/notesSlide{slide_num}.xml"/>'slide_rels_content = slide_rels_content.replace('</Relationships>', notes_rel + '\n</Relationships>')with open(rels_path, 'w', encoding='utf-8') as f:f.write(slide_rels_content)-+if verbose:mode_str = " (PNG+SVG)" if (use_compat_mode and slide_has_png) else " (SVG)"has_notes = enable_notes and bool(notes_content)- notes_str = " +备注" if has_notes else ""+ notes_str = " +notes" if has_notes else ""print(f" [{i}/{len(svg_files)}] {svg_path.name}{mode_str}{notes_str}")-+success_count += 1-+except Exception as e:if verbose:- print(f" [{i}/{len(svg_files)}] {svg_path.name} - 错误: {e}")-- # 更新 [Content_Types].xml 添加 SVG 和 PNG 类型+ print(f" [{i}/{len(svg_files)}] {svg_path.name} - Error: {e}")++ # Update [Content_Types].xml to add SVG and PNG typescontent_types_path = extract_dir / '[Content_Types].xml'with open(content_types_path, 'r', encoding='utf-8') as f:content_types = f.read()-- # 添加 SVG 扩展类型(如果不存在)++ # Add SVG extension type (if not present)types_to_add = []if 'Extension="svg"' not in content_types:types_to_add.append(' <Default Extension="svg" ContentType="image/svg+xml"/>')if any_png_generated and 'Extension="png"' not in content_types:types_to_add.append(' <Default Extension="png" ContentType="image/png"/>')-+if types_to_add:content_types = content_types.replace('</Types>',@@ -843,8 +843,8 @@ def create_pptx_with_native_svg()with open(content_types_path, 'w', encoding='utf-8') as f:f.write(content_types)-- # 添加 notesSlides 内容类型++ # Add notesSlides content typesif enable_notes:for i in range(1, len(svg_files) + 1):override = f' <Override PartName="/ppt/notesSlides/notesSlide{i}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"/>'@@ -852,103 +852,103 @@ def create_pptx_with_native_svg(content_types = content_types.replace('</Types>', override + '\n</Types>')with open(content_types_path, 'w', encoding='utf-8') as f:f.write(content_types)-- # 重新打包 PPTX++ # Repackage PPTXwith zipfile.ZipFile(output_path, 'w', zipfile.ZIP_DEFLATED) as zf:for file_path in extract_dir.rglob('*'):if file_path.is_file():arcname = file_path.relative_to(extract_dir)zf.write(file_path, arcname)-+if verbose:print()- print(f"[完成] 已保存: {output_path}")- print(f" 成功: {success_count}, 失败: {len(svg_files) - success_count}")+ print(f"[Done] Saved: {output_path}")+ print(f" Succeeded: {success_count}, Failed: {len(svg_files) - success_count}")if use_compat_mode and any_png_generated:- print(f" 模式: Office 兼容模式 (支持所有 Office 版本)")- # 如果使用 svglib,给出升级提示+ print(f" Mode: Office compatibility mode (supports all Office versions)")+ # If using svglib, provide upgrade hintif PNG_RENDERER == 'svglib' and renderer_hint:- print(f" [提示] {renderer_hint}")-+ print(f" [Tip] {renderer_hint}")+return success_count == len(svg_files)-+finally:- # 清理临时目录+ # Clean up temporary directoryshutil.rmtree(temp_dir, ignore_errors=True)def main():- # 构建切换效果选项列表+ # Build transition effect option listtransition_choices = list(TRANSITIONS.keys()) if TRANSITIONS else ['fade', 'push', 'wipe', 'split', 'reveal', 'cover', 'random']-+parser = argparse.ArgumentParser(- description='PPT Master - SVG 转 PPTX 工具(Office 兼容模式)',+ description='PPT Master - SVG to PPTX Tool (Office Compatibility Mode)',formatter_class=argparse.RawDescriptionHelpFormatter,epilog=f'''-示例:- %(prog)s examples/ppt169_demo -s final # 推荐:使用后处理完成的版本- %(prog)s examples/ppt169_demo # 使用原始版本+Examples:+ %(prog)s examples/ppt169_demo -s final # Recommended: use post-processed version+ %(prog)s examples/ppt169_demo # Use original version%(prog)s examples/ppt169_demo -o presentation.pptx- %(prog)s examples/ppt169_demo --no-compat # 禁用兼容模式(仅纯 SVG)-- # 添加页面切换效果+ %(prog)s examples/ppt169_demo --no-compat # Disable compatibility mode (pure SVG only)++ # Add page transition effects%(prog)s examples/ppt169_demo --transition fade%(prog)s examples/ppt169_demo -t push --transition-duration 1.0-SVG 来源目录 (-s):- output - svg_output(原始版本)- final - svg_final(后处理完成,推荐)- <任意名> - 直接指定项目下的子目录名+SVG source directory (-s):+ output - svg_output (original version)+ final - svg_final (post-processed, recommended)+ <any> - Specify a subdirectory name directly-切换效果 (-t/--transition):+Transition effects (-t/--transition):{', '.join(transition_choices)}-兼容模式 (默认开启):- - 自动生成 PNG 后备图片,SVG 作为扩展嵌入- - 兼容所有 Office 版本(包括 Office LTSC 2021)- - 新版 Office 仍显示 SVG(可编辑),旧版显示 PNG- - 需要安装 svglib: pip install svglib reportlab- - 使用 --no-compat 可禁用(仅 Office 2019+ 支持)--演讲备注 (默认开启):- - 自动读取 notes/ 目录中的 Markdown 备注文件- - 支持两种命名方式:- 1. 按文件名匹配(推荐):01_封面.md 对应 01_封面.svg- 2. 按序号匹配:slide01.md 对应第1个 SVG(向后兼容)- - 使用 --no-notes 可禁用+Compatibility mode (enabled by default):+ - Automatically generates PNG fallback images, SVG embedded as extension+ - Compatible with all Office versions (including Office LTSC 2021)+ - Newer Office still displays SVG (editable), older versions display PNG+ - Requires svglib: pip install svglib reportlab+ - Use --no-compat to disable (only Office 2019+ supported)++Speaker notes (enabled by default):+ - Automatically reads Markdown notes files from the notes/ directory+ - Supports two naming conventions:+ 1. Match by filename (recommended): 01_cover.md corresponds to 01_cover.svg+ 2. Match by index: slide01.md corresponds to the 1st SVG (backward compatible)+ - Use --no-notes to disable''')-- parser.add_argument('project_path', type=str, help='项目目录路径')- parser.add_argument('-o', '--output', type=str, default=None, help='输出文件路径')- parser.add_argument('-s', '--source', type=str, default='output',- help='SVG 来源: output/final 或任意子目录名 (推荐 final)')- parser.add_argument('-f', '--format', type=str, choices=list(CANVAS_FORMATS.keys()), default=None, help='指定画布格式')- parser.add_argument('-q', '--quiet', action='store_true', help='静默模式')-- # 兼容模式参数++ parser.add_argument('project_path', type=str, help='Project directory path')+ parser.add_argument('-o', '--output', type=str, default=None, help='Output file path')+ parser.add_argument('-s', '--source', type=str, default='output',+ help='SVG source: output/final or any subdirectory name (recommended: final)')+ parser.add_argument('-f', '--format', type=str, choices=list(CANVAS_FORMATS.keys()), default=None, help='Specify canvas format')+ parser.add_argument('-q', '--quiet', action='store_true', help='Quiet mode')++ # Compatibility mode argumentsparser.add_argument('--no-compat', action='store_true',- help='禁用 Office 兼容模式(仅使用纯 SVG,需要 Office 2019+)')-- # 切换效果参数+ help='Disable Office compatibility mode (pure SVG only, requires Office 2019+)')++ # Transition effect argumentsparser.add_argument('-t', '--transition', type=str, choices=transition_choices, default=None,- help='页面切换效果 (默认: 无)')+ help='Page transition effect (default: none)')parser.add_argument('--transition-duration', type=float, default=0.5,- help='切换持续时间/秒 (默认: 0.5)')+ help='Transition duration in seconds (default: 0.5)')parser.add_argument('--auto-advance', type=float, default=None,- help='自动翻页间隔/秒 (默认: 手动翻页)')-- # 备注参数+ help='Auto-advance interval in seconds (default: manual advance)')++ # Notes argumentsparser.add_argument('--no-notes', action='store_true',- help='禁用演讲备注嵌入(默认启用)')-+ help='Disable speaker notes embedding (enabled by default)')+args = parser.parse_args()-+project_path = Path(args.project_path)if not project_path.exists():- print(f"错误: 路径不存在: {project_path}")+ print(f"Error: Path does not exist: {project_path}")sys.exit(1)-+try:project_info = get_project_info(str(project_path))project_name = project_info.get('name', project_path.name)@@ -956,43 +956,43 @@ SVG 来源目录 (-s):except Exception:project_name = project_path.namedetected_format = None-+canvas_format = args.formatif canvas_format is None and detected_format and detected_format != 'unknown':canvas_format = detected_format-+svg_files, source_dir_name = find_svg_files(project_path, args.source)-+if not svg_files:- print("错误: 未找到 SVG 文件")+ print("Error: No SVG files found")sys.exit(1)-+if args.output:output_path = Path(args.output)else:- # 默认带时间戳,避免覆盖之前的版本+ # Default with timestamp to avoid overwriting previous versionsfrom datetime import datetimetimestamp = datetime.now().strftime("%Y%m%d_%H%M%S")output_path = project_path / f"{project_name}_{timestamp}.pptx"-+output_path.parent.mkdir(parents=True, exist_ok=True)-+verbose = not args.quiet-- # 读取备注文件++ # Read notes filesenable_notes = not args.no_notesnotes = {}if enable_notes:notes = find_notes_files(project_path, svg_files)-+if verbose:- print("PPT Master - SVG 转 PPTX 工具(原生 SVG)")+ print("PPT Master - SVG to PPTX Tool (Native SVG)")print("=" * 50)- print(f" 项目路径: {project_path}")- print(f" SVG 目录: {source_dir_name}")- print(f" 输出文件: {output_path}")+ print(f" Project path: {project_path}")+ print(f" SVG directory: {source_dir_name}")+ print(f" Output file: {output_path}")print()-+success = create_pptx_with_native_svg(svg_files,output_path,@@ -1005,7 +1005,7 @@ SVG 来源目录 (-s):notes=notes,enable_notes=enable_notes)-+sys.exit(0 if success else 1)diff --git a/skills/ppt-master/scripts/total_md_split.py b/skills/ppt-master/scripts/total_md_split.pyindex d8f6e258..3004ae79 100644--- a/skills/ppt-master/scripts/total_md_split.py+++ b/skills/ppt-master/scripts/total_md_split.py@@ -1,25 +1,26 @@#!/usr/bin/env python3"""-PPT Master - 讲稿拆分工具+PPT Master - Speaker Notes Splitting Tool-将 total.md 讲稿文件拆分为多个独立的讲稿文件,每个文件对应一个 SVG 页面。+Splits the total.md speaker notes file into multiple individual notes files,+each corresponding to one SVG page.-用法:- python3 scripts/total_md_split.py <项目路径>- python3 scripts/total_md_split.py <项目路径> -o output_dir+Usage:+ python3 scripts/total_md_split.py <project_path>+ python3 scripts/total_md_split.py <project_path> -o output_dir-示例:- python3 scripts/total_md_split.py projects/<svg 标题>_ppt169_YYYYMMDD- python3 scripts/total_md_split.py projects/<svg 标题>_ppt169_YYYYMMDD -o notes+Examples:+ python3 scripts/total_md_split.py projects/<svg_title>_ppt169_YYYYMMDD+ python3 scripts/total_md_split.py projects/<svg_title>_ppt169_YYYYMMDD -o notes-依赖:- 无(仅使用标准库)+Dependencies:+ None (only uses standard library)-注意:- - 会检查 SVG 文件与讲稿的一一对应关系- - 如果存在 SVG 没有对应的讲稿,会输出提示- - 拆分后的文档不包含一级标题- - 拆分后的文档命名与 SVG 文件同名,后缀改为 .md+Notes:+ - Checks the one-to-one mapping between SVG files and speaker notes+ - Outputs a notice if any SVG file has no corresponding notes+ - Split documents do not include the level-1 heading+ - Split document names match the SVG filenames with .md extension"""import sys@@ -46,31 +47,30 @@ def normalize_title(title: str) -> str:-def extract_leading_number(text: str) -> Optional[int]:"""Extract leading slide number if present."""if not text:return None-+# Try 1: Start with digits (standard)m = re.match(r'^(\d{1,3})', text.strip())if m:return int(m.group(1))-+# Try 2: Common prefixes (Slide X, Page X, 第X页)# Case insensitive for Englishtext_lower = text.lower().strip()-+# Slide/Page Xm = re.match(r'^(?:slide|page|p)\s*[-_:]?\s*(\d{1,3})', text_lower)if m:return int(m.group(1))-+# 第X页/张m = re.match(r'^第\s*(\d{1,3})\s*[页张]', text_lower)if m:return int(m.group(1))-+return None@@ -112,18 +112,18 @@ def match_title(def find_svg_files(project_path: Path) -> List[Path]:"""- 查找项目中的 SVG 文件+ Find SVG files in the projectArgs:- project_path: 项目目录路径+ project_path: Project directory pathReturns:- SVG 文件列表(按文件名排序)+ List of SVG files (sorted by filename)"""svg_dir = project_path / 'svg_output'if not svg_dir.exists():- print(f"错误: {svg_dir} 目录不存在")+ print(f"Error: {svg_dir} directory does not exist")return []return sorted(svg_dir.glob('*.svg'))@@ -131,29 +131,29 @@ def find_svg_files(project_path: Path) -> List[Path]:def parse_total_md(md_path: Path, svg_stems: Optional[List[str]] = None, verbose: bool = True) -> Dict[str, str]:"""- 解析 total.md 文件,提取每个一级标题对应的讲稿内容+ Parse total.md file and extract speaker notes content for each level-1 headingArgs:- md_path: total.md 文件路径+ md_path: Path to total.md fileReturns:- 字典,key 为一级标题(不含 #),value 为讲稿内容+ Dictionary where key is the level-1 heading (without #) and value is the notes content"""if not md_path.exists():- print(f"错误: {md_path} 文件不存在")+ print(f"Error: {md_path} file does not exist")return {}try:with open(md_path, 'r', encoding='utf-8') as f:content = f.read()except Exception as e:- print(f"错误: 无法读取文件 {md_path}: {e}")+ print(f"Error: Unable to read file {md_path}: {e}")return {}svg_stems = svg_stems or []exact, norm_map, num_map = build_match_maps(svg_stems)- # 按标题解析(支持 # / ## / ###)+ # Parse by headings (supports # / ## / ###)notes: Dict[str, str] = {}current_key: Optional[str] = Nonecurrent_lines: List[str] = []@@ -190,33 +190,33 @@ def parse_total_md(md_path: Path, svg_stems: Optional[List[str]] = None, verbosenotes[current_key] = textif verbose and unmatched_headings:- print("\n[提示] 发现未匹配的标题(已忽略):")+ print("\n[Notice] Found unmatched headings (ignored):")for t in unmatched_headings[:10]:print(f" - {t}")if len(unmatched_headings) > 10:- print(f" ... 以及另外 {len(unmatched_headings) - 10} 个")+ print(f" ... and {len(unmatched_headings) - 10} more")return notesdef check_svg_note_mapping(svg_files: List[Path], notes: Dict[str, str]) -> Tuple[bool, List[str]]:"""- 检查 SVG 文件与讲稿的映射关系+ Check the mapping between SVG files and speaker notesArgs:- svg_files: SVG 文件列表- notes: 讲稿字典(key 为标题)+ svg_files: List of SVG files+ notes: Notes dictionary (key is heading)Returns:- (是否全部匹配, 缺失的讲稿标题列表)+ (whether all matched, list of missing notes headings)"""missing_notes = []for svg_path in svg_files:- # 提取 SVG 文件名(不含扩展名)+ # Extract SVG filename (without extension)svg_stem = svg_path.stem- # 检查是否在讲稿中存在对应的标题+ # Check if a corresponding heading exists in the notesif svg_stem not in notes:missing_notes.append(svg_stem)@@ -225,18 +225,18 @@ def check_svg_note_mapping(svg_files: List[Path], notes: Dict[str, str]) -> Tupldef split_notes(notes: Dict[str, str], output_dir: Path, verbose: bool = True) -> bool:"""- 根据讲稿字典拆分并保存为多个文件+ Split and save notes dictionary into multiple filesArgs:- notes: 讲稿字典(key 为标题,value 为内容)- output_dir: 输出目录- verbose: 是否输出详细信息+ notes: Notes dictionary (key is heading, value is content)+ output_dir: Output directory+ verbose: Whether to output detailed informationReturns:- 是否成功+ Whether successful"""if not notes:- print("错误: 没有找到讲稿内容")+ print("Error: No notes content found")return Falseoutput_dir.mkdir(parents=True, exist_ok=True)@@ -244,7 +244,7 @@ def split_notes(notes: Dict[str, str], output_dir: Path, verbose: bool = True) -success_count = 0for title, content in notes.items():- # 生成输出文件名(与 SVG 文件同名,后缀改为 .md)+ # Generate output filename (same name as SVG file, with .md extension)output_path = output_dir / f"{title}.md"try:@@ -252,50 +252,50 @@ def split_notes(notes: Dict[str, str], output_dir: Path, verbose: bool = True) -f.write(content)if verbose:- print(f" 已生成: {output_path.name}")+ print(f" Generated: {output_path.name}")success_count += 1except Exception as e:if verbose:- print(f" 错误: 无法写入文件 {output_path}: {e}")+ print(f" Error: Unable to write file {output_path}: {e}")if verbose:- print(f"\n[完成] 成功生成 {success_count}/{len(notes)} 个文件")+ print(f"\n[Done] Successfully generated {success_count}/{len(notes)} file(s)")return success_count == len(notes)def main():parser = argparse.ArgumentParser(- description='PPT Master - 讲稿拆分工具',+ description='PPT Master - Speaker Notes Splitting Tool',formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''-示例:- %(prog)s projects/<svg 标题>_ppt169_YYYYMMDD- %(prog)s projects/<svg 标题>_ppt169_YYYYMMDD -o notes- %(prog)s projects/<svg 标题>_ppt169_YYYYMMDD -q--功能:- - 读取 total.md 讲稿文件- - 检查 SVG 文件与讲稿的对应关系- - 拆分讲稿为多个独立文件- - 输出文件命名与 SVG 文件同名+Examples:+ %(prog)s projects/<svg_title>_ppt169_YYYYMMDD+ %(prog)s projects/<svg_title>_ppt169_YYYYMMDD -o notes+ %(prog)s projects/<svg_title>_ppt169_YYYYMMDD -q++Features:+ - Reads the total.md speaker notes file+ - Checks the mapping between SVG files and notes+ - Splits notes into multiple individual files+ - Output filenames match SVG filenames''')- parser.add_argument('project_path', type=str, help='项目目录路径')- parser.add_argument('-o', '--output', type=str, default=None, help='输出目录路径(默认:项目下的 notes 目录)')- parser.add_argument('-q', '--quiet', action='store_true', help='静默模式')+ parser.add_argument('project_path', type=str, help='Project directory path')+ parser.add_argument('-o', '--output', type=str, default=None, help='Output directory path (default: notes directory under project)')+ parser.add_argument('-q', '--quiet', action='store_true', help='Quiet mode')args = parser.parse_args()project_path = Path(args.project_path)if not project_path.exists():- print(f"错误: 路径不存在: {project_path}")+ print(f"Error: Path does not exist: {project_path}")sys.exit(1)- # 确定输出目录+ # Determine output directoryif args.output:output_dir = Path(args.output)else:@@ -304,57 +304,57 @@ def main():verbose = not args.quietif verbose:- print("PPT Master - 讲稿拆分工具")+ print("PPT Master - Speaker Notes Splitting Tool")print("=" * 50)- print(f" 项目路径: {project_path}")- print(f" 输出目录: {output_dir}")+ print(f" Project path: {project_path}")+ print(f" Output directory: {output_dir}")print()- # 查找 SVG 文件+ # Find SVG filessvg_files = find_svg_files(project_path)if not svg_files:- print("错误: 未找到 SVG 文件")+ print("Error: No SVG files found")sys.exit(1)if verbose:- print(f" 找到 {len(svg_files)} 个 SVG 文件")+ print(f" Found {len(svg_files)} SVG file(s)")- # 解析 total.md+ # Parse total.mdtotal_md_path = project_path / 'notes' / 'total.md'svg_stems = [p.stem for p in svg_files]notes = parse_total_md(total_md_path, svg_stems, verbose)if not notes:- print("错误: 未找到讲稿内容")+ print("Error: No notes content found")sys.exit(1)if verbose:- print(f" 找到 {len(notes)} 个讲稿章节")+ print(f" Found {len(notes)} notes section(s)")print()- # 检查映射关系+ # Check mappingall_match, missing_notes = check_svg_note_mapping(svg_files, notes)if not all_match:- print("错误: SVG 文件与讲稿不匹配")- print(f" 缺失的讲稿: {', '.join(missing_notes)}")- print("\n请重新生成讲稿文件,确保每个 SVG 都有对应的讲稿。")+ print("Error: SVG files and notes do not match")+ print(f" Missing notes: {', '.join(missing_notes)}")+ print("\nPlease regenerate the notes file to ensure every SVG has corresponding notes.")sys.exit(1)if verbose:- print("[OK] SVG 文件与讲稿一一对应")+ print("[OK] SVG files and notes have one-to-one correspondence")print()- # 拆分讲稿+ # Split notessuccess = split_notes(notes, output_dir, verbose)if success:if verbose:- print(f"\n[完成] 讲稿拆分完成")+ print(f"\n[Done] Notes splitting complete")sys.exit(0)else:- print(f"\n[失败] 讲稿拆分失败")+ print(f"\n[Failed] Notes splitting failed")sys.exit(1)diff --git a/skills/ppt-master/scripts/web_to_md.cjs b/skills/ppt-master/scripts/web_to_md.cjsindex 4403627d..5256a617 100644--- a/skills/ppt-master/scripts/web_to_md.cjs+++ b/skills/ppt-master/scripts/web_to_md.cjs@@ -101,7 +101,7 @@ function parseHTML(html) {// Extract titleconst titleMatch = html.match(/<title[^>]*>([\s\S]*?)<\/title>/i);let title = titleMatch ? decodeHTMLEntities(titleMatch[1].trim()) : "";- // Clean title - remove site name suffix+ // Clean title - remove site name suffix (e.g. Chinese government portal names)title = title.replace(/[-_|].*?(政府|门户|网站|委员会).*$/g, "").trim();// Extract meta tagsdiff --git a/skills/ppt-master/templates/README.md b/skills/ppt-master/templates/README.mdindex 8259355c..7bc606df 100644--- a/skills/ppt-master/templates/README.md+++ b/skills/ppt-master/templates/README.md@@ -1,48 +1,48 @@-# 模板资源+# Template Resources-## 📝 设计规范与大纲参考+## Design Specification & Outline Reference-`design_spec_reference.md` 是一个全能型的参考模板,用于定义项目的:-1. **视觉规范**:画布尺寸、配色方案、字体字号、布局原则-2. **内容大纲**:具体的页面结构规划(Slide by Slide)-3. **技术约束**:SVG 生成和 PPT 兼容性的硬性要求+`design_spec_reference.md` is an all-in-one reference template for defining:+1. **Visual Specifications**: Canvas dimensions, color scheme, typography, layout principles+2. **Content Outline**: Slide-by-slide page structure planning+3. **Technical Constraints**: Hard requirements for SVG generation and PPT compatibility-[查看设计规范与大纲参考](./design_spec_reference.md)+[View Design Spec Reference](./design_spec_reference.md)-## 📄 页面布局模板+## Page Layout Templates-`layouts/` 目录包含预置的页面布局模板,按设计风格分类:+The `layouts/` directory contains pre-built page layout templates organized by design style:-- **General**: 通用灵活风格,现代简洁-- **Consultant**: 咨询风格,专业严谨-- **Consultant Top**: 顶级咨询风格(MBB级)-- **Academic Defense**: 学术答辩风格,专业科研(新增 ✨)+- **General**: Versatile modern style, clean and flexible+- **Consultant**: Consulting style, professional and structured+- **Consultant Top**: Top-tier consulting style (MBB-level)+- **Academic Defense**: Academic defense style, research-oriented-- **人工浏览**:[layouts/README.md](./layouts/README.md)-- **AI / 程序查询**:[layouts/layouts_index.json](./layouts/layouts_index.json)+- **Human browsing**: [layouts/README.md](./layouts/README.md)+- **AI / Programmatic lookup**: [layouts/layouts_index.json](./layouts/layouts_index.json)-## 📊 图表模板+## Chart Templates-`charts/` 目录包含 33 种常用图表模板:+The `charts/` directory contains 33 standard chart templates:-- KPI 卡片-- 柱状图 / 堆叠柱状图-- 折线图 / 双Y轴折线图-- 环形图-- 雷达图-- 漏斗图-- 矩阵图 (2×2)-- 时间轴-- 甘特图-- 流程图-- 组织结构图+- KPI Cards+- Bar Chart / Stacked Bar Chart+- Line Chart / Dual-Axis Line Chart+- Donut Chart+- Radar Chart+- Funnel Chart+- Matrix (2x2)+- Timeline+- Gantt Chart+- Process Flow+- Org Chart-- **人工浏览**:[charts/README.md](./charts/README.md)-- **AI / 程序查询**:[charts/charts_index.json](./charts/charts_index.json)+- **Human browsing**: [charts/README.md](./charts/README.md)+- **AI / Programmatic lookup**: [charts/charts_index.json](./charts/charts_index.json)-## 🎨 图标库+## Icon Library-`icons/` 目录包含 640+ 矢量图标,来源于 [SVG Repo](https://www.svgrepo.com/)。+The `icons/` directory contains 640+ vector icons sourced from [SVG Repo](https://www.svgrepo.com/).-- **人工浏览**:[icons/README.md](./icons/README.md)-- **AI / 程序查询**:[icons/icons_index.json](./icons/icons_index.json)+- **Human browsing**: [icons/README.md](./icons/README.md)+- **AI / Programmatic lookup**: [icons/icons_index.json](./icons/icons_index.json)diff --git a/skills/ppt-master/templates/charts/README.md b/skills/ppt-master/templates/charts/README.mdindex 1ba47cba..4e56c127 100644--- a/skills/ppt-master/templates/charts/README.md+++ b/skills/ppt-master/templates/charts/README.md@@ -1,102 +1,102 @@-# SVG 图表模板库(33 种)--本目录提供 **33 种标准化 SVG 图表模板**,可直接作为 PPT Master 的图表选型参考。--- **完整索引**:[README.md](./README.md)(人工浏览)-- **JSON 索引**:[charts_index.json](./charts_index.json)(AI / 程序优先读取)--生成图表页面前,建议先阅读对应模板文件了解其结构和布局。--## 快速选择--> 🤖 **AI / 程序选型建议**:优先读取 `charts_index.json`;人工浏览和快速比对时使用本 README。--| 我想展示... | 推荐模板 | 文件名 |-|------------|---------|--------|-| 关键数字指标 | KPI 卡片 | `kpi_cards.svg` |-| 类别数值对比 | 柱状图 | `bar_chart.svg` |-| 长标签排名 | 水平条形图 | `horizontal_bar_chart.svg` |-| 多系列对比 | 分组柱状图 | `grouped_bar_chart.svg` |-| 时间趋势 | 折线图 | `line_chart.svg` |-| 累积趋势 | 面积图 | `area_chart.svg` |-| 占比构成 | 饼图 / 环形图 | `pie_chart.svg` / `donut_chart.svg` |-| 目标完成度 | 进度条 / 仪表盘 | `progress_bar_chart.svg` / `gauge_chart.svg` |-| 转化漏斗 | 漏斗图 | `funnel_chart.svg` |-| 项目排期 | 甘特图 | `gantt_chart.svg` |-| 里程碑事件 | 时间轴 | `timeline.svg` |-| 多维评估 | 雷达图 | `radar_chart.svg` |-| 左右双向对比 | 蝴蝶图 | `butterfly_chart.svg` |-| 增减分解 | 瀑布图 | `waterfall_chart.svg` |-| 流量/资金流向 | 桑基图 | `sankey_chart.svg` |-| 战略分析 | SWOT / 波特五力 | `swot_analysis.svg` / `porter_five_forces.svg` |-| 四象限分析 | 矩阵图 | `matrix_2x2.svg` |--## 完整图表索引--### 对比类--| 文件名 | 用途 | 适用场景 |-|--------|------|---------|-| `bar_chart.svg` | 垂直柱状对比(3-8 柱) | 销售额对比、区域排名 |-| `horizontal_bar_chart.svg` | 水平条形排名(5-12 条) | 品牌排行、满意度评分 |-| `grouped_bar_chart.svg` | 多系列分组对比 | 季度产品线对比、同比环比 |-| `stacked_bar_chart.svg` | 堆叠构成对比 | 收入构成、市场份额变化 |-| `butterfly_chart.svg` | 左右双向对比 | 人口金字塔、AB 测试、收支对比 |-| `bullet_chart.svg` | 目标 vs 实际 | KPI 达成、绩效评估 |-| `dumbbell_chart.svg` | 多维度得分对比 | 竞品评估、综合指数 |-| `waterfall_chart.svg` | 增减变化分解 | 利润分解、预算变化 |--### 趋势类--| 文件名 | 用途 | 适用场景 |-|--------|------|---------|-| `line_chart.svg` | 折线趋势(支持多条) | 时间序列、增长趋势 |-| `area_chart.svg` | 面积累积趋势 | 流量趋势、用户增长 |-| `stacked_area_chart.svg` | 多系列堆叠趋势 | 营收来源、流量来源变化 |-| `dual_axis_line_chart.svg` | 双 Y 轴不同量纲对比 | 销量与利润率、流量与转化率 |--### 占比类--| 文件名 | 用途 | 适用场景 |-|--------|------|---------|-| `pie_chart.svg` | 基础占比(3-6 块) | 市场份额、预算分配 |-| `donut_chart.svg` | 环形占比(带中心数据) | 结构占比、类别构成 |-| `treemap_chart.svg` | 层级面积占比 | 预算分配、市场份额构成 |--### 指标类--| 文件名 | 用途 | 适用场景 |-|--------|------|---------|-| `kpi_cards.svg` | 关键指标卡片(2×2 / 1×4) | 财务总览、数据看板 |-| `gauge_chart.svg` | 仪表盘达成度 | KPI 完成率、性能监控 |-| `progress_bar_chart.svg` | 多项进度条对比 | OKR 进度、项目完成度 |--### 分析类--| 文件名 | 用途 | 适用场景 |-|--------|------|---------|-| `radar_chart.svg` | 多维度评估(4-8 维) | 能力评估、竞品对比 |-| `scatter_chart.svg` | 相关性 / 分布 | 投入产出、价格需求 |-| `funnel_chart.svg` | 转化漏斗(3-5 阶段) | 销售漏斗、用户转化 |-| `matrix_2x2.svg` | 四象限分析 | 波士顿矩阵、优先级分析 |-| `bubble_chart.svg` | 三维气泡(X/Y/大小) | 市场规模 vs 增长率 vs 份额 |-| `heatmap_chart.svg` | 矩阵热力图 | 用户活跃时段、相关性矩阵 |-| `pareto_chart.svg` | 80/20 帕累托分析 | 质量归因、销售贡献 |-| `box_plot_chart.svg` | 箱线图分布统计 | 薪资分布、质量控制 |--### 项目管理 / 关系类--| 文件名 | 用途 | 适用场景 |-|--------|------|---------|-| `gantt_chart.svg` | 甘特图排期(6-12 任务) | 项目管理、产品路线图 |-| `timeline.svg` | 时间轴事件(3-8 节点) | 里程碑、历史演进 |-| `process_flow.svg` | 流程图步骤 | 业务流程、操作指南 |-| `org_chart.svg` | 组织结构(2-4 层) | 公司架构、汇报关系 |-| `sankey_chart.svg` | 数据流向(三层级) | 预算流向、用户转化路径 |--### 战略框架类--| 文件名 | 用途 | 适用场景 |-|--------|------|---------|-| `swot_analysis.svg` | SWOT 四象限分析 | 战略规划、竞品分析 |-| `porter_five_forces.svg` | 波特五力模型 | 行业分析、市场进入评估 |+# SVG Chart Template Library (33 Types)++This directory provides **33 standardized SVG chart templates** for use as chart selection references in PPT Master.++- **Full Index**: [README.md](./README.md) (human browsing)+- **JSON Index**: [charts_index.json](./charts_index.json) (AI / programmatic lookup — preferred)++Before generating chart pages, review the corresponding template file to understand its structure and layout.++## Quick Selection++> **AI / Programmatic recommendation**: Prefer reading `charts_index.json`; use this README for human browsing and quick comparison.++| I want to show... | Recommended Template | Filename |+|-------------------|---------------------|----------|+| Key numeric metrics | KPI Cards | `kpi_cards.svg` |+| Category value comparison | Bar Chart | `bar_chart.svg` |+| Long-label rankings | Horizontal Bar Chart | `horizontal_bar_chart.svg` |+| Multi-series comparison | Grouped Bar Chart | `grouped_bar_chart.svg` |+| Time trends | Line Chart | `line_chart.svg` |+| Cumulative trends | Area Chart | `area_chart.svg` |+| Proportional composition | Pie / Donut Chart | `pie_chart.svg` / `donut_chart.svg` |+| Goal completion rate | Progress Bar / Gauge | `progress_bar_chart.svg` / `gauge_chart.svg` |+| Conversion funnel | Funnel Chart | `funnel_chart.svg` |+| Project scheduling | Gantt Chart | `gantt_chart.svg` |+| Milestone events | Timeline | `timeline.svg` |+| Multi-dimensional assessment | Radar Chart | `radar_chart.svg` |+| Bidirectional comparison | Butterfly Chart | `butterfly_chart.svg` |+| Incremental breakdown | Waterfall Chart | `waterfall_chart.svg` |+| Flow / fund allocation | Sankey Chart | `sankey_chart.svg` |+| Strategic analysis | SWOT / Porter's Five Forces | `swot_analysis.svg` / `porter_five_forces.svg` |+| Quadrant analysis | Matrix (2x2) | `matrix_2x2.svg` |++## Full Chart Index++### Comparison++| Filename | Purpose | Use Cases |+|----------|---------|-----------|+| `bar_chart.svg` | Vertical bar comparison (3-8 bars) | Sales comparison, regional ranking |+| `horizontal_bar_chart.svg` | Horizontal bar ranking (5-12 bars) | Brand ranking, satisfaction scores |+| `grouped_bar_chart.svg` | Multi-series grouped comparison | Quarterly product line comparison, YoY/QoQ |+| `stacked_bar_chart.svg` | Stacked composition comparison | Revenue composition, market share changes |+| `butterfly_chart.svg` | Bidirectional comparison | Population pyramid, A/B testing, income vs expense |+| `bullet_chart.svg` | Target vs actual | KPI achievement, performance evaluation |+| `dumbbell_chart.svg` | Multi-dimension score comparison | Competitive analysis, composite index |+| `waterfall_chart.svg` | Incremental change breakdown | Profit decomposition, budget variance |++### Trends++| Filename | Purpose | Use Cases |+|----------|---------|-----------|+| `line_chart.svg` | Line trend (multi-line support) | Time series, growth trends |+| `area_chart.svg` | Area cumulative trend | Traffic trends, user growth |+| `stacked_area_chart.svg` | Multi-series stacked trend | Revenue sources, traffic source changes |+| `dual_axis_line_chart.svg` | Dual Y-axis different-unit comparison | Sales vs profit margin, traffic vs conversion rate |++### Proportions++| Filename | Purpose | Use Cases |+|----------|---------|-----------|+| `pie_chart.svg` | Basic proportion (3-6 slices) | Market share, budget allocation |+| `donut_chart.svg` | Ring proportion (with center data) | Structural proportion, category composition |+| `treemap_chart.svg` | Hierarchical area proportion | Budget allocation, market share composition |++### Metrics++| Filename | Purpose | Use Cases |+|----------|---------|-----------|+| `kpi_cards.svg` | Key metric cards (2x2 / 1x4) | Financial overview, data dashboard |+| `gauge_chart.svg` | Gauge completion rate | KPI completion, performance monitoring |+| `progress_bar_chart.svg` | Multi-item progress bars | OKR progress, project completion |++### Analysis++| Filename | Purpose | Use Cases |+|----------|---------|-----------|+| `radar_chart.svg` | Multi-dimensional assessment (4-8 axes) | Capability assessment, competitive comparison |+| `scatter_chart.svg` | Correlation / distribution | Input-output analysis, price-demand |+| `funnel_chart.svg` | Conversion funnel (3-5 stages) | Sales funnel, user conversion |+| `matrix_2x2.svg` | Four-quadrant analysis | BCG matrix, priority analysis |+| `bubble_chart.svg` | 3D bubble (X/Y/Size) | Market size vs growth rate vs share |+| `heatmap_chart.svg` | Matrix heatmap | User activity periods, correlation matrix |+| `pareto_chart.svg` | 80/20 Pareto analysis | Quality attribution, sales contribution |+| `box_plot_chart.svg` | Box plot distribution | Salary distribution, quality control |++### Project Management / Relationships++| Filename | Purpose | Use Cases |+|----------|---------|-----------|+| `gantt_chart.svg` | Gantt schedule (6-12 tasks) | Project management, product roadmap |+| `timeline.svg` | Timeline events (3-8 nodes) | Milestones, historical evolution |+| `process_flow.svg` | Process flow steps | Business processes, operational guides |+| `org_chart.svg` | Org structure (2-4 levels) | Company structure, reporting relationships |+| `sankey_chart.svg` | Data flow (three-tier) | Budget flow, user conversion paths |++### Strategic Frameworks++| Filename | Purpose | Use Cases |+|----------|---------|-----------|+| `swot_analysis.svg` | SWOT four-quadrant analysis | Strategic planning, competitive analysis |+| `porter_five_forces.svg` | Porter's Five Forces model | Industry analysis, market entry assessment |diff --git a/skills/ppt-master/templates/charts/charts_index.json b/skills/ppt-master/templates/charts/charts_index.jsonindex 60c96633..6ab25c80 100644--- a/skills/ppt-master/templates/charts/charts_index.json+++ b/skills/ppt-master/templates/charts/charts_index.json@@ -9,7 +9,7 @@},"categories": {"comparison": {- "label": "对比类",+ "label": "Comparison","charts": ["bar_chart","horizontal_bar_chart",@@ -22,7 +22,7 @@]},"trend": {- "label": "趋势类",+ "label": "Trend","charts": ["line_chart","area_chart",@@ -31,7 +31,7 @@]},"composition": {- "label": "占比类",+ "label": "Composition","charts": ["pie_chart","donut_chart",@@ -39,7 +39,7 @@]},"metrics": {- "label": "指标类",+ "label": "Metrics","charts": ["kpi_cards","gauge_chart",@@ -47,7 +47,7 @@]},"analysis": {- "label": "分析类",+ "label": "Analysis","charts": ["radar_chart","scatter_chart",@@ -60,7 +60,7 @@]},"process": {- "label": "项目管理 / 关系类",+ "label": "Project Management / Relationships","charts": ["gantt_chart","timeline",@@ -70,7 +70,7 @@]},"strategy": {- "label": "战略框架类",+ "label": "Strategic Frameworks","charts": ["swot_analysis","porter_five_forces"@@ -146,834 +146,834 @@"charts": {"area_chart": {"file": "area_chart.svg",- "label": "面积图",+ "label": "Area Chart","category": "trend",- "summary": "趋势变化与累积数据展示",+ "summary": "Trend changes and cumulative data visualization","useCases": [- "流量趋势",- "销售累积",- "库存变化",- "用户增长"+ "Traffic trends",+ "Cumulative sales",+ "Inventory changes",+ "User growth"],"bestFor": [- "强调总量变化",- "1-2 个系列的累积趋势",- "连续时间序列"+ "Emphasizing total volume changes",+ "Cumulative trends for 1-2 series",+ "Continuous time series"],"avoidFor": [- "精确类别排名",- "超过 2 个系列叠加"+ "Precise category ranking",+ "More than 2 stacked series"],"keywords": [- "趋势",- "累积",- "面积图",- "时间序列"+ "trend",+ "cumulative",+ "area chart",+ "time series"]},"bar_chart": {"file": "bar_chart.svg",- "label": "柱状图",+ "label": "Bar Chart","category": "comparison",- "summary": "类别数值对比",+ "summary": "Category value comparison","useCases": [- "销售额对比",- "区域排名",- "年度数据对比"+ "Sales comparison",+ "Regional ranking",+ "Annual data comparison"],"bestFor": [- "3-8 个类别",- "单系列对比",- "直观展示高低差异"+ "3-8 categories",+ "Single-series comparison",+ "Intuitive high-low difference display"],"avoidFor": [- "时间趋势",- "超过 12 个长标签"+ "Time trends",+ "More than 12 long labels"],"keywords": [- "对比",- "排名",- "类别",- "柱状图"+ "comparison",+ "ranking",+ "category",+ "bar chart"]},"box_plot_chart": {"file": "box_plot_chart.svg",- "label": "箱线图",+ "label": "Box Plot","category": "analysis",- "summary": "数据分布与异常值分析",+ "summary": "Data distribution and outlier analysis","useCases": [- "薪资分布",- "成绩分析",- "质量控制",- "异常值检测"+ "Salary distribution",+ "Score analysis",+ "Quality control",+ "Outlier detection"],"bestFor": [- "多组分布对比",- "展示中位数与离散程度",- "统计分析页面"+ "Multi-group distribution comparison",+ "Showing median and dispersion",+ "Statistical analysis pages"],"avoidFor": [- "普通业务汇报的单值对比",- "读者不熟悉统计图形时的首页展示"+ "Single-value comparison in general business reports",+ "Front-page display when audience is unfamiliar with statistical charts"],"keywords": [- "分布",- "统计",- "异常值",- "箱线图"+ "distribution",+ "statistics",+ "outlier",+ "box plot"]},"bubble_chart": {"file": "bubble_chart.svg",- "label": "气泡图",+ "label": "Bubble Chart","category": "analysis",- "summary": "三维数据展示",+ "summary": "Three-dimensional data visualization","useCases": [- "市场规模 vs 增长率 vs 份额",- "风险评估",- "竞品分析"+ "Market size vs growth rate vs share",+ "Risk assessment",+ "Competitive analysis"],"bestFor": [- "同时展示 3 个维度",- "样本数中等的散点分布"+ "Displaying 3 dimensions simultaneously",+ "Moderate sample size scatter distribution"],"avoidFor": [- "精确读数要求高的场景",- "样本点过多导致重叠"+ "Scenarios requiring high precision readings",+ "Too many data points causing overlap"],"keywords": [- "相关性",- "三维",- "气泡图",- "竞品"+ "correlation",+ "three-dimensional",+ "bubble chart",+ "competitive"]},"bullet_chart": {"file": "bullet_chart.svg",- "label": "子弹图",+ "label": "Bullet Chart","category": "comparison",- "summary": "目标值与实际值对比",+ "summary": "Target vs actual value comparison","useCases": [- "KPI 达成",- "销售目标",- "预算执行",- "绩效评估"+ "KPI achievement",+ "Sales targets",+ "Budget execution",+ "Performance evaluation"],"bestFor": [- "目标 vs 实际",- "多指标并行展示",- "空间有限的仪表盘"+ "Target vs actual",+ "Multiple metrics in parallel",+ "Space-limited dashboards"],"avoidFor": [- "构成占比分析",- "复杂时间序列"+ "Composition/proportion analysis",+ "Complex time series"],"keywords": [- "目标",- "实际",- "绩效",- "子弹图"+ "target",+ "actual",+ "performance",+ "bullet chart"]},"butterfly_chart": {"file": "butterfly_chart.svg",- "label": "蝴蝶图",+ "label": "Butterfly Chart","category": "comparison",- "summary": "左右双向对比",+ "summary": "Bidirectional left-right comparison","useCases": [- "人口金字塔",- "AB 测试",- "男女对比",- "收支对比"+ "Population pyramid",+ "A/B testing",+ "Male vs female comparison",+ "Income vs expense comparison"],"bestFor": [- "双侧镜像对比",- "同一类别的两组数据"+ "Mirror-style bilateral comparison",+ "Two datasets for the same categories"],"avoidFor": [- "单侧排名",- "超过 2 组数据比较"+ "One-sided ranking",+ "Comparing more than 2 groups"],"keywords": [- "双向对比",- "蝴蝶图",- "镜像",- "人口结构"+ "bidirectional comparison",+ "butterfly chart",+ "mirror",+ "demographics"]},"donut_chart": {"file": "donut_chart.svg",- "label": "环形图",+ "label": "Donut Chart","category": "composition",- "summary": "占比和构成分析",+ "summary": "Proportion and composition analysis","useCases": [- "市场份额",- "预算分配",- "结构分析"+ "Market share",+ "Budget allocation",+ "Structural analysis"],"bestFor": [- "3-6 个部分构成",- "需要中心强调核心数字"+ "3-6 part composition",+ "Center emphasis on key figures"],"avoidFor": [- "类别过多的细分占比",- "需要精确排序"+ "Too many subcategory proportions",+ "Precise ranking required"],"keywords": [- "占比",- "构成",- "环形图",- "份额"+ "proportion",+ "composition",+ "donut chart",+ "share"]},"dual_axis_line_chart": {"file": "dual_axis_line_chart.svg",- "label": "双轴折线图",+ "label": "Dual-Axis Line Chart","category": "trend",- "summary": "双 Y 轴不同量纲趋势对比",+ "summary": "Dual Y-axis trend comparison with different units","useCases": [- "销量与利润率",- "流量与转化率"+ "Sales volume and profit margin",+ "Traffic and conversion rate"],"bestFor": [- "两个量纲差异较大的趋势",- "同时间轴下的双指标分析"+ "Two trends with significantly different units",+ "Dual-metric analysis on the same time axis"],"avoidFor": [- "超过 2 个核心指标",- "读者容易误读双轴时"+ "More than 2 core metrics",+ "When readers may misread dual axes"],"keywords": [- "双轴",- "折线图",- "趋势",- "量纲"+ "dual axis",+ "line chart",+ "trend",+ "unit of measure"]},"dumbbell_chart": {"file": "dumbbell_chart.svg",- "label": "哑铃图",+ "label": "Dumbbell Chart","category": "comparison",- "summary": "多维度得分或前后状态对比",+ "summary": "Multi-dimension scores or before-after state comparison","useCases": [- "竞品评估",- "综合指数",- "前后测比较"+ "Competitive evaluation",+ "Composite index",+ "Pre-post comparison"],"bestFor": [- "两组数值差异展示",- "指标前后变化"+ "Showing differences between two sets of values",+ "Before-and-after metric changes"],"avoidFor": [- "三组以上并列对比",- "精细时间序列"+ "Side-by-side comparison of more than three groups",+ "Detailed time series"],"keywords": [- "差异",- "前后对比",- "哑铃图",- "评估"+ "difference",+ "before-after comparison",+ "dumbbell chart",+ "evaluation"]},"funnel_chart": {"file": "funnel_chart.svg",- "label": "漏斗图",+ "label": "Funnel Chart","category": "analysis",- "summary": "阶段转化与流失分析",+ "summary": "Stage conversion and drop-off analysis","useCases": [- "销售漏斗",- "用户转化",- "流程筛选"+ "Sales funnel",+ "User conversion",+ "Process filtering"],"bestFor": [- "3-5 个阶段的转化过程",- "强调流失点"+ "3-5 stage conversion process",+ "Highlighting drop-off points"],"avoidFor": [- "非顺序型类别比较",- "阶段特别多的长流程"+ "Non-sequential category comparison",+ "Long processes with too many stages"],"keywords": [- "转化",- "漏斗",- "流失",- "阶段"+ "conversion",+ "funnel",+ "drop-off",+ "stage"]},"gantt_chart": {"file": "gantt_chart.svg",- "label": "甘特图",+ "label": "Gantt Chart","category": "process",- "summary": "项目排期与任务管理",+ "summary": "Project scheduling and task management","useCases": [- "项目管理",- "产品路线图",- "交付排期"+ "Project management",+ "Product roadmap",+ "Delivery scheduling"],"bestFor": [- "6-12 个任务的排期",- "展示时间跨度与依赖关系"+ "Scheduling 6-12 tasks",+ "Showing time spans and dependencies"],"avoidFor": [- "纯里程碑展示",- "任务数量过多"+ "Pure milestone display",+ "Too many tasks"],"keywords": [- "排期",- "甘特图",- "项目",- "路线图"+ "scheduling",+ "Gantt chart",+ "project",+ "roadmap"]},"gauge_chart": {"file": "gauge_chart.svg",- "label": "仪表盘",+ "label": "Gauge Chart","category": "metrics",- "summary": "目标达成度展示",+ "summary": "Goal achievement visualization","useCases": [- "KPI 完成率",- "性能监控",- "进度看板"+ "KPI completion rate",+ "Performance monitoring",+ "Progress dashboard"],"bestFor": [- "单指标达成度",- "强调目标完成状态"+ "Single-metric achievement",+ "Emphasizing goal completion status"],"avoidFor": [- "多类别比较",- "精确排名分析"+ "Multi-category comparison",+ "Precise ranking analysis"],"keywords": [- "达成度",- "仪表盘",+ "achievement",+ "gauge","KPI",- "进度"+ "progress"]},"grouped_bar_chart": {"file": "grouped_bar_chart.svg",- "label": "分组柱状图",+ "label": "Grouped Bar Chart","category": "comparison",- "summary": "多系列分组对比",+ "summary": "Multi-series grouped comparison","useCases": [- "季度产品线对比",- "同比环比",- "多区域多指标对比"+ "Quarterly product line comparison",+ "Year-over-year and month-over-month",+ "Multi-region multi-metric comparison"],"bestFor": [- "2-4 个系列对比",- "类别与系列同时存在"+ "2-4 series comparison",+ "Categories and series coexisting"],"avoidFor": [- "系列过多",- "标签过长且类别过多"+ "Too many series",+ "Long labels with too many categories"],"keywords": [- "分组",- "多系列",- "柱状图",- "同比"+ "grouped",+ "multi-series",+ "bar chart",+ "year-over-year"]},"heatmap_chart": {"file": "heatmap_chart.svg",- "label": "热力图",+ "label": "Heatmap","category": "analysis",- "summary": "矩阵强度与模式识别",+ "summary": "Matrix intensity and pattern recognition","useCases": [- "用户活跃时段",- "相关性矩阵",- "区域密度分析"+ "User activity time periods",+ "Correlation matrix",+ "Regional density analysis"],"bestFor": [- "二维矩阵数据",- "强弱模式识别"+ "Two-dimensional matrix data",+ "Identifying strong/weak patterns"],"avoidFor": [- "需要精确单元格数值时",- "维度标签过多难以阅读"+ "When precise cell values are needed",+ "Too many dimension labels making it hard to read"],"keywords": [- "热力图",- "矩阵",- "相关性",- "强度"+ "heatmap",+ "matrix",+ "correlation",+ "intensity"]},"horizontal_bar_chart": {"file": "horizontal_bar_chart.svg",- "label": "水平条形图",+ "label": "Horizontal Bar Chart","category": "comparison",- "summary": "长标签排名与类别对比",+ "summary": "Long-label ranking and category comparison","useCases": [- "品牌排行",- "满意度评分",- "长名称列表比较"+ "Brand ranking",+ "Satisfaction scores",+ "Long-name list comparison"],"bestFor": [- "5-12 条排名",- "长标签类别"+ "5-12 item ranking",+ "Long-label categories"],"avoidFor": [- "时间趋势",- "双量纲分析"+ "Time trends",+ "Dual-unit analysis"],"keywords": [- "排名",- "水平条形图",- "长标签",- "对比"+ "ranking",+ "horizontal bar chart",+ "long label",+ "comparison"]},"kpi_cards": {"file": "kpi_cards.svg",- "label": "KPI 卡片",+ "label": "KPI Cards","category": "metrics",- "summary": "关键数字指标总览",+ "summary": "Key numeric metrics overview","useCases": [- "财务总览",- "业务看板",- "高管摘要"+ "Financial overview",+ "Business dashboard",+ "Executive summary"],"bestFor": [- "2x2 或 1x4 指标总览",- "首页摘要页"+ "2x2 or 1x4 metrics overview",+ "Front-page summary"],"avoidFor": [- "趋势变化展示",- "复杂维度关联分析"+ "Trend change display",+ "Complex multi-dimension correlation analysis"],"keywords": ["KPI",- "指标卡",- "总览",- "仪表盘"+ "metric card",+ "overview",+ "dashboard"]},"line_chart": {"file": "line_chart.svg",- "label": "折线图",+ "label": "Line Chart","category": "trend",- "summary": "时间趋势展示",+ "summary": "Time trend visualization","useCases": [- "时间序列",- "增长趋势",- "月度变化"+ "Time series",+ "Growth trends",+ "Monthly changes"],"bestFor": [- "连续时间轴",- "1-3 个系列趋势对比"+ "Continuous time axis",+ "1-3 series trend comparison"],"avoidFor": [- "离散类别排名",- "单页过多系列"+ "Discrete category ranking",+ "Too many series on a single page"],"keywords": [- "趋势",- "折线图",- "增长",- "时间序列"+ "trend",+ "line chart",+ "growth",+ "time series"]},"matrix_2x2": {"file": "matrix_2x2.svg",- "label": "四象限矩阵",+ "label": "2x2 Matrix","category": "analysis",- "summary": "双维度定位与优先级分析",+ "summary": "Dual-dimension positioning and priority analysis","useCases": [- "波士顿矩阵",- "优先级分析",- "战略定位"+ "BCG matrix",+ "Priority analysis",+ "Strategic positioning"],"bestFor": [- "两个核心维度",- "战略取舍或分类定位"+ "Two core dimensions",+ "Strategic trade-offs or classification positioning"],"avoidFor": [- "单维度排序",- "需要精确数值读数的页面"+ "Single-dimension sorting",+ "Pages requiring precise numeric readings"],"keywords": [- "矩阵",- "四象限",- "优先级",- "定位"+ "matrix",+ "quadrant",+ "priority",+ "positioning"]},"org_chart": {"file": "org_chart.svg",- "label": "组织结构图",+ "label": "Organization Chart","category": "process",- "summary": "组织层级与汇报关系展示",+ "summary": "Organizational hierarchy and reporting relationships","useCases": [- "公司架构",- "部门分工",- "汇报关系"+ "Company structure",+ "Department division",+ "Reporting relationships"],"bestFor": [- "2-4 层组织结构",- "关系链清晰展示"+ "2-4 level organizational structure",+ "Clear relationship chain display"],"avoidFor": [- "流程步骤说明",- "大量节点的复杂网络图"+ "Process step descriptions",+ "Complex network diagrams with many nodes"],"keywords": [- "组织",- "结构图",- "层级",- "汇报关系"+ "organization",+ "org chart",+ "hierarchy",+ "reporting relationship"]},"pareto_chart": {"file": "pareto_chart.svg",- "label": "帕累托图",+ "label": "Pareto Chart","category": "analysis",- "summary": "80/20 贡献分析",+ "summary": "80/20 contribution analysis","useCases": [- "质量归因",- "销售贡献",- "问题优先级"+ "Quality attribution",+ "Sales contribution",+ "Problem prioritization"],"bestFor": [- "排序后找关键少数",- "柱线结合展示累计贡献"+ "Identifying the vital few after sorting",+ "Bar-line combination showing cumulative contribution"],"avoidFor": [- "无明显头部集中的数据",- "纯时间趋势"+ "Data without clear top-heavy concentration",+ "Pure time trends"],"keywords": [- "帕累托",+ "Pareto","80/20",- "累计贡献",- "优先级"+ "cumulative contribution",+ "priority"]},"pie_chart": {"file": "pie_chart.svg",- "label": "饼图",+ "label": "Pie Chart","category": "composition",- "summary": "基础占比构成",+ "summary": "Basic proportion and composition","useCases": [- "市场份额",- "预算分配",- "类别构成"+ "Market share",+ "Budget allocation",+ "Category composition"],"bestFor": [- "3-6 个部分占比",- "单层构成分析"+ "3-6 part proportions",+ "Single-layer composition analysis"],"avoidFor": [- "部分太多或差异很小",- "需要精确比较细微差距"+ "Too many parts or very small differences",+ "Precise comparison of subtle differences needed"],"keywords": [- "占比",- "饼图",- "构成",- "份额"+ "proportion",+ "pie chart",+ "composition",+ "share"]},"porter_five_forces": {"file": "porter_five_forces.svg",- "label": "波特五力模型",+ "label": "Porter's Five Forces","category": "strategy",- "summary": "行业竞争结构分析",+ "summary": "Industry competitive structure analysis","useCases": [- "行业分析",- "市场进入评估",- "竞争策略"+ "Industry analysis",+ "Market entry assessment",+ "Competitive strategy"],"bestFor": [- "战略报告",- "行业进入与竞争格局分析"+ "Strategic reports",+ "Industry entry and competitive landscape analysis"],"avoidFor": [- "运营层面的细节流程",- "纯数据排名页"+ "Operational-level detail processes",+ "Pure data ranking pages"],"keywords": [- "战略",- "五力模型",- "行业分析",- "竞争"+ "strategy",+ "five forces",+ "industry analysis",+ "competition"]},"process_flow": {"file": "process_flow.svg",- "label": "流程图",+ "label": "Process Flow","category": "process",- "summary": "流程步骤与阶段关系展示",+ "summary": "Process steps and stage relationship visualization","useCases": [- "业务流程",- "操作指南",- "方法论步骤"+ "Business process",+ "Operation guide",+ "Methodology steps"],"bestFor": [- "3-8 个步骤",- "顺序型流程说明"+ "3-8 steps",+ "Sequential process description"],"avoidFor": [- "复杂网状关系",- "精细排期"+ "Complex network relationships",+ "Detailed scheduling"],"keywords": [- "流程",- "步骤",- "流程图",- "方法论"+ "process",+ "steps",+ "flowchart",+ "methodology"]},"progress_bar_chart": {"file": "progress_bar_chart.svg",- "label": "进度条图",+ "label": "Progress Bar Chart","category": "metrics",- "summary": "多项进度与完成度对比",+ "summary": "Multi-item progress and completion comparison","useCases": [- "OKR 进度",- "项目完成度",- "任务状态"+ "OKR progress",+ "Project completion",+ "Task status"],"bestFor": [- "多项任务并排比较",- "完成率展示"+ "Side-by-side comparison of multiple tasks",+ "Completion rate display"],"avoidFor": [- "精细时间趋势",- "复杂构成分析"+ "Detailed time trends",+ "Complex composition analysis"],"keywords": [- "进度",- "完成率",- "进度条",+ "progress",+ "completion rate",+ "progress bar","OKR"]},"radar_chart": {"file": "radar_chart.svg",- "label": "雷达图",+ "label": "Radar Chart","category": "analysis",- "summary": "多维能力评估",+ "summary": "Multi-dimensional capability assessment","useCases": [- "能力评估",- "竞品对比",- "综合指数"+ "Capability assessment",+ "Competitive comparison",+ "Composite index"],"bestFor": [- "4-8 个维度",- "轮廓型综合对比"+ "4-8 dimensions",+ "Profile-based comprehensive comparison"],"avoidFor": [- "维度特别多",- "需要精确排序"+ "Too many dimensions",+ "Precise ranking required"],"keywords": [- "雷达图",- "多维评估",- "能力",- "竞品"+ "radar chart",+ "multi-dimensional assessment",+ "capability",+ "competitive"]},"sankey_chart": {"file": "sankey_chart.svg",- "label": "桑基图",+ "label": "Sankey Diagram","category": "process",- "summary": "流量或资源流向展示",+ "summary": "Flow or resource direction visualization","useCases": [- "预算流向",- "用户转化路径",- "资源分配"+ "Budget flow",+ "User conversion path",+ "Resource allocation"],"bestFor": [- "三层级流向",- "强调流量去向与损耗"+ "Three-level flow direction",+ "Emphasizing flow destination and loss"],"avoidFor": [- "节点特别多的复杂网络",- "精确排名页"+ "Complex networks with too many nodes",+ "Precise ranking pages"],"keywords": [- "流向",- "桑基图",- "转化路径",- "资源分配"+ "flow direction",+ "Sankey diagram",+ "conversion path",+ "resource allocation"]},"scatter_chart": {"file": "scatter_chart.svg",- "label": "散点图",+ "label": "Scatter Plot","category": "analysis",- "summary": "相关性与分布分析",+ "summary": "Correlation and distribution analysis","useCases": [- "投入产出",- "价格需求",- "样本分布"+ "Input vs output",+ "Price vs demand",+ "Sample distribution"],"bestFor": [- "X/Y 双维度关系",- "寻找聚类与离群点"+ "X/Y dual-dimension relationship",+ "Finding clusters and outliers"],"avoidFor": [- "顺序型流程",- "简单单维排名"+ "Sequential processes",+ "Simple single-dimension ranking"],"keywords": [- "散点图",- "相关性",- "分布",- "离群点"+ "scatter plot",+ "correlation",+ "distribution",+ "outlier"]},"stacked_area_chart": {"file": "stacked_area_chart.svg",- "label": "堆叠面积图",+ "label": "Stacked Area Chart","category": "trend",- "summary": "多系列堆叠趋势",+ "summary": "Multi-series stacked trend","useCases": [- "营收来源",- "流量来源变化",- "构成随时间变化"+ "Revenue sources",+ "Traffic source changes",+ "Composition changes over time"],"bestFor": [- "总量与构成同时变化",- "2-4 个系列趋势"+ "Total and composition changing simultaneously",+ "2-4 series trends"],"avoidFor": [- "系列过多导致难读",- "精确比较中间层细微变化"+ "Too many series making it hard to read",+ "Precise comparison of subtle changes in middle layers"],"keywords": [- "堆叠",- "面积图",- "趋势",- "构成变化"+ "stacked",+ "area chart",+ "trend",+ "composition change"]},"stacked_bar_chart": {"file": "stacked_bar_chart.svg",- "label": "堆叠柱状图",+ "label": "Stacked Bar Chart","category": "comparison",- "summary": "构成与总量并行对比",+ "summary": "Composition and total side-by-side comparison","useCases": [- "收入构成",- "市场份额变化",- "分项贡献比较"+ "Revenue composition",+ "Market share changes",+ "Sub-item contribution comparison"],"bestFor": [- "类别总量 + 构成展示",- "2-4 个构成部分"+ "Category total + composition display",+ "2-4 composition parts"],"avoidFor": [- "需要比较中间段微小差异",- "类别和部分都过多"+ "Comparing subtle differences in middle segments",+ "Too many categories and parts"],"keywords": [- "堆叠柱状图",- "构成",- "贡献",- "总量"+ "stacked bar chart",+ "composition",+ "contribution",+ "total"]},"swot_analysis": {"file": "swot_analysis.svg",- "label": "SWOT 分析",+ "label": "SWOT Analysis","category": "strategy",- "summary": "优势劣势机会威胁分析",+ "summary": "Strengths, weaknesses, opportunities, and threats analysis","useCases": [- "战略规划",- "竞品分析",- "业务诊断"+ "Strategic planning",+ "Competitive analysis",+ "Business diagnosis"],"bestFor": [- "四象限战略分析",- "高层沟通与策略讨论"+ "Four-quadrant strategic analysis",+ "Executive communication and strategy discussion"],"avoidFor": [- "纯定量数据排名",- "细化到执行排期"+ "Pure quantitative data ranking",+ "Detailed execution scheduling"],"keywords": ["SWOT",- "战略",- "优势劣势",- "机会威胁"+ "strategy",+ "strengths and weaknesses",+ "opportunities and threats"]},"timeline": {"file": "timeline.svg",- "label": "时间轴",+ "label": "Timeline","category": "process",- "summary": "里程碑与历史演进展示",+ "summary": "Milestones and historical evolution display","useCases": [- "里程碑",- "历史演进",- "发展阶段"+ "Milestones",+ "Historical evolution",+ "Development stages"],"bestFor": [- "3-8 个关键节点",- "按时间顺序讲故事"+ "3-8 key nodes",+ "Storytelling in chronological order"],"avoidFor": [- "详细任务排期",- "复杂关系网络"+ "Detailed task scheduling",+ "Complex relationship networks"],"keywords": [- "时间轴",- "里程碑",- "历史",- "演进"+ "timeline",+ "milestone",+ "history",+ "evolution"]},"treemap_chart": {"file": "treemap_chart.svg",- "label": "矩形树图",+ "label": "Treemap","category": "composition",- "summary": "层级面积占比展示",+ "summary": "Hierarchical area proportion display","useCases": [- "预算分配",- "市场份额构成",- "层级资源占比"+ "Budget allocation",+ "Market share composition",+ "Hierarchical resource proportion"],"bestFor": [- "层级型占比数据",- "同时比较大小与分组"+ "Hierarchical proportion data",+ "Comparing size and grouping simultaneously"],"avoidFor": [- "时间趋势",- "需要严格排序的类别"+ "Time trends",+ "Categories requiring strict sorting"],"keywords": [- "矩形树图",- "面积占比",- "层级",- "构成"+ "treemap",+ "area proportion",+ "hierarchy",+ "composition"]},"waterfall_chart": {"file": "waterfall_chart.svg",- "label": "瀑布图",+ "label": "Waterfall Chart","category": "comparison",- "summary": "增减变化分解",+ "summary": "Incremental change breakdown","useCases": [- "利润分解",- "预算变化",- "业绩桥分析"+ "Profit breakdown",+ "Budget changes",+ "Performance bridge analysis"],"bestFor": [- "起点到终点的变化拆解",- "展示正负向贡献"+ "Start-to-end change decomposition",+ "Showing positive and negative contributions"],"avoidFor": [- "时间趋势折线分析",- "纯占比构成页"+ "Time trend line analysis",+ "Pure proportion composition pages"],"keywords": [- "瀑布图",- "变化分解",- "贡献",- "桥分析"+ "waterfall chart",+ "change breakdown",+ "contribution",+ "bridge analysis"]}}diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.mdindex fca66ffa..ae21b4df 100644--- a/skills/ppt-master/templates/design_spec_reference.md+++ b/skills/ppt-master/templates/design_spec_reference.md@@ -1,268 +1,268 @@-# {project_name} - 设计规范与内容大纲+# {project_name} - Design Spec-## 一、项目信息+## I. Project Information-| 项目 | 内容 |-| ------------ | --------------------------------------------------- |-| **项目名称** | {project_name} |-| **画布格式** | {canvas_info['name']} ({canvas_info['dimensions']}) |-| **页数** | [由 Strategist 填写] |-| **设计风格** | {design_style} |-| **目标受众** | [由 Strategist 填写] |-| **使用场景** | [由 Strategist 填写] |-| **创建日期** | {date_str} |+| Item | Value |+| ---- | ----- |+| **Project Name** | {project_name} |+| **Canvas Format** | {canvas_info['name']} ({canvas_info['dimensions']}) |+| **Page Count** | [Filled by Strategist] |+| **Design Style** | {design_style} |+| **Target Audience** | [Filled by Strategist] |+| **Use Case** | [Filled by Strategist] |+| **Created Date** | {date_str} |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |-| ------------ | ---------------------------------------------- |-| **格式** | {canvas_info['name']} |-| **尺寸** | {canvas_info['dimensions']} |-| **viewBox** | `{canvas_info['viewbox']}` |-| **边距** | [由 Strategist 推荐,如:左右 60px,上下 50px] |-| **内容区域** | [根据画布计算] |+| Property | Value |+| -------- | ----- |+| **Format** | {canvas_info['name']} |+| **Dimensions** | {canvas_info['dimensions']} |+| **viewBox** | `{canvas_info['viewbox']}` |+| **Margins** | [Recommended by Strategist, e.g., left/right 60px, top/bottom 50px] |+| **Content Area** | [Calculated from canvas] |----## 三、视觉主题+## III. Visual Theme-### 主题风格+### Theme Style-- **风格**: {design_style}-- **主题**: [亮色主题 / 深色主题]-- **调性**: [由 Strategist 填写,如:科技、专业、现代、创新]+- **Style**: {design_style}+- **Theme**: [Light theme / Dark theme]+- **Tone**: [Filled by Strategist, e.g., tech, professional, modern, innovative]-### 配色方案+### Color Scheme-> Strategist 应根据项目内容、行业属性、品牌色彩确定具体色值+> Strategist should determine specific color values based on project content, industry, and brand colors-| 角色 | 色值 | 用途 |-| ------------- | --------- | ------------------------------------------------------- |-| **背景色** | `#......` | 页面背景(亮色主题通常为白色系,深色主题为深灰/深蓝系) |-| **次背景** | `#......` | 卡片背景、区块背景 |-| **主导色** | `#......` | 标题装饰、重点区块、图标 |-| **强调色** | `#......` | 数据高亮、关键信息、链接 |-| **辅助强调** | `#......` | 次要强调、渐变过渡 |-| **正文文字** | `#......` | 主要正文(深色主题用浅色文字) |-| **次要文字** | `#......` | 说明文字、标注 |-| **弱文字** | `#......` | 辅助信息、页脚 |-| **边框/分割** | `#......` | 卡片边框、分割线 |-| **成功色** | `#......` | 正向指标(绿色系) |-| **警示色** | `#......` | 问题标注(红色系) |+| Role | HEX | Purpose |+| ---- | --- | ------- |+| **Background** | `#......` | Page background (light theme typically white; dark theme dark gray/navy) |+| **Secondary bg** | `#......` | Card background, section background |+| **Primary** | `#......` | Title decorations, key sections, icons |+| **Accent** | `#......` | Data highlights, key information, links |+| **Secondary accent** | `#......` | Secondary emphasis, gradient transitions |+| **Body text** | `#......` | Main body text (dark theme uses light text) |+| **Secondary text** | `#......` | Captions, annotations |+| **Tertiary text** | `#......` | Supplementary info, footers |+| **Border/divider** | `#......` | Card borders, divider lines |+| **Success** | `#......` | Positive indicators (green family) |+| **Warning** | `#......` | Issue markers (red family) |-> 💡 **参考**: 行业配色见 `references/strategist.md` 或 `scripts/config.py` 中的 `INDUSTRY_COLORS`+> **Reference**: Industry colors in `references/strategist.md` or `scripts/config.py` under `INDUSTRY_COLORS`-### 渐变方案(如需要,使用 SVG 语法)+### Gradient Scheme (if needed, using SVG syntax)```xml-<!-- 主标题渐变 -->+<!-- Title gradient --><linearGradient id="titleGradient" x1="0%" y1="0%" x2="100%" y2="100%">- <stop offset="0%" stop-color="#[主导色]"/>- <stop offset="100%" stop-color="#[辅助强调]"/>+ <stop offset="0%" stop-color="#[primary]"/>+ <stop offset="100%" stop-color="#[secondary accent]"/></linearGradient>-<!-- 背景装饰渐变(注意:禁止使用 rgba,用 stop-opacity) -->+<!-- Background decorative gradient (note: rgba forbidden, use stop-opacity) --><radialGradient id="bgDecor" cx="80%" cy="20%" r="50%">- <stop offset="0%" stop-color="#[主导色]" stop-opacity="0.15"/>- <stop offset="100%" stop-color="#[主导色]" stop-opacity="0"/>+ <stop offset="0%" stop-color="#[primary]" stop-opacity="0.15"/>+ <stop offset="100%" stop-color="#[primary]" stop-opacity="0"/></radialGradient>```----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Plan-> Strategist 应根据内容特征选择字体预设,或自定义字体组合-> 预设说明:P1=现代商务科技 | P2=政务公文 | P3=文化艺术 | P4=传统稳重 | P5=英文为主+> Strategist should select a font preset based on content characteristics, or customize the font combination+> Preset descriptions: P1=Modern business/tech | P2=Government docs | P3=Culture/arts | P4=Traditional/conservative | P5=English-primary-**推荐预设**: [填写预设编号]+**Recommended preset**: [Fill in preset code]-| 角色 | 中文 | 英文 | 备选 |-| -------- | -------- | -------- | -------- |-| **标题** | [字体名] | [字体名] | [字体名] |-| **正文** | [字体名] | [字体名] | [字体名] |-| **代码** | - | Consolas | Monaco |-| **强调** | [字体名] | [字体名] | [字体名] |+| Role | Chinese | English | Fallback |+| ---- | ------- | ------- | -------- |+| **Title** | [font name] | [font name] | [font name] |+| **Body** | [font name] | [font name] | [font name] |+| **Code** | - | Consolas | Monaco |+| **Emphasis** | [font name] | [font name] | [font name] |-**字体栈**: `[填写 CSS font-family 字符串]`+**Font stack**: `[Fill in CSS font-family string]`-> 💡 **参考**: 字体分类详见 `references/design-guidelines.md`+> **Reference**: Font categories in `references/design-guidelines.md`-### 字号层级+### Font Size Hierarchy-> **设计原则**: 以正文字号为基准 (1×),通过比例关系推导其他层级-> **单位规范**: 统一使用 px(SVG 原生单位),避免 pt/px 换算错误-> **选择原则**: 字号根据**内容密度**选择,而非设计风格+> **Design principle**: Use body font size as baseline (1x), derive other levels proportionally+> **Unit convention**: Use px uniformly (SVG native unit) to avoid pt/px conversion errors+> **Selection principle**: Font size is based on **content density**, not design style-**基准**: 正文字号 = [填写]px(根据内容密度选择 18-24px)+**Baseline**: Body font size = [fill in]px (choose 18-24px based on content density)-| 用途 | 比例 | 24px基准(宽松) | 18px基准(密集) | 字重 |-| -------------- | ---------- | ---------------- | ---------------- | -------- |-| 标题页(封面) | 2.5-3× | 60-72px | 45-54px | Bold |-| 章节标题 | 2-2.5× | 48-60px | 36-45px | Bold |-| 内容标题 | 1.5-2× | 36-48px | 27-36px | Bold |-| 副标题/小标题 | 1.2-1.5× | 29-36px | 22-27px | SemiBold |-| **正文内容** | **1×** | **24px** | **18px** | Regular |-| 注释/备注 | 0.75-0.85× | 18-20px | 14-15px | Regular |-| 页码/日期 | 0.55-0.65× | 13-16px | 10-12px | Regular |+| Purpose | Ratio | 24px baseline (relaxed) | 18px baseline (dense) | Weight |+| ------- | ----- | ---------------------- | -------------------- | ------ |+| Cover title | 2.5-3x | 60-72px | 45-54px | Bold |+| Chapter title | 2-2.5x | 48-60px | 36-45px | Bold |+| Content title | 1.5-2x | 36-48px | 27-36px | Bold |+| Subtitle | 1.2-1.5x | 29-36px | 22-27px | SemiBold |+| **Body content** | **1x** | **24px** | **18px** | Regular |+| Annotation | 0.75-0.85x | 18-20px | 14-15px | Regular |+| Page number/date | 0.55-0.65x | 13-16px | 10-12px | Regular |-> 💡 **建议**: 内容密集(每页6+要点)用 18px;内容宽松(每页3-5要点)用 24px+> **Tip**: Dense content (6+ points per page) use 18px; relaxed content (3-5 points per page) use 24px----## 五、布局原则+## V. Layout Principles-### 页面结构+### Page Structure-- **页眉区**: [高度及内容说明]-- **内容区**: [高度及内容说明]-- **页脚区**: [高度及内容说明]+- **Header area**: [Height and content description]+- **Content area**: [Height and content description]+- **Footer area**: [Height and content description]-### 常用布局模式+### Common Layout Modes-| 模式 | 适用场景 |-| ------------------ | -------------------- |-| **单栏居中** | 封面、结语、重要观点 |-| **左右分栏 (5:5)** | 对比、双概念 |-| **左右分栏 (4:6)** | 图文混排 |-| **上下分栏** | 流程、时间线 |-| **三栏/四栏卡片** | 特性列表、角色介绍 |-| **矩阵网格** | 对比分析、分类展示 |+| Mode | Suitable Scenarios |+| ---- | ----------------- |+| **Single column centered** | Covers, conclusions, key points |+| **Left-right split (5:5)** | Comparisons, dual concepts |+| **Left-right split (4:6)** | Image-text mix |+| **Top-bottom split** | Processes, timelines |+| **Three/four column cards** | Feature lists, team introductions |+| **Matrix grid** | Comparative analysis, classifications |-### 间距规范+### Spacing Specification-> Strategist 可根据项目需求调整+> Strategist may adjust based on project needs-| 元素 | 推荐范围 | 当前项目 |-| ---------- | -------- | -------- |-| 卡片间距 | 20-32px | [填写] |-| 内容块间距 | 24-40px | [填写] |-| 卡片内边距 | 20-32px | [填写] |-| 卡片圆角 | 8-16px | [填写] |-| 图标与文字 | 8-16px | [填写] |+| Element | Recommended Range | Current Project |+| ------- | ---------------- | --------------- |+| Card gap | 20-32px | [fill in] |+| Content block gap | 24-40px | [fill in] |+| Card padding | 20-32px | [fill in] |+| Card border radius | 8-16px | [fill in] |+| Icon-text gap | 8-16px | [fill in] |----## 六、图标使用规范+## VI. Icon Usage Specification-### 来源+### Source-- **内置图标库**: `templates/icons/` (640+ 图标)-- **使用方式**: 占位符格式 `{{{{icon:类别/图标名}}}}`+- **Built-in icon library**: `templates/icons/` (640+ icons)+- **Usage method**: Placeholder format `{{icon:category/icon-name}}`-### 推荐图标清单(按需填写)+### Recommended Icon List (fill as needed)-| 用途 | 图标路径 | 页面 |-| ------ | ------------------------------------- | -------- |-| [示例] | `{{{{icon:interface/check-circle}}}}` | Slide XX |+| Purpose | Icon Path | Page |+| ------- | --------- | ---- |+| [example] | `{{icon:interface/check-circle}}` | Slide XX |----## 七、图片资源清单(如需要)+## VII. Image Resource List (if needed)-| 文件名 | 尺寸 | 比例 | 用途 | 类型 | 状态 | 生成描述 |-| ------------ | --------------------------- | ------ | -------- | -------------------------------------------- | -------------------- | -------------- |-| cover_bg.png | {canvas_info['dimensions']} | [比例] | 封面背景 | [背景图/实景照片/插画配图/图表架构/装饰图案] | [待生成/已有/占位符] | [AI生成提示词] |+| Filename | Dimensions | Ratio | Purpose | Type | Status | Generation Description |+| -------- | --------- | ----- | ------- | ---- | ------ | --------------------- |+| cover_bg.png | {canvas_info['dimensions']} | [ratio] | Cover background | [Background/Photography/Illustration/Diagram/Decorative] | [Pending/Existing/Placeholder] | [AI generation prompt] |-**状态说明**:+**Status descriptions**:-- **待生成** - 需要 AI 生成,提供详细描述-- **已有** - 用户已有图片,直接放入 `images/`-- **占位符** - 暂不处理,SVG 中用虚线框占位+- **Pending** - Needs AI generation, provide detailed description+- **Existing** - User already has image, place in `images/`+- **Placeholder** - Not yet processed, use dashed border placeholder in SVG-**类型说明**(Image_Generator 用于选择提示词策略):+**Type descriptions** (used by Image_Generator for prompt strategy selection):-- **背景图** - 封面/章节页全页背景,需预留文字区域-- **实景照片** - 真实场景、人物、产品、建筑等-- **插画配图** - 扁平设计、矢量风格、卡通、概念图解-- **图表架构** - 流程图、架构图、概念关系图-- **装饰图案** - 局部装饰、纹理、边框、分隔元素+- **Background** - Full-page background for covers/chapters, reserve text area+- **Photography** - Real scenes, people, products, architecture+- **Illustration** - Flat design, vector style, cartoon, concept diagrams+- **Diagram** - Flowcharts, architecture diagrams, concept maps+- **Decorative** - Partial decorations, textures, borders, dividers----## 八、内容大纲+## VIII. Content Outline-### 第一部分:[章节名称]+### Part 1: [Chapter Name]-#### Slide 01 - 封面+#### Slide 01 - Cover-- **布局**: 全屏背景图 + 居中标题-- **标题**: [主标题]-- **副标题**: [副标题]-- **信息**: [作者/日期/单位]+- **Layout**: Full-screen background image + centered title+- **Title**: [Main title]+- **Subtitle**: [Subtitle]+- **Info**: [Author / Date / Organization]-#### Slide 02 - [页面名称]+#### Slide 02 - [Page Name]-- **布局**: [选择布局模式]-- **标题**: [页面标题]-- **内容**:- - [要点1]- - [要点2]- - [要点3]+- **Layout**: [Choose layout mode]+- **Title**: [Page title]+- **Content**:+ - [Point 1]+ - [Point 2]+ - [Point 3]----[由 Strategist 根据源文档内容和页数规划继续添加更多页面...]+[Strategist continues adding more pages based on source document content and page count planning...]----## 九、演讲备注要求+## IX. Speaker Notes Requirements-每页生成对应的演讲备注文件,保存到 `notes/` 目录:+Generate corresponding speaker note files for each page, saved to the `notes/` directory:-- **文件命名**: 与 SVG 同名,如 `01_封面.md`-- **内容包含**: 讲稿要点、时间提示、过渡语+- **File naming**: Match SVG names, e.g., `01_cover.md`+- **Content includes**: Script key points, timing cues, transition phrases----## 十、技术约束提醒+## X. Technical Constraints Reminder-### SVG 生成必须遵守:+### SVG Generation Must Follow:1. viewBox: `{canvas_info['viewbox']}`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`+2. Background uses `<rect>` elements+3. Text wrapping uses `<tspan>` (`<foreignObject>` FORBIDDEN)+4. Transparency uses `fill-opacity` / `stroke-opacity`; `rgba()` FORBIDDEN+5. FORBIDDEN: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. FORBIDDEN: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Arrows use `<polygon>` triangles instead of `<marker>`-### PPT 兼容性规则:+### PPT Compatibility Rules:-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代(`<rect fill="背景色" opacity="0.x"/>`)-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`+- `<g opacity="...">` FORBIDDEN (group opacity); set on each child element individually+- Image transparency uses overlay mask layer (`<rect fill="bg-color" opacity="0.x"/>`)+- Inline styles only; external CSS and `@font-face` FORBIDDEN----## 十一、设计检查清单+## XI. Design Checklist-### 生成前+### Pre-generation-- [ ] 内容符合页面容量-- [ ] 布局模式选择正确-- [ ] 颜色使用符合语义+- [ ] Content fits page capacity+- [ ] Layout mode selected correctly+- [ ] Colors used semantically-### 生成后+### Post-generation- [ ] viewBox = `{canvas_info['viewbox']}`-- [ ] 无 `<foreignObject>` 元素-- [ ] 所有文本可读(≥14px)-- [ ] 内容在安全区域内-- [ ] 所有元素对齐到网格-- [ ] 相同元素保持一致样式-- [ ] 颜色符合规范-- [ ] CRAP 四原则检查通过+- [ ] No `<foreignObject>` elements+- [ ] All text readable (>=14px)+- [ ] Content within safe area+- [ ] All elements aligned to grid+- [ ] Same elements maintain consistent style+- [ ] Colors conform to spec+- [ ] CRAP four-principle check passed----## 十二、下一步+## XII. Next Steps-1. ✅ 设计规范已完成-2. **下一步**: [根据图片方式选择]- - 无 AI 图片 → 调用 **Executor** 角色生成 SVG- - 有 AI 图片 → 调用 **Image_Generator** 角色,完成后再调用 Executor+1. ✅ Design spec complete+2. **Next step**: [Choose based on image approach]+ - No AI images → Invoke **Executor** role to generate SVGs+ - Has AI images → Invoke **Image_Generator** role, then invoke Executor after completiondiff --git a/skills/ppt-master/templates/icons/FULL_INDEX.md b/skills/ppt-master/templates/icons/FULL_INDEX.mdindex 6cd4dc7e..0fd67535 100644--- a/skills/ppt-master/templates/icons/FULL_INDEX.md+++ b/skills/ppt-master/templates/icons/FULL_INDEX.md@@ -1,273 +1,272 @@-# SVG 图标完整索引+# SVG Icon Full Index-本文档包含 **640+ 个图标** 的完整分类列表。快速使用指南请参阅 [README.md](./README.md)。+This document contains a complete categorized list of **640+ icons**. For a quick usage guide, see [README.md](./README.md).----## 📍 导航与箭头 (50+)+## 📍 Navigation & Arrows (50+)-**基础箭头**+**Basic Arrows**`arrow-up` `arrow-down` `arrow-left` `arrow-right` `arrow-up-left` `arrow-up-right` `arrow-down-left` `arrow-down-right`-**带线箭头**+**Line Arrows**`arrow-up-from-line` `arrow-up-to-line` `arrow-down-from-line` `arrow-down-to-line` `arrow-left-from-line` `arrow-left-to-line` `arrow-right-from-line` `arrow-right-to-line`-**转向箭头**+**Turn Arrows**`arrow-turn-down-left` `arrow-turn-down-right` `arrow-turn-up-left` `arrow-turn-up-right` `arrow-u-down-left` `arrow-u-up-right`-**趋势箭头**+**Trend Arrows**`arrow-trend-up` `arrow-trend-down` `arrow-up-wide-short` `arrow-down-wide-short`-**双向箭头**+**Bidirectional Arrows**`arrows-left-right` `arrows-up-down` `arrow-left-arrow-right` `arrow-up-arrow-down`-**旋转箭头**+**Rotating Arrows**`arrow-rotate-left` `arrow-rotate-right` `arrows-rotate-clockwise` `arrows-rotate-counter-clockwise` `arrows-repeat`-**角度符号**+**Angle Symbols**`angle-up` `angle-down` `angle-left` `angle-right` `angles-up` `angles-down` `angles-left` `angles-right` `caret-up` `caret-down` `caret-left` `caret-right`-**圆形箭头**+**Circle Arrows**`circle-arrow-up` `circle-arrow-down` `circle-arrow-left` `circle-arrow-right`----## 👤 用户与人物 (10+)+## 👤 Users & People (10+)`user` `users` `person` `person-walking` `person-wave` `circle-user` `square-user` `group` `address-card` `head-side`----## 📊 数据与图表 (15+)+## 📊 Data & Charts (15+)`chart-bar` `chart-line` `chart-pie` `arrow-trend-up` `arrow-trend-down` `gauge-high` `gauge-medium` `gauge-low` `table` `database` `server` `funnel` `filter` `sort` `sliders`----## 📁 文件与文件夹 (15+)+## 📁 Files & Folders (15+)`file` `file-plus` `files` `folder` `folder-open` `folders` `floppy-disk` `archive-box` `clipboard` `copy` `image` `images` `newspaper` `receipt` `sticky-note`----## ✅ 状态与反馈 (20+)+## ✅ Status & Feedback (20+)-**成功/确认**+**Success / Confirmation**`checkmark` `circle-checkmark` `square-checkmark` `badge-check` `shield-check` `thumbs-up`-**错误/取消**+**Error / Cancel**`x` `x-1` `circle-x` `square-x` `ban` `thumbs-down`-**警告/提示**+**Warning / Info**`circle-exclamation` `triangle-exclamation` `diamond-exclamation` `octagon-exclamation` `circle-info` `circle-question`-**加减操作**+**Add / Remove**`plus` `minus` `circle-plus` `circle-minus` `square-plus` `square-minus`----## 🔧 工具与操作 (25+)+## 🔧 Tools & Actions (25+)-**编辑工具**+**Editing Tools**`pencil` `pencil-square` `pen-nib` `brush` `paint-bucket` `paint-roller` `eyedropper` `palette` `crop` `scissors` `ruler`-**系统操作**+**System Actions**`cog` `sliders` `wrench` `hammer` `screwdriver` `toolbox`-**视图操作**+**View Actions**`magnifying-glass` `zoom-in` `zoom-out` `eye` `eye-slash` `maximize` `minimize`-**删除操作**+**Delete Actions**`trash` `delete`----## 💻 设备与技术 (30+)+## 💻 Devices & Technology (30+)-**计算设备**+**Computing Devices**`desktop` `laptop` `mobile` `tablet` `smartwatch` `tv` `tv-retro`-**输入设备**+**Input Devices**`keyboard` `mouse` `joystick` `game-controller` `d-pad`-**存储与连接**+**Storage & Connectivity**`database` `server` `microchip` `plug` `outlet` `usb`-**网络**+**Network**`wifi` `wifi-low` `wifi-medium` `wifi-slash` `signal` `signal-fair` `signal-good` `signal-weak` `signal-slash` `bluetooth` `globe` `rss`-**电池**+**Battery**`battery-full` `battery-half` `battery-empty` `battery-charge` `battery-slash`----## 📱 通讯与社交 (15+)+## 📱 Communication & Social (15+)`phone` `phone-slash` `envelope` `mailbox` `paper-plane` `comment` `comment-dots` `comments` `comments-slash` `bell` `bell-slash` `at` `hashtag` `share-nodes`----## 🏢 商业与金融 (20+)+## 🏢 Business & Finance (20+)-**货币**+**Currency**`dollar` `euro` `british-pound` `yen` `coin` `money` `wallet` `credit-card`-**购物**+**Shopping**`shopping-cart` `shopping-bag` `shopping-basket` `shop` `receipt` `tag` `ticket`-**建筑**+**Buildings**`building` `city` `factory` `hospital` `museum` `castle` `home` `home-1`----## 🚗 交通与出行 (15+)+## 🚗 Transportation & Travel (15+)`car` `bus` `train` `plane` `ship` `truck` `bicycle` `scooter` `rocket` `route` `map` `map-pin` `location-arrow` `location-target` `signpost` `traffic-light` `traffic-cone`----## 🎨 媒体与娱乐 (30+)+## 🎨 Media & Entertainment (30+)-**播放控制**+**Playback Controls**`play` `pause` `stop` `play-pause` `fast-forward` `rewind` `skip-forward` `skip-backward` `shuffle` `arrows-repeat`-**音频**+**Audio**`volume-high` `volume-low` `volume-none` `volume-x` `volume-slash` `microphone` `microphone-slash` `headphones` `music` `waveform`-**视频与相机**+**Video & Camera**`video` `video-camera` `video-camera-slash` `camera` `camera-slash` `film` `compact-disc`-**游戏**+**Gaming**`game-controller` `joystick` `dice` `die-1` `die-2` `die-3` `die-4` `die-5` `die-6` `playing-card` `meeple`----## ⚽ 运动与健身 (15+)+## ⚽ Sports & Fitness (15+)`soccer` `basketball` `baseball` `football` `tennis-ball` `hockey` `curling-stone` `trophy` `target` `target-arrow` `bow-and-arrow`----## 🍔 食物与饮品 (15+)+## 🍔 Food & Drinks (15+)`burger` `pizza` `cake` `cake-slice` `cupcake` `ice-cream` `citrus-slice` `bowl` `utensils` `mug` `cocktail` `wine-glass` `soda` `bottle`----## 🌤️ 天气与自然 (20+)+## 🌤️ Weather & Nature (20+)-**天气**+**Weather**`sun` `sun-cloud` `sun-fog` `moon` `moon-cloud` `moon-fog` `cloud` `cloud-fog` `cloud-rain` `cloud-snow` `cloud-lightning` `rainbow` `rainbow-cloud` `snow` `wind` `droplet` `umbrella`-**自然**+**Nature**`tree` `tree-evergreen` `leaf` `seedling` `flower` `mountains` `water` `fire`----## ✨ 形状与装饰 (25+)+## ✨ Shapes & Decorations (25+)-**基础形状**+**Basic Shapes**`circle` `square` `triangle` `hexagon` `octagon` `diamond-shape` `star` `star-half` `heart` `heart-half` `heart-broken`-**特殊形状**+**Special Shapes**`sparkles` `bolt` `crown` `gem` `crystal-ball` `wand-with-sparkles`-**扑克符号**+**Card Suit Symbols**`spade` `club` `diamond`----## 🔒 安全与权限 (10+)+## 🔒 Security & Permissions (10+)`lock-closed` `lock-open` `key` `key-skeleton` `keyhole` `shield` `shield-check` `shield-half` `eye` `eye-slash` `face-id`----## 📝 文本与编辑 (20+)+## 📝 Text & Editing (20+)-**格式**+**Formatting**`bold` `italic` `underline` `strikethrough` `text` `font-case`-**对齐**+**Alignment**`align-left` `align-right` `align-text-center` `align-text-justify` `align-text-left` `align-text-right` `indent` `outdent`-**引用与列表**+**Quotes & Lists**`quote-left` `quote-right` `block-quote` `list` `list-ordered`-**代码**+**Code**`code` `code-block` `terminal`----## 🧭 布局与对齐 (15+)+## 🧭 Layout & Alignment (15+)`align-top` `align-bottom` `align-left` `align-right` `align-center-horizontal` `align-center-vertical` `distribute-horizontal` `distribute-vertical` `grid` `grid-masonry` `columns` `rows` `layers` `frame` `component`----## 🔢 数字与字母 (46)+## 🔢 Numbers & Letters (46)-**字母 A-Z**+**Letters A-Z**`a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m` `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x-1` `y` `z`-**数字 0-9**+**Numbers 0-9**`number-0` `number-1` `number-2` `number-3` `number-4` `number-5` `number-6` `number-7` `number-8` `number-9`-**带圆圈数字**+**Circled Numbers**`circle-number-0` `circle-number-1` `circle-number-2` `circle-number-3` `circle-number-4` `circle-number-5` `circle-number-6` `circle-number-7` `circle-number-8` `circle-number-9`----## ♈ 星座 (12)+## ♈ Zodiac Signs (12)`aries` `taurus` `gemini` `cancer` `leo` `virgo` `libra` `scorpio` `sagittarius` `capricorn` `aquarius` `pisces`----## ♟️ 国际象棋 (6)+## ♟️ Chess Pieces (6)`king` `queen` `rook` `bishop` `knight` `pawn`----## 😀 表情 (10)+## 😀 Emoticons (10)`face-smile` `face-laugh` `face-meh` `face-sad` `face-cry` `face-angry` `face-open-mouth` `face-no-mouth` `face-melt`----## 🐾 动物 (10+)+## 🐾 Animals (10+)`dog` `cat` `fish` `bee` `butterfly` `paw` `bone`----## 🎲 其他常用 (30+)+## 🎲 Other Common (30+)-**时间**+**Time**`clock` `stopwatch` `alarm-clock` `hourglass-empty` `hourglass-half-top` `hourglass-half-bottom` `calendar` `watch`-**开关**+**Toggle**`power` `toggle-circle-left` `toggle-circle-right`-**书籍**+**Books**`book` `book-open` `books` `bookmark` `bookmark-plus`-**礼物与庆祝**+**Gifts & Celebrations**`gift` `cake` `trophy` `crown` `sparkles`-**工作**+**Work**`suitcase` `briefcase` `mortarboard`-**其他**+**Miscellaneous**`lightbulb` `flag` `anchor` `compass` `life-ring` `rocket` `robot` `ghost` `skull` `alien` `ufo`----## 图标来源+## Icon Source-所有图标来自 [SVG Repo](https://www.svgrepo.com/),遵循 CC0 或 MIT 许可证,可免费商用。--**图标数量**:640+-**最后更新**:2025-12-06+All icons are from [SVG Repo](https://www.svgrepo.com/), licensed under CC0 or MIT, free for commercial use.+**Icon count**: 640++**Last updated**: 2025-12-06diff --git a/skills/ppt-master/templates/icons/README.md b/skills/ppt-master/templates/icons/README.mdindex a8bb55f3..4cd0575d 100644--- a/skills/ppt-master/templates/icons/README.md+++ b/skills/ppt-master/templates/icons/README.md@@ -1,75 +1,75 @@-# SVG 图标库+# SVG Icon Library-本目录提供 **640+ 个高质量 SVG 图标**,可直接嵌入到 PPT Master 生成的 SVG 文件中。+This directory provides **640+ high-quality SVG icons** that can be directly embedded into SVG files generated by PPT Master.-> 📦 **图标来源**:[SVG Repo](https://www.svgrepo.com/) - 免费开源 SVG 图标库+> **Icon Source**: [SVG Repo](https://www.svgrepo.com/) - Free open-source SVG icon library-- **完整索引**:[FULL_INDEX.md](./FULL_INDEX.md)(按需查阅)-- **JSON 索引**:[icons_index.json](./icons_index.json)(程序化查询)+- **Full Index**: [FULL_INDEX.md](./FULL_INDEX.md) (browse as needed)+- **JSON Index**: [icons_index.json](./icons_index.json) (programmatic lookup)----## 使用方式+## Usage-### 方法一:占位符引用 + 后期嵌入(推荐)+### Method 1: Placeholder Reference + Post-processing Embed (Recommended)-**生成时**使用简单的占位符语法:+Use simple placeholder syntax **during generation**:```xml<use data-icon="rocket" x="100" y="200" width="48" height="48" fill="#0076A8"/><use data-icon="chart-bar" x="200" y="200" width="48" height="48" fill="#FF6B35"/>```-**属性说明**:-- `data-icon` - 图标名称(对应文件名,不含 .svg)-- `x`, `y` - 位置-- `width`, `height` - 大小(基础 16px,设 48 即放大 3 倍)-- `fill` - 颜色+**Attributes**:+- `data-icon` - Icon name (matches filename without .svg)+- `x`, `y` - Position+- `width`, `height` - Size (base 16px; setting 48 = 3x scale)+- `fill` - Color-**完成后**运行工具一次性替换:+**After generation**, run the tool to batch-replace all placeholders:```bashpython3 scripts/embed_icons.py svg_output/*.svg```-### 方法二:直接复制嵌入+### Method 2: Direct Copy Embed```xml<g transform="translate(100, 200) scale(3)" fill="#0076A8">- <!-- 从 rocket.svg 复制 path 内容 -->+ <!-- Copy path content from rocket.svg --><path d="M10 16L12 14V10L13.6569 8.34314..."/></g>```-**常用尺寸**:`scale(2)`=32px, `scale(3)`=48px, `scale(4)`=64px+**Common sizes**: `scale(2)`=32px, `scale(3)`=48px, `scale(4)`=64px----## 常用图标速查--| 分类 | 图标 |-|------|------|-| 数据图表 | `chart-bar` `chart-line` `chart-pie` `arrow-trend-up` `database` |-| 状态反馈 | `circle-checkmark` `circle-x` `triangle-exclamation` `circle-info` |-| 用户组织 | `user` `users` `building` `group` |-| 导航箭头 | `arrow-up` `arrow-down` `arrow-left` `arrow-right` |-| 商务金融 | `dollar` `wallet` `briefcase` `shopping-cart` |-| 工具操作 | `cog` `pencil` `magnifying-glass` `trash` |-| 时间日程 | `clock` `calendar` `stopwatch` |-| 文件文档 | `file` `folder` `clipboard` `copy` |-| 目标安全 | `target` `flag` `shield` `lock-closed` |-| 创意灵感 | `lightbulb` `rocket` `sparkles` `star` |+## Common Icon Quick Reference++| Category | Icons |+|----------|-------|+| Data & Charts | `chart-bar` `chart-line` `chart-pie` `arrow-trend-up` `database` |+| Status & Feedback | `circle-checkmark` `circle-x` `triangle-exclamation` `circle-info` |+| Users & Orgs | `user` `users` `building` `group` |+| Navigation & Arrows | `arrow-up` `arrow-down` `arrow-left` `arrow-right` |+| Business & Finance | `dollar` `wallet` `briefcase` `shopping-cart` |+| Tools & Actions | `cog` `pencil` `magnifying-glass` `trash` |+| Time & Schedule | `clock` `calendar` `stopwatch` |+| Files & Documents | `file` `folder` `clipboard` `copy` |+| Goals & Security | `target` `flag` `shield` `lock-closed` |+| Creativity & Ideas | `lightbulb` `rocket` `sparkles` `star` |----## 设计规范+## Design Specs-| 参数 | 值 |-|------|-----|+| Parameter | Value |+|-----------|-------|| viewBox | `0 0 16 16` |-| 基础尺寸 | 16 × 16 px |-| 风格 | 填充(Solid) |+| Base Size | 16 x 16 px |+| Style | Solid (filled) |----**图标数量**:640+ | **完整列表**:[FULL_INDEX.md](./FULL_INDEX.md)+**Icon Count**: 640+ | **Full List**: [FULL_INDEX.md](./FULL_INDEX.md)diff --git a/skills/ppt-master/templates/icons/icons_index.json b/skills/ppt-master/templates/icons/icons_index.jsonindex 6777c346..79675a54 100644--- a/skills/ppt-master/templates/icons/icons_index.json+++ b/skills/ppt-master/templates/icons/icons_index.json@@ -7,7 +7,7 @@},"categories": {"navigation": {- "label": "导航与箭头",+ "label": "Navigation & Arrows","icons": ["arrow-up","arrow-down",@@ -87,7 +87,7 @@]},"data": {- "label": "数据与图表",+ "label": "Data & Charts","icons": ["chart-bar","chart-line",@@ -105,7 +105,7 @@]},"users": {- "label": "用户与人物",+ "label": "Users & People","icons": ["user","users",@@ -121,7 +121,7 @@]},"status": {- "label": "状态与反馈",+ "label": "Status & Feedback","icons": ["checkmark","circle-checkmark",@@ -152,7 +152,7 @@]},"files": {- "label": "文件与文件夹",+ "label": "Files & Folders","icons": ["file","file-plus",@@ -173,7 +173,7 @@]},"tools": {- "label": "工具与操作",+ "label": "Tools & Actions","icons": ["pencil","pencil-square",@@ -206,7 +206,7 @@]},"devices": {- "label": "设备与技术",+ "label": "Devices & Technology","icons": ["desktop","laptop",@@ -246,7 +246,7 @@]},"communication": {- "label": "通讯与社交",+ "label": "Communication & Social","icons": ["phone","phone-slash",@@ -273,7 +273,7 @@]},"business": {- "label": "商业与金融",+ "label": "Business & Finance","icons": ["dollar","euro",@@ -302,7 +302,7 @@]},"transport": {- "label": "交通与出行",+ "label": "Transport & Travel","icons": ["car","bus",@@ -326,7 +326,7 @@]},"media": {- "label": "媒体与娱乐",+ "label": "Media & Entertainment","icons": ["play","pause",@@ -366,7 +366,7 @@]},"sports": {- "label": "运动与健身",+ "label": "Sports & Fitness","icons": ["soccer","basketball",@@ -382,7 +382,7 @@]},"food": {- "label": "食物与饮品",+ "label": "Food & Drinks","icons": ["burger","pizza",@@ -401,7 +401,7 @@]},"weather": {- "label": "天气与自然",+ "label": "Weather & Nature","icons": ["sun","sun-cloud",@@ -434,7 +434,7 @@]},"shapes": {- "label": "形状与装饰",+ "label": "Shapes & Decorations","icons": ["circle","square",@@ -471,7 +471,7 @@]},"security": {- "label": "安全与权限",+ "label": "Security & Permissions","icons": ["lock-closed","lock-open",@@ -487,7 +487,7 @@]},"text": {- "label": "文本与编辑",+ "label": "Text & Editing","icons": ["bold","italic",@@ -514,7 +514,7 @@]},"layout": {- "label": "布局与对齐",+ "label": "Layout & Alignment","icons": ["align-top","align-bottom",@@ -537,7 +537,7 @@]},"numbers": {- "label": "数字与字母",+ "label": "Numbers & Letters","icons": ["a","b",@@ -597,7 +597,7 @@]},"zodiac": {- "label": "星座",+ "label": "Zodiac","icons": ["aries","taurus",@@ -614,7 +614,7 @@]},"chess": {- "label": "国际象棋",+ "label": "Chess","icons": ["king","queen",@@ -625,7 +625,7 @@]},"emoji": {- "label": "表情",+ "label": "Emoji","icons": ["face-smile","face-laugh",@@ -639,7 +639,7 @@]},"animals": {- "label": "动物",+ "label": "Animals","icons": ["dog","cat",@@ -651,7 +651,7 @@]},"time": {- "label": "时间",+ "label": "Time","icons": ["clock","stopwatch",@@ -664,7 +664,7 @@]},"misc": {- "label": "其他常用",+ "label": "Miscellaneous","icons": ["power","toggle-circle-left",@@ -876,4 +876,4 @@"crosshairs"]}-}\ No newline at end of file+}diff --git a/skills/ppt-master/templates/layouts/README.md b/skills/ppt-master/templates/layouts/README.mdindex 2a7cec70..b6bd6f7d 100644--- a/skills/ppt-master/templates/layouts/README.md+++ b/skills/ppt-master/templates/layouts/README.md@@ -1,256 +1,256 @@-# 页面布局模板库(22 套)+# Page Layout Template Library (22 Templates)-预置的 PPT 页面布局模板,支持多种风格和使用场景。+Pre-built PPT page layout templates supporting multiple styles and use cases.-- **完整索引**:[README.md](./README.md)(人工浏览)-- **JSON 索引**:[layouts_index.json](./layouts_index.json)(AI / 程序优先读取)+- **Full Index**: [README.md](./README.md) (human browsing)+- **JSON Index**: [layouts_index.json](./layouts_index.json) (AI / programmatic lookup — preferred)-> 🤖 **AI / 程序选型建议**:优先读取 `layouts_index.json`;人工浏览和快速比对时使用本 README。+> **AI / Programmatic recommendation**: Prefer reading `layouts_index.json`; use this README for human browsing and quick comparison.----## 模板快速索引--| 模板名称 | 类别 | 适用场景 | 主色调 | 设计调性 |-|----------|------|----------|--------|----------|-| `google_style` | 品牌风格 | 年度汇报、技术分享、数据展示 | Google 四色 `#4285F4` `#EA4335` `#FBBC04` `#34A853` | 现代简洁、数据驱动、充足留白 |-| `mckinsey` | 品牌风格 | 战略咨询、高管汇报、投资分析 | McKinsey Blue `#005587` | 结构化思维、极简高端、MECE原则 |-| `anthropic` | 品牌风格 | AI技术分享、开发者大会、产品发布 | Anthropic 橙 `#D97757` | 科技感、结论先行、深色封面 |-| `中汽研_常规` | 品牌风格 | 产品认证、测评认证 | 深蓝 `#004098` | [常规] 专业权威、咨询风格 |-| `中汽研_商务` | 品牌风格 | 商务拜访、技术交流 | 深蓝渐变 `#003366` | [商务] 现代科技、沉稳大气 |-| `中汽研_现代` | 品牌风格 | 战略发布、未来科技 | 深邃蓝 `#001529` | [未来] Future Tech、霓虹流光 |-| `中国电建_常规` | 品牌风格 | 电力能源、工程建设、央企汇报 | 电建蓝 `#00418D` | 大国工匠、常规稳健 |-| `中国电建_现代` | 品牌风格 | 国际工程、高端路演、科技创新 | 深海蓝 `#001F45` | [现代] 宏大叙事、数字科技 |-| `招商银行` | 品牌风格 | 高端汇报、VIP服务、年度报告 | 招行红 `#C41230` | 极简轻奢、金融质感、去框化 |-| `consultant` | 通用风格 | 咨询报告、商业演示 | 深蓝 + 金色 | 专业严谨、左侧装饰条 |-| `consultant_top` | 通用风格 | MBB级咨询报告、董事会汇报 | 渐变顶条 + 金色点缀 | 核心观点区、机密标识 |-| `general` | 通用风格 | 通用商业演示 | 深蓝渐变 + 靛蓝紫 | 现代简洁、灵活适用 |-| `academic_defense` | 场景专用 | 毕业答辩、学术汇报、课题申请 | 深蓝 + 红色装饰 | 清晰层次、学术规范 |-| `psychology_attachment` | 场景专用 | 心理治疗培训、咨询讲座 | 蓝绿渐变 + 多彩语义色 | 温暖专业、疗愈感 |-| `medical_university` | 场景专用 | 医学报告、病例讨论、科研汇报 | 医学蓝 `#0066B3` | 专业严谨、生命感 |-| `government_red` | 政企风格 | 政府工作报告、党建汇报 | 政府红 `#8B0000` | 庄重权威、大气磅礴 |-| `government_blue` | 政企风格 | 智慧城市、政务公开、数字化转型 | 科技蓝 `#0050B3` | 现代科技、严谨理性 |-| `ai_ops` | 政企风格 | 运营商AI运维、IT系统总体视图、数智化方案 | 运营商红 `#C00000` + 蓝 `#2E75B6` | 信息密集、模块分区、运营商风格 |-| `pixel_retro` | 特殊风格 | Git/技术介绍、复古游戏主题 | 霓虹色系 `#00FF41` `#FF0080` | 像素风、赛博朋克 |-| `科技蓝商务` | 通用风格 | 企业汇报、产品发布、方案提案 | 科技蓝 `#0078D7` | 科技、商务、专业、简洁 |-| `smart_red` | 通用风格 | 科技企业介绍、教育行业解决方案 | 智慧红橙 `#DE3545` | 现代、活力、几何感 |-| `重庆大学` | 场景专用 | 学术答辩、科研汇报 | 重大蓝 `#006BB7` | 学术稳重、山城气韵 |+## Quick Template Index++| Template Name | Category | Use Cases | Primary Color | Design Tone |+|---------------|----------|-----------|---------------|-------------|+| `google_style` | Brand | Annual reports, tech sharing, data presentation | Google Four Colors `#4285F4` `#EA4335` `#FBBC04` `#34A853` | Modern clean, data-driven, ample whitespace |+| `mckinsey` | Brand | Strategic consulting, executive reports, investment analysis | McKinsey Blue `#005587` | Structured thinking, minimalist premium, MECE principle |+| `anthropic` | Brand | AI tech sharing, developer conferences, product launches | Anthropic Orange `#D97757` | Tech-forward, conclusion-first, dark cover |+| `中汽研_常规` | Brand | Product certification, evaluation & testing | Deep Blue `#004098` | [Standard] Professional authority, consulting style |+| `中汽研_商务` | Brand | Business visits, technical exchanges | Blue Gradient `#003366` | [Business] Modern tech, composed and sophisticated |+| `中汽研_现代` | Brand | Strategic launches, future tech | Deep Blue `#001529` | [Future] Future Tech, neon glow |+| `中国电建_常规` | Brand | Power & energy, engineering, state-owned enterprise reports | PowerChina Blue `#00418D` | Craftsmanship, steady and reliable |+| `中国电建_现代` | Brand | International engineering, premium roadshows, tech innovation | Deep Sea Blue `#001F45` | [Modern] Grand narrative, digital tech |+| `招商银行` | Brand | Premium reports, VIP services, annual reports | CMB Red `#C41230` | Minimalist luxury, financial texture, borderless |+| `consultant` | General | Consulting reports, business presentations | Deep Blue + Gold | Professional and rigorous, left sidebar accent |+| `consultant_top` | General | MBB-level consulting reports, board presentations | Gradient top bar + Gold accents | Key insight area, confidentiality markings |+| `general` | General | General business presentations | Deep Blue gradient + Indigo Purple | Modern clean, versatile |+| `academic_defense` | Scenario | Thesis defense, academic reports, grant proposals | Deep Blue + Red accents | Clear hierarchy, academic standards |+| `psychology_attachment` | Scenario | Psychotherapy training, counseling lectures | Blue-green gradient + Colorful semantic colors | Warm professional, therapeutic feel |+| `medical_university` | Scenario | Medical reports, case discussions, research presentations | Medical Blue `#0066B3` | Professional rigorous, life-affirming |+| `government_red` | Government/Enterprise | Government work reports, party-building presentations | Government Red `#8B0000` | Solemn authority, grand and imposing |+| `government_blue` | Government/Enterprise | Smart cities, open governance, digital transformation | Tech Blue `#0050B3` | Modern tech, rigorous and rational |+| `ai_ops` | Government/Enterprise | Telecom AI ops, IT system overview, digital intelligence solutions | Telecom Red `#C00000` + Blue `#2E75B6` | High information density, modular layout, telecom style |+| `pixel_retro` | Special | Git/tech introductions, retro gaming themes | Neon colors `#00FF41` `#FF0080` | Pixel art, cyberpunk |+| `科技蓝商务` | General | Corporate reports, product launches, proposals | Tech Blue `#0078D7` | Tech, business, professional, clean |+| `smart_red` | General | Tech company profiles, education solutions | Smart Red-Orange `#DE3545` | Modern, vibrant, geometric |+| `重庆大学` | Scenario | Academic defense, research presentations | CQU Blue `#006BB7` | Academic solidity, mountain-city character |----## 模板分类+## Template Categories-### 1️⃣ 品牌风格模板+### 1. Brand Style Templates-模仿 **特定知名品牌/机构** 的专属设计风格。-> **特点**:具有排他性的品牌识别度(特定Logo、配色、VI规范),适用于该机构内部或对外展示。如:Google、麦肯锡、中国电建。+Templates mimicking **specific well-known brands/institutions** with their exclusive design style.+> **Characteristics**: Distinctive brand identity (specific logos, color schemes, VI standards), suitable for internal or external presentations of that organization. Examples: Google, McKinsey, PowerChina.-| 模板 | 说明 |-|------|------|-| `google_style` | Google Material Design 风格,四色品牌识别 |-| `mckinsey` | 麦肯锡咨询风格,数据驱动、结构化 |-| `anthropic` | Anthropic AI 风格,深色科技感 |-| `中汽研_常规` | 中汽研常规风格 (v1 标准版),适合认证、测评场景 |-| `中汽研_商务` | 中汽研商务风格 (v2 商务版),现代科技商务,沉稳大气 |-| `中汽研_现代` | 中汽研现代风格 (v3 未来版),Future Tech 风格,深邃蓝+霓虹青 |-| `中国电建_常规` | 中国电建常规风格 (v1 标准版),适用于电力、能源、工程类央企 |-| `中国电建_现代` | 中国电建现代风格 (v2 现代版),强调宏大叙事与数字科技 |-| `招商银行` | 招商银行 v2.0 风格,极简轻奢,去框化开放布局 |+| Template | Description |+|----------|-------------|+| `google_style` | Google Material Design style, four-color brand identity |+| `mckinsey` | McKinsey consulting style, data-driven and structured |+| `anthropic` | Anthropic AI style, dark tech-forward aesthetic |+| `中汽研_常规` | CATARC standard style (v1), suitable for certification and evaluation |+| `中汽研_商务` | CATARC business style (v2), modern tech business, composed and sophisticated |+| `中汽研_现代` | CATARC modern style (v3 Future), Future Tech style, deep blue + neon cyan |+| `中国电建_常规` | PowerChina standard style (v1), suitable for power, energy, and engineering SOEs |+| `中国电建_现代` | PowerChina modern style (v2), emphasis on grand narrative and digital tech |+| `招商银行` | China Merchants Bank v2.0, minimalist luxury, borderless open layout |-### 2️⃣ 通用风格模板+### 2. General Style Templates-通用商务风格,不模仿特定品牌,适用范围广。+Universal business styles not tied to any specific brand, broadly applicable.-| 模板 | 说明 |-|------|------|-| `consultant` | 咨询报告风格,专业严谨 |-| `consultant_top` | 顶级咨询风格(MBB级),核心观点区 |-| `general` | 通用灵活风格,适合多数商业演示 |-| `科技蓝商务` | 科技商务风格,严谨专业,六边形纹理装饰 |-| `smart_red` | 智慧红橙商务风格,现代活力,几何切角设计 |+| Template | Description |+|----------|-------------|+| `consultant` | Consulting report style, professional and rigorous |+| `consultant_top` | Top-tier consulting style (MBB-level), key insight area |+| `general` | Versatile flexible style, suitable for most business presentations |+| `科技蓝商务` | Tech business style, rigorous and professional, hexagonal texture |+| `smart_red` | Smart red-orange business style, modern and vibrant, geometric cutaway design |-### 3️⃣ 场景专用模板+### 3. Scenario-Specific Templates-针对 **特定使用场景** 设计,内容结构更匹配场景需求。+Designed for **specific use cases**, with content structures tailored to scenario requirements.-| 模板 | 说明 |-|------|------|-| `academic_defense` | 学术答辩,清晰的研究内容层次 |-| `psychology_attachment` | 心理疗愈主题,温暖专业的配色 |-| `medical_university` | 医院/医科大学模板,适合医学报告 |-| `重庆大学` | 重庆大学专用模板,融合山城层叠意象与现代学术气质 |+| Template | Description |+|----------|-------------|+| `academic_defense` | Academic defense, clear research content hierarchy |+| `psychology_attachment` | Psychotherapy theme, warm and professional color palette |+| `medical_university` | Hospital / medical university template, suitable for medical reports |+| `重庆大学` | Chongqing University template, blending mountain-city layered imagery with modern academic style |-### 4️⃣ 政企风格模板+### 4. Government & Enterprise Templates-针对 **政府部门和通用国企** 需求的行业通用设计。-> **区别**:与品牌风格不同,此处不针对特定单位,而是提供符合"党政机关/国企"审美共性的通用模板(如红头文件风、智慧政务风)。+Industry-standard designs for **government agencies and general state-owned enterprises**.+> **Distinction**: Unlike brand styles, these are not targeted at specific organizations but provide templates matching the common aesthetic preferences of government/SOE contexts (e.g., official document red, smart governance blue).-| 模板 | 说明 |-|------|------|-| `government_red` | 红色政务风格,适用于政府工作报告、党建活动 |-| `government_blue` | 蓝色政务风格,适用于智慧城市、数字化汇报 |-| `ai_ops` | 企业数智化风格,运营商AI运维架构、高信息密度汇报(含 `reference_style.svg` 风格参考) |+| Template | Description |+|----------|-------------|+| `government_red` | Red government style, suitable for government work reports, party-building events |+| `government_blue` | Blue government style, suitable for smart cities, digital governance reports |+| `ai_ops` | Enterprise digital intelligence style, telecom AI ops architecture, high-density reports (includes `reference_style.svg` style reference) |-### 5️⃣ 特殊风格模板+### 5. Special Style Templates-非常规视觉风格,适用于特定创意场景。+Unconventional visual styles for specific creative scenarios.-| 模板 | 说明 |-|------|------|-| `pixel_retro` | 像素复古风格,赛博朋克/游戏主题 |+| Template | Description |+|----------|-------------|+| `pixel_retro` | Pixel retro style, cyberpunk / gaming themes |-> **设计理念**:风格与场景是 **正交** 的概念。场景模板定义内容结构,风格定义视觉表现。理论上,场景模板可以搭配不同的风格使用。+> **Design philosophy**: Style and scenario are **orthogonal** concepts. Scenario templates define content structure; style templates define visual presentation. In theory, scenario templates can be combined with different styles.----## 模板文件结构+## Template File Structure-模板建议包含以下标准文件(目录页可选):+Each template should contain the following standard files (TOC page is optional):-| 文件名 | 必须 | 用途 | 说明 |-|--------|------|------|------|-| `design_spec.md` | ✅ | 设计规范 | 完整的配色、排版、布局规范 |-| `01_cover.svg` | ✅ | 封面页 | 标题、副标题、日期、机构 |-| `02_toc.svg` | ⬜ 可选 | 目录页 | 章节列表、导航 |-| `02_chapter.svg` | ✅ | 章节页 | 章节编号、章节标题 |-| `03_content.svg` | ✅ | 内容页 | 页眉页脚固定,内容区灵活 |-| `04_ending.svg` | ✅ | 结束页 | 感谢语、联系方式 |+| Filename | Required | Purpose | Description |+|----------|----------|---------|-------------|+| `design_spec.md` | Yes | Design specification | Complete color, typography, and layout specs |+| `01_cover.svg` | Yes | Cover page | Title, subtitle, date, organization |+| `02_toc.svg` | Optional | Table of contents | Chapter list, navigation |+| `02_chapter.svg` | Yes | Chapter page | Chapter number, chapter title |+| `03_content.svg` | Yes | Content page | Fixed header/footer, flexible content area |+| `04_ending.svg` | Yes | Ending page | Thank-you message, contact info |-> **设计理念**:模板定义视觉一致性和结构性页面,内容页保持最大灵活性,让 AI 根据实际内容决定布局。+> **Design philosophy**: Templates define visual consistency and structural pages; content pages maintain maximum flexibility, letting AI determine layout based on actual content.----## design_spec.md 标准结构+## design_spec.md Standard Structure-所有模板的设计规范文档应遵循以下章节结构:+All template design specification documents should follow this chapter structure:```markdown-# [模板名称] - 设计规范--> 一句话描述适用场景--## 一、模板概述-## 二、画布规范-## 三、配色方案-## 四、排版体系-## 五、页面结构-## 六、页面类型-## 七、布局模式(推荐)-## 八、间距规范-## 九、SVG 技术约束-## 十、占位符规范-## 十一、使用说明(推荐)+# [Template Name] - Design Specification++> One-line description of applicable scenarios++## I. Template Overview+## II. Canvas Specification+## III. Color Scheme+## IV. Typography System+## V. Page Structure+## VI. Page Types+## VII. Layout Modes (Recommended)+## VIII. Spacing Specification+## IX. SVG Technical Constraints+## X. Placeholder Specification+## XI. Usage Guide (Recommended)```----## 占位符规范+## Placeholder Specification-模板中使用 `{{PLACEHOLDER}}` 格式标记可替换内容:+Templates use `{{PLACEHOLDER}}` format to mark replaceable content:-### 通用占位符+### General Placeholders-| 占位符 | 用途 | 适用页面 |-|--------|------|----------|-| `{{TITLE}}` | 主标题 | 封面 |-| `{{SUBTITLE}}` | 副标题 | 封面 |-| `{{DATE}}` | 日期 | 封面、结束页 |-| `{{AUTHOR}}` | 作者/机构(中文) | 封面 |-| `{{AUTHOR_EN}}` | 作者/机构(英文) | 封面 |+| Placeholder | Purpose | Applicable Pages |+|-------------|---------|-----------------|+| `{{TITLE}}` | Main title | Cover |+| `{{SUBTITLE}}` | Subtitle | Cover |+| `{{DATE}}` | Date | Cover, Ending |+| `{{AUTHOR}}` | Author / Organization (Chinese) | Cover |+| `{{AUTHOR_EN}}` | Author / Organization (English) | Cover |-### 章节相关+### Chapter-Related-| 占位符 | 用途 | 适用页面 |-|--------|------|----------|-| `{{CHAPTER_NUM}}` | 章节编号 | 章节页、内容页 |-| `{{CHAPTER_TITLE}}` | 章节标题 | 章节页 |-| `{{CHAPTER_TITLE_EN}}` | 章节英文副标题 | 章节页 |+| Placeholder | Purpose | Applicable Pages |+|-------------|---------|-----------------|+| `{{CHAPTER_NUM}}` | Chapter number | Chapter, Content |+| `{{CHAPTER_TITLE}}` | Chapter title | Chapter |+| `{{CHAPTER_TITLE_EN}}` | Chapter English subtitle | Chapter |-### 内容页+### Content Page-| 占位符 | 用途 | 适用页面 |-|--------|------|----------|-| `{{PAGE_TITLE}}` | 页面标题 | 内容页 |-| `{{CONTENT_AREA}}` | 内容区域占位 | 内容页 |-| `{{PAGE_NUM}}` | 页码 | 内容页、结束页 |-| `{{SOURCE}}` | 数据来源 | 内容页页脚 |+| Placeholder | Purpose | Applicable Pages |+|-------------|---------|-----------------|+| `{{PAGE_TITLE}}` | Page title | Content |+| `{{CONTENT_AREA}}` | Content area placeholder | Content |+| `{{PAGE_NUM}}` | Page number | Content, Ending |+| `{{SOURCE}}` | Data source | Content footer |-### 目录页+### Table of Contents-| 占位符 | 用途 |-|--------|------|-| `{{TOC_ITEM_1}}` ~ `{{TOC_ITEM_5}}` | 目录项 1-5 |+| Placeholder | Purpose |+|-------------|---------|+| `{{TOC_ITEM_1}}` ~ `{{TOC_ITEM_5}}` | TOC items 1-5 |-### 结束页+### Ending Page-| 占位符 | 用途 |-|--------|------|-| `{{THANK_YOU}}` | 感谢语 |-| `{{ENDING_SUBTITLE}}` | 结束页副标题 |-| `{{CLOSING_MESSAGE}}` | 结语 |-| `{{CONTACT_INFO}}` | 联系信息 |+| Placeholder | Purpose |+|-------------|---------|+| `{{THANK_YOU}}` | Thank-you message |+| `{{ENDING_SUBTITLE}}` | Ending page subtitle |+| `{{CLOSING_MESSAGE}}` | Closing message |+| `{{CONTACT_INFO}}` | Contact information |----## 使用方式+## Usage-### 从模板库复制到项目+### Copy from Template Library to Project```bash-# 复制通用风格模板到项目-cp templates/layouts/general/* projects/<项目>/templates/+# Copy general style template to project+cp templates/layouts/general/* projects/<project>/templates/-# 复制咨询风格模板到项目-cp templates/layouts/consultant/* projects/<项目>/templates/+# Copy consulting style template to project+cp templates/layouts/consultant/* projects/<project>/templates/-# 复制 Google 风格模板到项目-cp templates/layouts/google_style/* projects/<项目>/templates/+# Copy Google style template to project+cp templates/layouts/google_style/* projects/<project>/templates/-# 复制政企风格模板到项目(例:政府红)-cp templates/layouts/government_red/* projects/<项目>/templates/+# Copy government style template to project (e.g., government red)+cp templates/layouts/government_red/* projects/<project>/templates/```-### 复制后操作+### After Copying-1. 阅读 `design_spec.md` 了解设计规范-2. 根据项目需求调整配色(如需要)-3. 将 Logo 文件放入 `images/` 目录-4. 使用 Executor 角色根据模板生成 SVG 页面+1. Read `design_spec.md` to understand the design specification+2. Adjust colors based on project requirements (if needed)+3. Place logo files in the `images/` directory+4. Use the Executor role to generate SVG pages based on templates----## 模板开发指南+## Template Development Guide-### 创建新模板+### Creating New Templates-1. 在 `templates/layouts/` 下创建新目录-2. 参考现有模板结构创建必需文件-3. 确保 `design_spec.md` 遵循标准章节结构-4. 所有 SVG 使用 `viewBox="0 0 1280 720"`-5. 遵循 SVG 技术约束(见下方)+1. Create a new directory under `templates/layouts/`+2. Create required files following the existing template structure+3. Ensure `design_spec.md` follows the standard chapter structure+4. All SVGs use `viewBox="0 0 1280 720"`+5. Follow SVG technical constraints (see below)-### SVG 技术约束(所有模板必须遵守)+### SVG Technical Constraints (All Templates Must Comply)-#### 必须满足+#### Required- viewBox: `0 0 1280 720`-- 背景使用 `<rect>` 元素-- 文本换行使用 `<tspan>`-- 透明度使用 `fill-opacity` / `stroke-opacity`-- 渐变使用 `<defs>` 定义 `<linearGradient>`--#### 禁止使用(PPT 不兼容)--| 禁用元素 | 替代方案 |-|----------|----------|-| `<foreignObject>` | 使用 `<text>` + `<tspan>` |-| `clipPath` | 重新设计布局 |-| `mask` | 使用 `fill-opacity` |-| `<style>` / `class` | 使用内联样式 |-| `textPath` | 使用普通 `<text>` |-| `animate*` | 静态设计 |-| `script` | 不支持交互 |-| `marker` / `marker-end` | 使用 `<polygon>` 三角形 |-| `rgba()` | 使用 HEX + `fill-opacity` |-| `<g opacity="...">` | 每个子元素单独设置透明度 |+- Backgrounds use `<rect>` elements+- Text wrapping uses `<tspan>`+- Transparency uses `fill-opacity` / `stroke-opacity`+- Gradients use `<defs>` with `<linearGradient>`++#### Forbidden (PPT Incompatible)++| Banned Element | Alternative |+|----------------|-------------|+| `<foreignObject>` | Use `<text>` + `<tspan>` |+| `clipPath` | Redesign layout |+| `mask` | Use `fill-opacity` |+| `<style>` / `class` | Use inline styles |+| `textPath` | Use plain `<text>` |+| `animate*` | Static design |+| `script` | No interactivity supported |+| `marker` / `marker-end` | Use `<polygon>` triangles |+| `rgba()` | Use HEX + `fill-opacity` |+| `<g opacity="...">` | Set opacity on each child element individually |---diff --git a/skills/ppt-master/templates/layouts/academic_defense/design_spec.md b/skills/ppt-master/templates/layouts/academic_defense/design_spec.mdindex dff916a3..d776529e 100644--- a/skills/ppt-master/templates/layouts/academic_defense/design_spec.md+++ b/skills/ppt-master/templates/layouts/academic_defense/design_spec.md@@ -1,262 +1,262 @@-# 学术答辩模板 (Academic Defense Style) - 设计规范+# Academic Defense Template - Design Specification-> 适用于学术论文答辩、研究汇报、毕业设计展示等场景。+> Suitable for academic thesis defense, research presentations, graduation project showcases, and similar scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |+| Property | Description || -------------- | ------------------------------------------------------ |-| **模板名称** | academic_defense(学术答辩模板) |-| **适用场景** | 毕业答辩、学术汇报、研究进展报告、课题申请 |-| **设计调性** | 专业、严谨、科研感、清晰层次 |-| **主题模式** | 亮色主题(白色背景 + 深蓝标题条) |+| **Template Name** | academic_defense |+| **Use Cases** | Thesis defense, academic presentations, research progress reports, grant applications |+| **Design Tone** | Professional, rigorous, research-oriented, clear hierarchy |+| **Theme Mode** | Light theme (white background + dark blue title bar) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 40px,上 0px,下 35px |-| **内容安全区** | x: 40-1240, y: 70-665 |+| **Page Margins** | Left/Right 40px, Top 0px, Bottom 35px |+| **Safe Area** | x: 40-1240, y: 70-665 |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || -------------- | ----------- | -------------------------------- |-| **主导深蓝** | `#003366` | 页眉背景、章节标题、主要标题 |-| **辅助蓝** | `#0066CC` | 卡片边框、图标、次级装饰 |-| **强调红** | `#CC0000` | 重点高亮、关键词强调、左侧装饰条 |-| **浅蓝灰** | `#E8F4FC` | 核心观点背景条、卡片内区块 |-| **背景白** | `#FFFFFF` | 页面主背景 |+| **Primary Dark Blue** | `#003366` | Header background, section titles, main headings |+| **Accent Blue** | `#0066CC` | Card borders, icons, secondary decorations |+| **Accent Red** | `#CC0000` | Key highlights, keyword emphasis, left decorative bar |+| **Light Blue-Gray** | `#E8F4FC` | Key message bar background, card inner sections |+| **Background White** | `#FFFFFF` | Page main background |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **白色文字** | `#FFFFFF` | 深色背景上的文字 |-| **主文字** | `#333333` | 正文内容 |-| **辅助文字** | `#666666` | 说明文字、标注 |-| **弱灰** | `#999999` | 页脚、辅助信息 |+| **White Text** | `#FFFFFF` | Text on dark backgrounds |+| **Primary Text** | `#333333` | Body content |+| **Secondary Text** | `#666666` | Descriptions, annotations |+| **Muted Gray** | `#999999` | Footer, auxiliary info |-### 中性色+### Neutral Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **卡片灰** | `#F5F7FA` | 卡片内背景、信息区块 |-| **边框灰** | `#D0D7E0` | 卡片边框、分割线 |+| **Card Gray** | `#F5F7FA` | Card inner background, info blocks |+| **Border Gray** | `#D0D7E0` | Card borders, dividers |-### 功能色+### Functional Colors-| 用途 | 色值 | 说明 |-| -------- | ----------- | -------------- |-| **成功** | `#28A745` | 正向指标 |-| **警示** | `#FFA500` | 提醒 |-| **信息** | `#17A2B8` | 信息提示 |+| Usage | Value | Description |+| ---------- | ----------- | -------------- |+| **Success** | `#28A745` | Positive indicators |+| **Warning** | `#FFA500` | Alerts |+| **Info** | `#17A2B8` | Information tips |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", Arial, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", Arial, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| ---- | ---------------- | ---- | ------- |-| H1 | 封面主标题 | 56px | Bold |-| H2 | 页面标题 | 28px | Bold |-| H3 | 章节标题 | 56px | Bold |-| H4 | 卡片标题 | 24px | Bold |-| P | 正文内容 | 18px | Regular |-| High | 强调数据 | 36px | Bold |-| Sub | 注释/来源 | 14px | Regular |-| XS | 页码/版权 | 12px | Regular |+| Level | Usage | Size | Weight |+| ----- | ---------------- | ---- | ------- |+| H1 | Cover main title | 56px | Bold |+| H2 | Page title | 28px | Bold |+| H3 | Section title | 56px | Bold |+| H4 | Card title | 24px | Bold |+| P | Body content | 18px | Regular |+| High | Highlighted data | 36px | Bold |+| Sub | Notes/sources | 14px | Regular |+| XS | Page number/copyright | 12px | Regular |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **页眉** | y=0, h=70px | 深蓝色背景 + 红色左侧竖条 + 页面标题 |-| **观点条** | y=70, h=50px | 核心观点/摘要区域(浅蓝灰背景) |-| **内容区** | y=135, h=515px| 主要内容区域 |-| **页脚** | y=665, h=55px | 数据来源、章节名称、页码 |+| Area | Position/Height | Description |+| -------------- | --------------- | -------------------------------------- |+| **Header** | y=0, h=70px | Dark blue background + red left bar + page title |+| **Key Message Bar** | y=70, h=50px | Core message/summary area (light blue-gray background) |+| **Content Area** | y=135, h=515px | Main content area |+| **Footer** | y=665, h=55px | Data source, section name, page number |-### 装饰设计+### Decorative Elements-- **左侧红色竖条**: 红色 (`#CC0000`),宽度 6px,用于页眉和卡片装饰-- **蓝色边框**: 辅助蓝 (`#0066CC`),用于卡片边框-- **装饰分割线**: 蓝色 (`#0066CC`),配合装饰圆点+- **Left Red Bar**: Red (`#CC0000`), width 6px, used for header and card decoration+- **Blue Border**: Accent blue (`#0066CC`), used for card borders+- **Decorative Divider**: Blue (`#0066CC`), paired with decorative dots----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 白色背景-- 深蓝色顶部横条 + 红色左侧竖条装饰-- 右上角 Logo 占位区域-- 居中主标题 + 副标题-- 装饰分隔线(蓝色 + 圆点)-- 答辩人信息区域(姓名、导师、机构)-- 底部灰色信息区(日期)+- White background+- Dark blue top bar + red left vertical bar decoration+- Top-right Logo placeholder area+- Centered main title + subtitle+- Decorative divider line (blue + dots)+- Presenter info area (name, advisor, institution)+- Bottom gray info area (date)-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents Page (02_toc.svg)-- 白色背景-- 标准页眉(深蓝色 + 红色竖条)-- 卡片式目录项布局(2列)-- 浅蓝灰背景卡片 + 左侧彩色竖条-- 可选项使用虚线边框+- White background+- Standard header (dark blue + red vertical bar)+- Card-style TOC item layout (2 columns)+- Light blue-gray background cards + left colored vertical bar+- Optional items use dashed borders-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深蓝色全屏背景 (`#003366`)-- 右侧几何图形装饰-- 左侧红色竖条装饰-- 大号半透明背景编号-- 醒目白色章节标题-- 浅蓝灰章节描述-- 红色装饰横线+- Dark blue full-screen background (`#003366`)+- Right-side geometric decorations+- Left red vertical bar decoration+- Large semi-transparent background number+- Prominent white chapter title+- Light blue-gray chapter description+- Red decorative horizontal line-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 标准页眉(深蓝色 + 红色竖条)-- 核心观点条(浅蓝灰背景 + 蓝色左侧竖条)-- 灵活内容区域-- 页脚:数据来源、章节名称、页码+- White background+- Standard header (dark blue + red vertical bar)+- Key message bar (light blue-gray background + blue left vertical bar)+- Flexible content area+- Footer: data source, section name, page number-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 白色背景-- 深蓝色顶部横条-- 居中感谢语-- 副标语-- 装饰分隔线-- 联系信息卡片(灰色背景)-- 底部灰色区域(版权、页码)+- White background+- Dark blue top bar+- Centered thank-you message+- Tagline+- Decorative divider line+- Contact info card (gray background)+- Bottom gray area (copyright, page number)----## 七、布局模式+## VII. Layout Patterns-| 模式 | 适用场景 |-| ------------------ | -------------------------- |-| **单栏居中** | 封面、结语、重要观点 |-| **卡片式双列** | 目录页 |-| **左右分栏 (5:5)** | 对比展示 |-| **左右分栏 (4:6)** | 图文混排 |-| **卡片网格** | 研究内容列表 |-| **时间线** | 研究进程 |-| **表格** | 数据对比、实验结果 |+| Pattern | Use Cases |+| ------------------ | ------------------------------ |+| **Single Column Centered** | Cover, ending, key points |+| **Two-Column Cards** | Table of contents |+| **Left-Right Split (5:5)** | Comparison display |+| **Left-Right Split (4:6)** | Image-text mixed layout |+| **Card Grid** | Research content list |+| **Timeline** | Research progress |+| **Table** | Data comparison, experiment results |----## 八、间距规范+## VIII. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 卡片间距 | 20px |-| 内容块间距 | 24px |-| 卡片内边距 | 20px |-| 卡片圆角 | 8px |-| 图标与文字 | 12px |+| Element | Value |+| ------------------ | ------ |+| Card gap | 20px |+| Content block gap | 24px |+| Card padding | 20px |+| Card border radius | 8px |+| Icon-to-text gap | 12px |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (no `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency; no `rgba()`+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Use `<polygon>` triangles for arrows instead of `<marker>`-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`+- No `<g opacity="...">` (group opacity); set opacity on each child element individually+- Use overlay layers for image transparency+- Inline styles only; no external CSS or `@font-face`----## 十、占位符规范+## X. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符,常用占位符:+Templates use `{{PLACEHOLDER}}` format placeholders. Common placeholders:-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 论文/项目主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 答辩人姓名 |-| `{{ADVISOR}}` | 指导老师 |-| `{{INSTITUTION}}` | 学校/机构 |-| `{{DATE}}` | 答辩日期 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{SECTION_NUM}}` | 章节编号 |-| `{{CHAPTER_NUM}}` | 章节编号(大号) |-| `{{CHAPTER_TITLE}}`| 章节标题 |-| `{{CHAPTER_DESC}}` | 章节描述 |-| `{{KEY_MESSAGE}}` | 核心观点 |-| `{{PAGE_NUM}}` | 页码 |-| `{{SOURCE}}` | 数据来源 |-| `{{SECTION_NAME}}` | 章节名称(页脚) |-| `{{THANK_YOU}}` | 感谢语 |-| `{{TAGLINE}}` | 口号/副标语 |-| `{{CONTACT_INFO}}` | 联系方式 |-| `{{EMAIL}}` | 电子邮箱 |-| `{{COPYRIGHT}}` | 版权信息 |-| `{{LOGO}}` | Logo文字 |+| `{{TITLE}}` | Thesis/project main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Presenter name |+| `{{ADVISOR}}` | Advisor |+| `{{INSTITUTION}}` | University/institution |+| `{{DATE}}` | Defense date |+| `{{PAGE_TITLE}}` | Page title |+| `{{SECTION_NUM}}` | Section number |+| `{{CHAPTER_NUM}}` | Chapter number (large) |+| `{{CHAPTER_TITLE}}`| Chapter title |+| `{{CHAPTER_DESC}}` | Chapter description |+| `{{KEY_MESSAGE}}` | Key message |+| `{{PAGE_NUM}}` | Page number |+| `{{SOURCE}}` | Data source |+| `{{SECTION_NAME}}` | Section name (footer) |+| `{{THANK_YOU}}` | Thank-you message |+| `{{TAGLINE}}` | Tagline/slogan |+| `{{CONTACT_INFO}}` | Contact information |+| `{{EMAIL}}` | Email address |+| `{{COPYRIGHT}}` | Copyright info |+| `{{LOGO}}` | Logo text |----## 十一、组件规范+## XI. Component Specifications-### 1. 标签 (Tag)+### 1. Tag```xml-<!-- 蓝底白字标签 -->+<!-- Blue background white text tag --><rect x="40" y="150" width="80" height="28" fill="#0066CC" rx="4"/><text x="80" y="170" text-anchor="middle" fill="#FFFFFF" font-size="14" font-weight="bold">内容详解</text>-<!-- 红底白字标签(强调) -->+<!-- Red background white text tag (emphasis) --><rect x="40" y="150" width="80" height="28" fill="#CC0000" rx="4"/><text x="80" y="170" text-anchor="middle" fill="#FFFFFF" font-size="14" font-weight="bold">核心目标</text>```-### 2. 流程箭头+### 2. Flow Arrow```xml-<!-- 水平流程箭头 -->+<!-- Horizontal flow arrow --><line x1="200" y1="300" x2="350" y2="300" stroke="#0066CC" stroke-width="2"/><polygon points="350,295 360,300 350,305" fill="#0066CC"/>```-### 3. 数据高亮框+### 3. Data Highlight Box```xml-<!-- 重要数据区块 -->+<!-- Key data block --><rect x="40" y="400" width="200" height="80" fill="#FFFFFF" stroke="#CC0000" stroke-width="2" rx="8"/><text x="140" y="445" text-anchor="middle" fill="#CC0000" font-size="24" font-weight="bold">30%</text><text x="140" y="470" text-anchor="middle" fill="#666666" font-size="12">关键指标</text>@@ -264,29 +264,29 @@----## 十二、使用说明+## XII. Usage Instructions-1. 复制模板到项目目录-2. 根据答辩内容需求选择合适的页面模板-3. 使用占位符标记需要替换的内容-4. 确保答辩人信息、导师信息完整-5. 通过 Executor 角色生成最终 SVG+1. Copy the template to the project directory+2. Select the appropriate page template based on defense content needs+3. Use placeholders to mark content that needs replacement+4. Ensure presenter info and advisor info are complete+5. Generate the final SVG through the Executor role----## 十三、设计检查清单+## XIII. Design Checklist-### 生成前+### Before Generation-- [ ] 内容是否适合当前页布局-- [ ] 配色是否符合规范-- [ ] 字号层级是否正确+- [ ] Is the content suitable for the current page layout+- [ ] Does the color scheme follow the specification+- [ ] Is the font size hierarchy correct-### 生成后+### After Generation- [ ] viewBox = `0 0 1280 720`-- [ ] 无禁止元素-- [ ] 文本可读(≥12px)-- [ ] 内容在安全区域内-- [ ] 元素对齐整齐-- [ ] 样式一致性检查通过+- [ ] No prohibited elements+- [ ] Text is readable (≥12px)+- [ ] Content is within the safe area+- [ ] Elements are properly aligned+- [ ] Style consistency check passeddiff --git a/skills/ppt-master/templates/layouts/ai_ops/design_spec.md b/skills/ppt-master/templates/layouts/ai_ops/design_spec.mdindex ac63f60d..23a2933e 100644--- a/skills/ppt-master/templates/layouts/ai_ops/design_spec.md+++ b/skills/ppt-master/templates/layouts/ai_ops/design_spec.md@@ -1,356 +1,356 @@-# ai_ops - 企业数智化设计规范+# ai_ops - Enterprise Digital Intelligence Design Specification-> 适用于运营商 AI 运维架构、数字化转型方案、智能化建设汇报、IT 系统总体视图等高信息密度场景。+> Suitable for telecom operator AI operations architecture, digital transformation proposals, smart infrastructure reports, IT system overview diagrams, and other high-information-density scenarios.-> **风格参考**: 见 `reference_style.svg`(运营商运维 AI 建设总体视图),该文件展示了本模板的核心视觉语言。+> **Style Reference**: See `reference_style.svg` (Telecom Operator AI Operations Architecture Overview), which demonstrates the core visual language of this template.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | -------------------------------------------------------------------- |-| **模板名称** | ai_ops(企业数智化) |-| **适用场景** | 运营商 AI 运维架构、IT 系统总体视图、数字化转型方案、智能化建设汇报 |-| **设计调性** | 信息密集、结构化、模块分区、运营商政企风格 |-| **主题模式** | 亮色主题(白色背景 + 红蓝双色点缀 + 暖灰面板) |-| **信息密度** | 高密度——单页可承载 6-10 个信息模块,适合运营商汇报习惯 |+| Property | Description |+| ------------------ | ------------------------------------------------------------------------------ |+| **Template Name** | ai_ops (Enterprise Digital Intelligence) |+| **Use Cases** | Telecom AI operations architecture, IT system overviews, digital transformation proposals, smart infrastructure reports |+| **Design Tone** | Information-dense, structured, modular zoning, telecom/enterprise style |+| **Theme Mode** | Light theme (white background + red-blue dual-color accents + warm gray panels) |+| **Info Density** | High density — a single page can accommodate 6-10 information modules, matching telecom reporting conventions |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |-| -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 30-50px,上 20px,下 40px |-| **内容安全区** | x: 30-1250, y: 80-680 |-| **标题区域** | y: 20-80 |-| **网格基准** | 20px(高密度布局需要更细的网格)|+| Property | Value |+| ------------------ | -------------------------------- |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Page Margins** | Left/right 30-50px, top 20px, bottom 40px |+| **Content Safe Area** | x: 30-1250, y: 80-680 |+| **Title Area** | y: 20-80 |+| **Grid Baseline** | 20px (high-density layouts require a finer grid) |-> **注意**: 边距比常规模板更窄(30px vs 60px),以适应运营商高信息密度的汇报习惯。+> **Note**: Margins are narrower than standard templates (30px vs 60px) to accommodate the high-information-density reporting style common in telecom presentations.----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |-| ---------------- | ----------- | ------------------------------------ |-| **主色 Red** | `#C00000` | 品牌识别、标题竖条、编号徽章、目标条 |-| **辅助色 Blue** | `#2E75B6` | 场景标签、分类标头、底部装饰条 |-| **浅蓝** | `#5B9BD5` | 功能模块卡片、子项目标签 |+| Role | Value | Notes |+| ------------------ | ----------- | -------------------------------------------- |+| **Primary Red** | `#C00000` | Brand identity, title vertical bar, number badges, target bars |+| **Accent Blue** | `#2E75B6` | Scenario labels, category headers, bottom accent bars |+| **Light Blue** | `#5B9BD5` | Feature module cards, sub-item labels |-### 功能色+### Functional Colors-| 角色 | 色值 | 用途 |-| -------------- | ----------- | ---------------------------- |-| **暖灰底色** | `#FDF3EB` | 概述面板、开放平台面板背景 |-| **暖橙边框** | `#F8CBAD` | 面板边框、装饰分隔 |-| **浅灰背景** | `#F2F2F2` | 副标题带、指标卡片背景 |-| **卡片灰底** | `#E7E6E6` | 子模块卡片、能力底座卡片 |-| **卡片边框** | `#D9D9D9` | 卡片描边 |+| Role | Value | Usage |+| ------------------ | ----------- | ---------------------------------- |+| **Warm Gray BG** | `#FDF3EB` | Overview panel, open platform panel background |+| **Warm Orange Border** | `#F8CBAD` | Panel borders, decorative dividers |+| **Light Gray BG** | `#F2F2F2` | Subtitle bar, metric card background |+| **Card Gray BG** | `#E7E6E6` | Sub-module cards, capability base cards |+| **Card Border** | `#D9D9D9` | Card strokes |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |-| -------------- | ----------- | ---------------------- |-| **正文黑** | `#000000` | 标题、正文标准色 |-| **白色文字** | `#FFFFFF` | 深色色块上的文字 |-| **辅助文字** | `#666666` | 副标题、注释 |-| **浅色辅助** | `#999999` | 页码、来源标注 |-| **数据强调** | `#C00000` | KPI 数值、关键指标 |+| Role | Value | Usage |+| ------------------ | ----------- | ------------------------------ |+| **Body Black** | `#000000` | Titles, standard body text |+| **White Text** | `#FFFFFF` | Text on dark color blocks |+| **Secondary Text** | `#666666` | Subtitles, annotations |+| **Light Secondary**| `#999999` | Page numbers, source citations |+| **Data Emphasis** | `#C00000` | KPI values, key metrics |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", "SimHei", Arial, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", "SimHei", Arial, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| -------- | -------------------- | ------- | ------- |-| H1 | 封面主标题 | 36-48px | Bold |-| H2 | 页面标题 | 32-36px | Bold |-| H3 | 模块标题/小标题 | 18-20px | Bold |-| P | 正文内容 | 14-16px | Regular |-| Caption | 辅助说明/脚注 | 12-14px | Regular |-| Data | KPI 数值/指标强调 | 24-36px | Bold |+| Level | Usage | Size | Weight |+| -------- | ---------------------- | ------- | ------- |+| H1 | Cover main title | 36-48px | Bold |+| H2 | Page title | 32-36px | Bold |+| H3 | Module title/subtitle | 18-20px | Bold |+| P | Body content | 14-16px | Regular |+| Caption | Supplementary/footnotes | 12-14px | Regular |+| Data | KPI values/metric emphasis | 24-36px | Bold |-> **注意**: 正文字号偏小(14-16px vs 常规 18-20px),以适应单页高信息密度排布。+> **Note**: Body font size is smaller than usual (14-16px vs standard 18-20px) to accommodate high information density per page.----## 五、核心设计原则+## V. Core Design Principles-### 运营商高密度信息风格+### Telecom High-Density Information Style-本模板模拟运营商技术汇报的视觉语言,核心特征为"**模块化分区 + 高信息密度 + 红蓝双色层级**"。+This template emulates the visual language of telecom technical reports. The core characteristics are "**modular zoning + high information density + red-blue dual-color hierarchy**".-1. **左侧红色竖条**: 标题前使用红色矩形竖条(10×40px)作为视觉锚点,是整个模板最核心的标题标识。-2. **编号徽章**: 使用红色方形编号(30×30px,白色数字),用于标识关键举措/能力编号(如"五大举措"中的 1-5)。-3. **虚线分区框**: 使用 `stroke-dasharray="5 5"` 虚线矩形对内容模块分组,营造结构化、模块化的视觉效果。运营商汇报中常见的"分区框"。-4. **蓝色标签条**: 使用 `#2E75B6` 蓝色填充矩形(全宽或定宽)作为场景/分类标签头,承载场景名称。-5. **暖灰概述面板**: 使用 `#FDF3EB` 底色 + `#F8CBAD` 边框的面板承载概述/摘要/开放平台入口等信息。-6. **指标卡片组**: 白色小卡片 + `#F2F2F2` 边框,紧密排列展示 KPI 指标,数值部分用 `#C00000` 红色强调。-7. **浅蓝子模块**: `#5B9BD5` 填充的小矩形卡片,用于展示具体功能项(如"AI一键排障助手")。-8. **灰色能力底座**: `#E7E6E6` / `#F2F2F2` 底色的卡片用于展示基础能力/平台组件。+1. **Left Red Vertical Bar**: A red rectangle (10×40px) before titles serves as a visual anchor — the most essential title identifier throughout the template.+2. **Number Badges**: Red square badges (30×30px with white numbers) identify key initiatives/capability numbers (e.g., numbers 1-5 in "Five Key Initiatives").+3. **Dashed Zone Frames**: `stroke-dasharray="5 5"` dashed rectangles group content modules, creating a structured, modular visual effect — a common "zone frame" in telecom reports.+4. **Blue Label Bars**: `#2E75B6` blue-filled rectangles (full-width or fixed-width) serve as scenario/category headers carrying scenario names.+5. **Warm Gray Overview Panels**: Panels with `#FDF3EB` background + `#F8CBAD` border carry overviews, summaries, and open platform entries.+6. **Metric Card Groups**: White cards with `#F2F2F2` borders, closely arranged to display KPI metrics; values highlighted in `#C00000` red.+7. **Light Blue Sub-modules**: `#5B9BD5` filled small rectangular cards displaying specific feature items (e.g., "AI One-Click Troubleshooting Assistant").+8. **Gray Capability Base Cards**: Cards with `#E7E6E6` / `#F2F2F2` background for displaying foundational capabilities/platform components.-### 高级特性+### Advanced Features-1. **三角形装饰**: 顶部区域可使用淡色半透明三角形(`fill-opacity="0.3"`)作为视觉引导。-2. **星形/图标点缀**: 关键成果旁可使用简单 polygon 星形强化视觉冲击力。-3. **多级嵌套分区**: 外层虚线框 > 内层小标签区 > 具体功能卡片,形成三层视觉层级。-4. **紧凑行距**: 模块间间距压缩至 10-20px,最大化信息承载量。+1. **Triangle Decorations**: The top area may use light semi-transparent triangles (`fill-opacity="0.3"`) as visual guides.+2. **Star/Icon Accents**: Simple polygon stars near key achievements enhance visual impact.+3. **Multi-level Nested Zones**: Outer dashed frame > inner label area > specific feature cards, forming a three-layer visual hierarchy.+4. **Compact Line Spacing**: Module spacing compressed to 10-20px to maximize information capacity.----## 六、页面结构+## VI. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ------------ | -------------- | ---------------------------------------------- |-| **标题区** | y=20-80 | 红色竖条 + 标题文字 + 可选副标题概述条 |-| **概述条** | y=80-140 | 全宽 `#F2F2F2` 背景条,承载页面核心摘要文字 |-| **内容区** | y=140-670 | 主要内容区域(多模块密集排布) |-| **页脚** | y=680-720 | 红色窄条页码 + 章节名 + 来源标注 |+| Area | Position/Height | Description |+| ------------------ | ---------------- | ---------------------------------------------------- |+| **Title Area** | y=20-80 | Red vertical bar + title text + optional subtitle overview bar |+| **Overview Bar** | y=80-140 | Full-width `#F2F2F2` background bar carrying the page's core summary |+| **Content Area** | y=140-670 | Main content area (densely packed multi-module layout) |+| **Footer** | y=680-720 | Red narrow bar with page number + chapter name + source citation |-### 导航栏设计+### Navigation Bar Design-- **标题竖条**: 红色矩形 `#C00000`,10×40px,位于标题文字左侧-- **标题文字**: 距竖条 10px,36px 字号,`#C00000` 色或 `#000000`-- **概述条**: 全宽浅灰矩形(h=60px),居中 16px 正文,承载页面概述/导语+- **Title Vertical Bar**: Red rectangle `#C00000`, 10×40px, positioned left of the title text+- **Title Text**: 10px from the vertical bar, 36px font size, `#C00000` or `#000000`+- **Overview Bar**: Full-width light gray rectangle (h=60px), centered 16px body text carrying the page overview/introduction-### 装饰元素+### Decorative Elements-- **编号徽章**: 30×30px 红色方块 + 白色数字(居中)-- **蓝色标签**: 定宽蓝色矩形 + 白色文字(如"故障定界定段")-- **虚线分区框**: `stroke="#C00000"` 或 `stroke="#E7E6E6"`,`stroke-dasharray="5 5"`-- **暖灰面板**: `fill="#FDF3EB"` + `stroke="#F8CBAD"` + `stroke-width="2"`-- **浅蓝功能卡**: `fill="#5B9BD5"` 矩形 + 白色文字+- **Number Badges**: 30×30px red squares + white numbers (centered)+- **Blue Labels**: Fixed-width blue rectangles + white text (e.g., "Fault Boundary Identification")+- **Dashed Zone Frames**: `stroke="#C00000"` or `stroke="#E7E6E6"`, `stroke-dasharray="5 5"`+- **Warm Gray Panels**: `fill="#FDF3EB"` + `stroke="#F8CBAD"` + `stroke-width="2"`+- **Light Blue Feature Cards**: `fill="#5B9BD5"` rectangles + white text----## 七、页面类型+## VII. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- **背景**: 白色 `#FFFFFF`-- **左侧装饰**: 全高红蓝双色竖条(红色上半 + 蓝色下半),宽度 60px-- **标题区**: 居中大号标题 `{{TITLE}}`(红色),下方浅灰概述条内置副标题 `{{SUBTITLE}}`-- **中部装饰**: 编号徽章(1-5)+ 蓝色场景标签,展示核心能力/场景-- **底部信息**: 演讲者 `{{AUTHOR}}` + 日期 `{{DATE}}`-- **底部装饰**: 暖灰窄条 + 蓝色全宽底部条+- **Background**: White `#FFFFFF`+- **Left Decoration**: Full-height red-blue dual-color vertical bar (red upper half + blue lower half), width 60px+- **Title Area**: Centered large title `{{TITLE}}` (red), with subtitle `{{SUBTITLE}}` inside a light gray overview bar below+- **Middle Decoration**: Number badges (1-5) + blue scenario labels showcasing core capabilities/scenarios+- **Bottom Info**: Speaker `{{AUTHOR}}` + date `{{DATE}}`+- **Bottom Decoration**: Warm gray narrow bar + blue full-width bottom bar-### 2. 章节页 (02_chapter.svg)+### 2. Chapter Page (02_chapter.svg)-- **背景**: 白色 `#FFFFFF`-- **左右装饰**: 左侧红色竖条 + 右侧蓝色竖条(呼应封面双色)-- **中心**: 红色编号徽章(80×80px 大号)`{{CHAPTER_NUM}}` + 水印数字(160px 浅灰)-- **标题**: 居中 `{{CHAPTER_TITLE}}`(48px Bold)-- **装饰线**: 红蓝双线(红色粗线 + 蓝色细线)-- **描述**: `{{CHAPTER_DESC}}` 灰色文字+- **Background**: White `#FFFFFF`+- **Left/Right Decoration**: Left red vertical bar + right blue vertical bar (echoing the cover dual-color scheme)+- **Center**: Red number badge (80×80px large) `{{CHAPTER_NUM}}` + watermark number (160px light gray)+- **Title**: Centered `{{CHAPTER_TITLE}}` (48px Bold)+- **Decorative Line**: Red-blue dual lines (thick red line + thin blue line)+- **Description**: `{{CHAPTER_DESC}}` in gray text-### 3. 内容页 (03_content.svg)+### 3. Content Page (03_content.svg)-- **顶部**: 4px 红色顶部条 + 白色标题栏(80px 高)-- **标题标识**: 红色竖条(8×40px)+ 32px Bold 标题 `{{PAGE_TITLE}}`-- **内容区**: 虚线框(`stroke-dasharray="5 5"`)标识内容区域 `{{CONTENT_AREA}}`-- **页脚**: 浅灰底栏,左侧红色竖条 + 章节名 `{{SECTION_NAME}}`,右侧红色方块页码 `{{PAGE_NUM}}`-- **来源标注**: 页脚居中 `{{SOURCE}}`+- **Top**: 4px red top bar + white title bar (80px height)+- **Title Identifier**: Red vertical bar (8×40px) + 32px Bold title `{{PAGE_TITLE}}`+- **Content Area**: Dashed frame (`stroke-dasharray="5 5"`) marking content area `{{CONTENT_AREA}}`+- **Footer**: Light gray bottom bar, left red vertical bar + chapter name `{{SECTION_NAME}}`, right red square page number `{{PAGE_NUM}}`+- **Source Citation**: Footer centered `{{SOURCE}}`-### 4. 结束页 (04_ending.svg)+### 4. Ending Page (04_ending.svg)-- **布局**: 与封面完全呼应——左侧红蓝双色竖条、底部蓝色条-- **中央面板**: 暖灰面板(`#FDF3EB` + `#F8CBAD` 边框),承载感谢语-- **内容**: `{{THANK_YOU}}`(红色 64px Bold)+ `{{TAGLINE}}`(蓝色 22px)-- **联系信息**: `{{CONTACT_INFO}}` + `{{COPYRIGHT}}`-- **底部装饰**: 编号徽章 + 蓝色标签,呼应封面+- **Layout**: Mirrors the cover — left red-blue dual-color vertical bar, bottom blue bar+- **Central Panel**: Warm gray panel (`#FDF3EB` + `#F8CBAD` border) carrying the thank-you message+- **Content**: `{{THANK_YOU}}` (red 64px Bold) + `{{TAGLINE}}` (blue 22px)+- **Contact Info**: `{{CONTACT_INFO}}` + `{{COPYRIGHT}}`+- **Bottom Decoration**: Number badges + blue labels, echoing the cover----## 八、布局模式+## VIII. Layout Patterns-| 模式 | 适用场景 |-| ---------------------- | ------------------------------------------ |-| **总体视图(架构图)** | AI 建设总体视图、系统架构全景 |-| **指标仪表盘** | KPI 展示、成效汇报、数据看板 |-| **多模块分区** | 能力清单、场景矩阵、分域展示 |-| **流程/时间线** | 建设路径、实施计划、演进路线 |-| **上下分栏** | 目标+成效(上)、场景+能力(下) |-| **左右分栏 (3:7)** | 左侧导航标签 + 右侧内容区 |-| **卡片矩阵 (2×3/3×3)**| 能力模块、团队分工、项目列表 |-| **表格** | 指标对比、进度跟踪 |+| Pattern | Applicable Scenarios |+| ------------------------------ | ------------------------------------------------- |+| **Architecture Overview** | AI operations overview, system architecture panorama |+| **Metrics Dashboard** | KPI display, performance reports, data dashboards |+| **Multi-Module Zoning** | Capability lists, scenario matrices, domain displays |+| **Process/Timeline** | Implementation roadmap, deployment plan, evolution path |+| **Top-Bottom Split** | Objectives+results (top), scenarios+capabilities (bottom) |+| **Left-Right Split (3:7)** | Left navigation labels + right content area |+| **Card Matrix (2x3/3x3)** | Capability modules, team assignments, project lists |+| **Table** | Metric comparisons, progress tracking |-> **推荐**: 运营商汇报常采用"**总体视图**"模式——单页展示完整架构,从目标→成效→场景→编排→基础能力,自上而下层层展开。+> **Recommended**: Telecom reports commonly use the "**Architecture Overview**" pattern — a single page presenting the complete architecture from objectives → results → scenarios → orchestration → foundational capabilities, unfolding top to bottom.----## 九、常用组件+## IX. Common Components-### 标题竖条装饰+### Title Vertical Bar Decoration```xml-<!-- 红色竖条 + 标题 -->+<!-- Red vertical bar + title --><rect x="30" y="20" width="10" height="40" fill="#C00000" />-<text x="50" y="55" font-family="Microsoft YaHei, sans-serif" font-size="36" font-weight="bold" fill="#C00000">页面标题</text>+<text x="50" y="55" font-family="Microsoft YaHei, sans-serif" font-size="36" font-weight="bold" fill="#C00000">Page Title</text>```-### 编号徽章+### Number Badge```xml-<!-- 红色方形编号 -->+<!-- Red square number badge --><rect x="80" y="560" width="30" height="30" fill="#C00000" /><text x="95" y="582" font-family="Arial, sans-serif" font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle">1</text>```-### 蓝色场景标签+### Blue Scenario Label```xml-<!-- 蓝色标签条 -->+<!-- Blue label bar --><rect x="120" y="310" width="220" height="40" fill="#2E75B6" />-<text x="230" y="336" font-family="Microsoft YaHei, sans-serif" font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">故障定界定段</text>+<text x="230" y="336" font-family="Microsoft YaHei, sans-serif" font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">Fault Boundary Identification</text>```-### 指标卡片+### Metric Card```xml-<!-- 白底指标卡片(数值红色强调) -->+<!-- White metric card (values highlighted in red) --><rect x="120" y="215" width="140" height="35" fill="#FFFFFF" stroke="#F2F2F2" stroke-width="2" />-<text x="190" y="239" font-family="Microsoft YaHei, sans-serif" font-size="14" font-weight="bold" fill="#000000" text-anchor="middle">故障工单压降<tspan fill="#C00000">30%</tspan></text>+<text x="190" y="239" font-family="Microsoft YaHei, sans-serif" font-size="14" font-weight="bold" fill="#000000" text-anchor="middle">Fault tickets reduced by<tspan fill="#C00000">30%</tspan></text>```-### 虚线分区框+### Dashed Zone Frame```xml-<!-- 虚线内容分区 -->+<!-- Dashed content zone --><rect x="120" y="390" width="940" height="150" fill="none" stroke="#C00000" stroke-width="2" stroke-dasharray="5 5" />```-### 暖灰概述条+### Warm Gray Overview Bar```xml-<!-- 全宽暖灰概述/摘要条 -->+<!-- Full-width warm gray overview/summary bar --><rect x="30" y="80" width="1220" height="60" fill="#F2F2F2" />-<text x="640" y="115" font-family="Microsoft YaHei, sans-serif" font-size="16" fill="#000000" text-anchor="middle">概述文字内容...</text>+<text x="640" y="115" font-family="Microsoft YaHei, sans-serif" font-size="16" fill="#000000" text-anchor="middle">Overview text content...</text>```-### 暖灰面板+### Warm Gray Panel```xml-<!-- 暖灰面板(开放平台/摘要区) -->+<!-- Warm gray panel (open platform/summary area) --><rect x="1080" y="390" width="160" height="300" fill="#FDF3EB" stroke="#F8CBAD" stroke-width="2" />```-### 浅蓝功能卡片+### Light Blue Feature Card```xml-<!-- 功能模块卡片 -->+<!-- Feature module card --><rect x="160" y="450" width="240" height="30" fill="#5B9BD5" />-<text x="280" y="471" font-family="Microsoft YaHei, sans-serif" font-size="14" fill="#FFFFFF" text-anchor="middle">AI一键排障助手</text>+<text x="280" y="471" font-family="Microsoft YaHei, sans-serif" font-size="14" fill="#FFFFFF" text-anchor="middle">AI One-Click Troubleshooting Assistant</text>```-### 灰色能力底座卡片+### Gray Capability Base Card```xml-<!-- 基础能力卡片 -->+<!-- Foundational capability card --><rect x="120" y="630" width="80" height="40" fill="#F2F2F2" stroke="#D9D9D9" stroke-width="1" />-<text x="160" y="655" font-family="Microsoft YaHei, sans-serif" font-size="14" fill="#000000" text-anchor="middle">核心网</text>+<text x="160" y="655" font-family="Microsoft YaHei, sans-serif" font-size="14" fill="#000000" text-anchor="middle">Core Network</text>```----## 十、间距规范+## X. Spacing Specification-| 元素 | 数值 |-| ------------------ | --------- |-| 页面左右边距 | 30-50px |-| 页面上下边距 | 20-40px |-| 标题区高度 | 60px |-| 概述条高度 | 60px |-| 标题与概述条间距 | 0px |-| 概述条与内容间距 | 10-20px |-| 模块间间距 | 10-20px |-| 卡片间间距 | 10px |-| 卡片内边距 | 15-20px |-| 编号徽章与标签间距 | 5-10px |-| 页脚高度 | 40px |+| Element | Value |+| ------------------------------ | --------- |+| Page left/right margins | 30-50px |+| Page top/bottom margins | 20-40px |+| Title area height | 60px |+| Overview bar height | 60px |+| Title to overview bar spacing | 0px |+| Overview bar to content spacing | 10-20px |+| Module spacing | 10-20px |+| Card spacing | 10px |+| Card inner padding | 15-20px |+| Badge to label spacing | 5-10px |+| Footer height | 40px |-> **紧凑原则**: 运营商风格追求单页最大信息量,间距普遍比常规模板小 30-50%。+> **Compact Principle**: The telecom style pursues maximum information per page; spacing is generally 30-50% smaller than standard templates.----## 十一、SVG 技术约束+## XI. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(**严禁** `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`(`<defs>` 内 `id` 合法)-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 禁止使用:`<symbol>+<use>`、`<iframe>`、`@font-face`-8. 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-9. 箭头使用 `<polygon>` 三角形替代 `<marker>`-10. 仅使用系统字体和内联样式--### PPT 兼容性规则--- 图片透明度使用遮罩层替代-- 渐变使用 `<defs>` 中的 `<linearGradient>` 定义-- 圆角矩形使用 `rx`/`ry` 属性(后处理会转为 Path)+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (**`<foreignObject>` is strictly prohibited**)+4. Use `fill-opacity` / `stroke-opacity` for transparency; `rgba()` is prohibited+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject` (`id` inside `<defs>` is allowed)+6. Prohibited: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Prohibited: `<symbol>+<use>`, `<iframe>`, `@font-face`+8. Prohibited: `<g opacity="...">` (group opacity) — set opacity on each child element individually+9. Use `<polygon>` triangles instead of `<marker>` for arrows+10. Use only system fonts and inline styles++### PPT Compatibility Rules++- Use overlay layers instead of image opacity+- Define gradients using `<linearGradient>` inside `<defs>`+- Use `rx`/`ry` attributes for rounded rectangles (post-processing converts to Path)----## 十二、占位符规范--模板使用 `{{PLACEHOLDER}}` 格式的占位符:--| 占位符 | 说明 | 适用模板 |-| ------------------- | -------------------- | ------------ |-| `{{TITLE}}` | 主标题 | 封面 |-| `{{SUBTITLE}}` | 副标题/概述 | 封面 |-| `{{AUTHOR}}` | 演讲者/单位名称 | 封面 |-| `{{DATE}}` | 日期 | 封面 |-| `{{CHAPTER_NUM}}` | 章节编号 | 章节页 |-| `{{CHAPTER_TITLE}}` | 章节标题 | 章节页 |-| `{{CHAPTER_DESC}}` | 章节描述 | 章节页 |-| `{{PAGE_TITLE}}` | 页面标题 | 内容页 |-| `{{CONTENT_AREA}}` | 内容区域标识 | 内容页 |-| `{{SECTION_NAME}}` | 章节名称(页脚) | 内容页 |-| `{{SOURCE}}` | 数据来源(页脚) | 内容页 |-| `{{PAGE_NUM}}` | 页码 | 内容页、结束页 |-| `{{THANK_YOU}}` | 感谢语 | 结束页 |-| `{{TAGLINE}}` | 口号/标语 | 结束页 |-| `{{CONTACT_INFO}}` | 联系信息 | 结束页 |-| `{{COPYRIGHT}}` | 版权 | 结束页 |+## XII. Placeholder Specification++The template uses `{{PLACEHOLDER}}` format placeholders:++| Placeholder | Description | Applicable Template |+| ------------------- | ------------------------ | ------------------- |+| `{{TITLE}}` | Main title | Cover |+| `{{SUBTITLE}}` | Subtitle/overview | Cover |+| `{{AUTHOR}}` | Speaker/organization | Cover |+| `{{DATE}}` | Date | Cover |+| `{{CHAPTER_NUM}}` | Chapter number | Chapter page |+| `{{CHAPTER_TITLE}}` | Chapter title | Chapter page |+| `{{CHAPTER_DESC}}` | Chapter description | Chapter page |+| `{{PAGE_TITLE}}` | Page title | Content page |+| `{{CONTENT_AREA}}` | Content area identifier | Content page |+| `{{SECTION_NAME}}` | Section name (footer) | Content page |+| `{{SOURCE}}` | Data source (footer) | Content page |+| `{{PAGE_NUM}}` | Page number | Content/ending page |+| `{{THANK_YOU}}` | Thank-you message | Ending page |+| `{{TAGLINE}}` | Slogan/tagline | Ending page |+| `{{CONTACT_INFO}}` | Contact information | Ending page |+| `{{COPYRIGHT}}` | Copyright | Ending page |----## 十三、使用说明+## XIII. Usage Notes-1. 复制本模板目录到项目 `templates/` 目录-2. 查看 `reference_style.svg` 理解核心视觉风格-3. 根据内容需求选择合适的页面模板-4. 使用占位符标记需要替换的内容-5. 通过 Executor 角色生成最终 SVG-6. 高信息密度页面建议参考 `reference_style.svg` 的多模块分区布局+1. Copy this template directory to the project `templates/` directory+2. Review `reference_style.svg` to understand the core visual style+3. Select appropriate page templates based on content needs+4. Mark content to be replaced using placeholders+5. Generate final SVG through the Executor role+6. For high-information-density pages, refer to the multi-module zoning layout in `reference_style.svg`----## 十四、设计亮点+## XIV. Design Highlights-- **运营商基因**: 源自真实运营商 AI 运维架构汇报,天然适配运营商/政企汇报风格-- **高信息密度**: 单页可承载完整架构视图(目标→成效→场景→编排→基础能力)-- **红蓝双色层级**: 红色=核心/强调/目标,蓝色=场景/模块/能力,层级清晰-- **编号徽章体系**: 红色方块编号贯穿全文,形成"N 大举措"的视觉叙事-- **三层嵌套分区**: 虚线外框→分类标签→功能卡片,结构化表达复杂架构-- **指标卡片组**: 紧凑排列 KPI 指标,数值红色强调,一目了然+- **Telecom DNA**: Derived from real telecom AI operations architecture reports, naturally suited for telecom/enterprise presentation styles+- **High Information Density**: A single page can accommodate a complete architecture view (objectives → results → scenarios → orchestration → foundational capabilities)+- **Red-Blue Dual-Color Hierarchy**: Red = core/emphasis/objectives, Blue = scenarios/modules/capabilities — clear visual hierarchy+- **Number Badge System**: Red square numbers throughout create a "N Key Initiatives" visual narrative+- **Three-Level Nested Zoning**: Dashed outer frame → category labels → feature cards for structured expression of complex architectures+- **Metric Card Groups**: Compactly arranged KPI metrics with red-highlighted values for instant readabilitydiff --git a/skills/ppt-master/templates/layouts/anthropic/design_spec.md b/skills/ppt-master/templates/layouts/anthropic/design_spec.mdindex 05e3cd3c..da21b7d3 100644--- a/skills/ppt-master/templates/layouts/anthropic/design_spec.md+++ b/skills/ppt-master/templates/layouts/anthropic/design_spec.md@@ -1,178 +1,178 @@-# Anthropic 风格模板 - 设计规范+# Anthropic Style Template - Design Specification-> 适用于 AI/LLM 技术分享、开发者大会、技术培训、产品发布等场景。+> Suitable for AI/LLM tech talks, developer conferences, technical training, product launches, and similar scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |+| Property | Description || -------------- | ------------------------------------------------------ |-| **模板名称** | anthropic(Anthropic 风格模板) |-| **适用场景** | AI 技术分享、开发者大会、技术培训、产品发布 |-| **设计调性** | 科技感、专业、现代、结论先行 |-| **主题模式** | 混合主题(深色封面/章节 + 亮色内容页) |+| **Template Name** | anthropic (Anthropic Style Template) |+| **Use Cases** | AI tech talks, developer conferences, technical training, product launches |+| **Design Tone** | Tech-forward, professional, modern, conclusion-first |+| **Theme Mode** | Mixed theme (dark cover/chapter + light content pages) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **安全边距** | 60px (左右), 50px (上下) |-| **内容区域** | x: 60-1220, y: 100-670 |-| **标题区域** | y: 50-100 |-| **网格基准** | 40px |+| **Safe Margins** | 60px (left/right), 50px (top/bottom) |+| **Content Area** | x: 60-1220, y: 100-670 |+| **Title Area** | y: 50-100 |+| **Grid Base** | 40px |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || ---------------- | ----------- | -------------------------------- |-| **Anthropic 橙** | `#D97757` | 品牌识别、标题强调、关键数据 |-| **深空灰** | `#1A1A2E` | 封面背景、正文、图表基底 |-| **科技蓝** | `#4A90D9` | 流程图、链接、交互元素 |-| **薄荷绿** | `#10B981` | 推荐方案、正向指标、成功状态 |-| **珊瑚红** | `#EF4444` | 风险、注意事项、警示 |+| **Anthropic Orange** | `#D97757` | Brand identity, title emphasis, key data |+| **Deep Space Gray** | `#1A1A2E` | Cover background, body text, chart base |+| **Tech Blue** | `#4A90D9` | Flowcharts, links, interactive elements |+| **Mint Green** | `#10B981` | Recommended options, positive indicators, success states |+| **Coral Red** | `#EF4444` | Risks, cautions, warnings |-### 中性色+### Neutral Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **云白** | `#F8FAFC` | 卡片背景 |-| **边框灰** | `#E2E8F0` | 卡片边框、分隔线 |-| **石墨灰** | `#64748B` | 次要文本、图表标签 |-| **纯白** | `#FFFFFF` | 页面背景 |+| **Cloud White** | `#F8FAFC` | Card background |+| **Border Gray** | `#E2E8F0` | Card borders, dividers |+| **Slate Gray** | `#64748B` | Secondary text, chart labels |+| **Pure White** | `#FFFFFF` | Page background |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `Arial, "Helvetica Neue", "Segoe UI", sans-serif`+**Font Stack**: `Arial, "Helvetica Neue", "Segoe UI", sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |+| Level | Usage | Size | Weight || -------- | ---------------- | ------ | ------- |-| H1 | 封面主标题 | 56px | Bold |-| H2 | 页面标题 | 32-36px| Bold |-| H3 | 副标题/分区 | 24-28px| Semibold|-| H4 | 卡片标题 | 20-22px| Bold |-| P | 正文内容 | 16-18px| Regular |-| Data | 强调数据 | 40-48px| Bold |-| Label | 标签文本 | 14px | 500 |-| Sub | 图表标签/脚注 | 12-14px| Regular |+| H1 | Cover main title | 56px | Bold |+| H2 | Page title | 32-36px| Bold |+| H3 | Subtitle/section | 24-28px| Semibold|+| H4 | Card title | 20-22px| Bold |+| P | Body content | 16-18px| Regular |+| Data | Highlighted data | 40-48px| Bold |+| Label | Label text | 14px | 500 |+| Sub | Chart labels/footnotes | 12-14px | Regular |----## 五、核心设计原则+## V. Core Design Principles-### 顶级咨询风格+### Top-Tier Consulting Style-1. **结论先行 (Pyramid Principle)**: 每页标题即核心观点-2. **数据情境化**: 对比、趋势、基准,不孤立呈现数据-3. **SCQA 框架**: 情境→复杂性→问题→答案-4. **MECE 原则**: 相互独立、完全穷尽-5. **专业留白**: 内容占比 < 65%,让信息"呼吸"+1. **Conclusion First (Pyramid Principle)**: Each page title is the core takeaway+2. **Data Contextualization**: Comparisons, trends, benchmarks — never present data in isolation+3. **SCQA Framework**: Situation → Complication → Question → Answer+4. **MECE Principle**: Mutually Exclusive, Collectively Exhaustive+5. **Professional Whitespace**: Content ratio < 65%, let information "breathe"----## 六、页面结构+## VI. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0, h=6-8px | Anthropic 橙装饰条 |-| **标签** | y=50-70 | 页面类型标签(大写字母,橙色) |-| **标题区** | y=80-140 | 页面标题(核心观点) |-| **内容区** | y=160-620 | 主要内容区域 |-| **页脚** | y=680 | 页码(居中) |+| Area | Position/Height | Description |+| -------------- | --------------- | -------------------------------------- |+| **Top** | y=0, h=6-8px | Anthropic Orange decorative bar |+| **Label** | y=50-70 | Page type label (uppercase, orange) |+| **Title Area** | y=80-140 | Page title (core takeaway) |+| **Content Area** | y=160-620 | Main content area |+| **Footer** | y=680 | Page number (centered) |-### 装饰设计+### Decorative Elements-- **顶部橙色条**: Anthropic 橙 (`#D97757`),高度 6px-- **左侧渐变条**: 橙色渐变 (`#D97757` → `#E8956F`)-- **卡片边框**: 浅灰 (`#E2E8F0`)-- **卡片阴影**: 柔和阴影效果-- **网格装饰线**: 深色封面使用白色低透明度网格+- **Top Orange Bar**: Anthropic Orange (`#D97757`), height 6px+- **Left Gradient Bar**: Orange gradient (`#D97757` → `#E8956F`)+- **Card Border**: Light gray (`#E2E8F0`)+- **Card Shadow**: Soft shadow effect+- **Grid Decoration Lines**: White low-opacity grid on dark covers----## 七、页面类型+## VII. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 深色渐变背景 (`#1A1A2E` → `#16213E` → `#0F0F1A`)-- 网格装饰线(白色,3% 透明度)-- 橙色和蓝色光晕效果-- 神经网络风格连接线和节点-- 居中主标题(白色)+ 副标题-- 橙色装饰短线-- 底部日期和来源信息+- Dark gradient background (`#1A1A2E` → `#16213E` → `#0F0F1A`)+- Grid decoration lines (white, 3% opacity)+- Orange and blue glow effects+- Neural network-style connection lines and nodes+- Centered main title (white) + subtitle+- Orange decorative short line+- Bottom date and source info-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents Page (02_toc.svg)-- 白色背景-- 左侧橙色渐变装饰条 (8px)-- 橙色圆形编号 + 章节标题-- 右侧复杂度递增示意图+- White background+- Left orange gradient decorative bar (8px)+- Orange circular numbers + chapter titles+- Right-side complexity progression illustration-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深色渐变背景-- 网格装饰-- 居中大号章节标题-- 橙色装饰线+- Dark gradient background+- Grid decoration+- Centered large chapter title+- Orange decorative line-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 顶部橙色装饰条-- 页面类型标签(橙色大写)-- 标题即核心观点-- 三列卡片布局(彩色顶部边框)-- 页脚居中页码+- White background+- Top orange decorative bar+- Page type label (orange uppercase)+- Title as core takeaway+- Three-column card layout (colored top borders)+- Footer with centered page number-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 深色渐变背景-- 神经网络装饰-- 居中感谢语-- 联系信息+- Dark gradient background+- Neural network decoration+- Centered thank-you message+- Contact information----## 八、常用组件+## VIII. Common Components-### 卡片样式+### Card Style```xml-<!-- 带阴影的卡片 -->+<!-- Card with shadow --><g filter="url(#cardShadow)">- <path fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"+ <path fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"d="M72,180 H408 A12,12 0 0 1 420,192 V588 A12,12 0 0 1 408,600 H72 A12,12 0 0 1 60,588 V192 A12,12 0 0 1 72,180 Z"/></g>-<!-- 顶部彩色装饰条 -->+<!-- Top colored decorative bar --><rect x="60" y="180" width="360" height="6" fill="#10B981"/>```-### 圆形编号+### Circular Number```xml<circle cx="90" cy="200" r="24" fill="#D97757"/><text x="90" y="207" font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle">1</text>```-### 图标背景圆+### Icon Background Circle```xml<circle cx="130" cy="250" r="35" fill="#10B981" fill-opacity="0.1"/>@@ -180,58 +180,58 @@----## 九、间距规范+## IX. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 安全边距 | 60px |-| 卡片间距 | 30-40px|-| 卡片圆角 | 8-12px |-| 卡片内边距 | 30px |-| 网格基准 | 40px |+| Element | Value |+| ---------------- | ------ |+| Safe margin | 60px |+| Card gap | 30-40px|+| Card border radius | 8-12px |+| Card padding | 30px |+| Grid base | 40px |----## 十、SVG 技术约束+## X. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(**严禁** `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`-7. 渐变使用 `<defs>` 定义+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (**strictly no** `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`+7. Define gradients using `<defs>`-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度)-- 仅使用内联样式+- No `<g opacity="...">` (group opacity)+- Inline styles only----## 十一、占位符规范+## XI. Placeholder Specification-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{SOURCE}}` | 来源信息 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 页面标题(核心观点)|-| `{{PAGE_LABEL}}` | 页面类型标签 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}`| 章节标题 |-| `{{PAGE_NUM}}` | 页码 |-| `{{TOTAL_PAGES}}` | 总页数 |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{SOURCE}}` | Source info |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Page title (core takeaway) |+| `{{PAGE_LABEL}}` | Page type label |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}`| Chapter title |+| `{{PAGE_NUM}}` | Page number |+| `{{TOTAL_PAGES}}` | Total pages |----## 十二、使用说明+## XII. Usage Instructions-1. 复制模板到项目目录-2. 根据内容需求选择页面模板-3. **标题即核心观点**,确保每页有明确结论-4. 使用三种强调色区分内容类型(绿=推荐,蓝=流程,橙=重点)-5. 通过 Executor 角色生成最终 SVG+1. Copy the template to the project directory+2. Select the appropriate page template based on content needs+3. **Title is the core takeaway** — ensure each page has a clear conclusion+4. Use three accent colors to differentiate content types (green = recommended, blue = process, orange = emphasis)+5. Generate the final SVG through the Executor rolediff --git a/skills/ppt-master/templates/layouts/consultant/design_spec.md b/skills/ppt-master/templates/layouts/consultant/design_spec.mdindex 64ba4731..19b1a8d0 100644--- a/skills/ppt-master/templates/layouts/consultant/design_spec.md+++ b/skills/ppt-master/templates/layouts/consultant/design_spec.md@@ -1,215 +1,215 @@-# 咨询顾问模板 (Consultant Style) - 设计规范+# Consultant Style Template - Design Specification-> 适用于商业咨询、战略分析、项目汇报、企业培训等场景。+> Suitable for business consulting, strategic analysis, project reports, corporate training, and similar scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |+| Property | Description || -------------- | ------------------------------------------------------ |-| **模板名称** | consultant(咨询顾问模板) |-| **适用场景** | 商业咨询、战略分析、项目汇报、企业培训 |-| **设计调性** | 专业、简约、商务、现代 |-| **主题模式** | 深色主题(深蓝背景 + 蓝色强调色 + 金色点缀) |+| **Template Name** | consultant (Consultant Style Template) |+| **Use Cases** | Business consulting, strategic analysis, project reports, corporate training |+| **Design Tone** | Professional, minimalist, business-oriented, modern |+| **Theme Mode** | Dark theme (dark blue background + blue accent + gold accents) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上 40px,下 40px |-| **内容安全区** | x: 60-1220, y: 80-660 |+| **Page Margins** | Left/Right 60px, Top 40px, Bottom 40px |+| **Safe Area** | x: 60-1220, y: 80-660 |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || -------------- | ----------- | -------------------------------- |-| **主背景深蓝** | `#0A1628` | 封面、章节页、结束页背景 |-| **内容页白** | `#FFFFFF` | 内容页主背景 |-| **强调蓝** | `#0066CC` | 装饰条、按钮、标题强调 |-| **金色点缀** | `#D4AF37` | 分隔线、高亮装饰 |-| **辅助灰** | `#F1F5F9` | 卡片背景、核心观点区域 |+| **Primary Dark Blue** | `#0A1628` | Cover, chapter, ending page backgrounds |+| **Content White** | `#FFFFFF` | Content page main background |+| **Accent Blue** | `#0066CC` | Decorative bars, buttons, title emphasis |+| **Gold Accent** | `#D4AF37` | Dividers, highlight decorations |+| **Auxiliary Gray** | `#F1F5F9` | Card backgrounds, key message area |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **白色文字** | `#FFFFFF` | 深色背景上的主要文字 |-| **主文字** | `#0A1628` | 亮色背景正文 |-| **辅助文字** | `#94A3B8` | 副标题、描述文字 |-| **次要文字** | `#64748B` | 页脚、时间、来源 |+| **White Text** | `#FFFFFF` | Primary text on dark backgrounds |+| **Primary Text** | `#0A1628` | Body text on light backgrounds |+| **Secondary Text** | `#94A3B8` | Subtitles, descriptions |+| **Tertiary Text** | `#64748B` | Footer, timestamps, sources |-### 功能色+### Functional Colors-| 用途 | 色值 | 说明 |-| -------- | ----------- | -------------- |-| **成功** | `#22C55E` | 正向指标 |-| **警示** | `#EF4444` | 风险提示 |-| **信息** | `#3B82F6` | 一般信息 |+| Usage | Value | Description |+| ---------- | ----------- | -------------- |+| **Success** | `#22C55E` | Positive indicators |+| **Warning** | `#EF4444` | Risk alerts |+| **Info** | `#3B82F6` | General info |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `Arial, "Helvetica Neue", sans-serif`+**Font Stack**: `Arial, "Helvetica Neue", sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| ---- | ---------------- | ---- | ------- |-| H1 | 封面主标题 | 52px | Bold |-| H2 | 页面大标题 | 28px | Bold |-| H3 | 章节标题 | 42px | Bold |-| H4 | 卡片标题 | 20px | Bold |-| P | 正文内容 | 16px | Regular |-| High | 强调数据 | 36px | Bold |-| Sub | 辅助说明 | 14px | Regular |+| Level | Usage | Size | Weight |+| ----- | ---------------- | ---- | ------- |+| H1 | Cover main title | 52px | Bold |+| H2 | Page main title | 28px | Bold |+| H3 | Section title | 42px | Bold |+| H4 | Card title | 20px | Bold |+| P | Body content | 16px | Regular |+| High | Highlighted data | 36px | Bold |+| Sub | Auxiliary text | 14px | Regular |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **左侧** | x=0, w=8px | 蓝色装饰竖条 |-| **页眉** | y=0, h=60px | 页面标题、Logo |-| **内容区** | y=80, h=540px | 主要内容区域 |-| **页脚** | y=660, h=60px | 数据来源、页码 |+| Area | Position/Height | Description |+| -------------- | --------------- | -------------------------------------- |+| **Left Side** | x=0, w=8px | Blue decorative vertical bar |+| **Header** | y=0, h=60px | Page title, Logo |+| **Content Area** | y=80, h=540px | Main content area |+| **Footer** | y=660, h=60px | Data source, page number |-### 装饰设计+### Decorative Elements-- **左侧装饰条**: 蓝色 (`#0066CC`),宽度 8px,贯穿整页-- **金色分隔线**: 金色 (`#D4AF37`),宽度 2-3px,用于标题装饰-- **几何装饰**: 透明边框矩形,营造现代感+- **Left Decorative Bar**: Blue (`#0066CC`), width 8px, spanning the full page+- **Gold Divider**: Gold (`#D4AF37`), width 2-3px, used for title decoration+- **Geometric Decoration**: Transparent-bordered rectangles for a modern feel----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 深色背景 (`#0A1628`)-- 左侧蓝色装饰条-- 金色装饰线-- 主标题 + 副标题-- 右侧几何装饰-- 底部日期、作者信息+- Dark background (`#0A1628`)+- Left blue decorative bar+- Gold decorative lines+- Main title + subtitle+- Right-side geometric decoration+- Bottom date, author info-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents Page (02_toc.svg)-- 深色背景-- 双竖线分隔符 `||` 设计-- 最多支持5个章节-- 左侧装饰竖线-- 右侧几何装饰+- Dark background+- Double vertical line separator `||` design+- Supports up to 5 chapters+- Left decorative vertical line+- Right-side geometric decoration-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深色背景-- 蓝色章节编号块-- 章节标题 + 金色分隔线-- 右侧几何装饰+- Dark background+- Blue chapter number block+- Chapter title + gold divider+- Right-side geometric decoration-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 深色页眉条-- 核心观点区(灰色背景 + 金色左侧装饰)-- 灵活内容区域-- 页脚包含数据来源和页码+- White background+- Dark header bar+- Key message area (gray background + gold left decoration)+- Flexible content area+- Footer with data source and page number-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 深色背景-- 居中感谢语-- 金色分隔线-- 联系信息-- 机密标识+- Dark background+- Centered thank-you message+- Gold divider+- Contact information+- Confidential label----## 七、布局模式+## VII. Layout Patterns-| 模式 | 适用场景 |-| ------------------ | -------------------------- |-| **单栏居中** | 封面、结语、重要观点 |-| **左右分栏 (5:5)** | 对比展示 |-| **左右分栏 (4:6)** | 图文混排 |-| **上下分栏** | 流程说明 |-| **三栏卡片** | 项目列表 |-| **表格** | 数据对比 |+| Pattern | Use Cases |+| ------------------ | ------------------------------ |+| **Single Column Centered** | Cover, ending, key points |+| **Left-Right Split (5:5)** | Comparison display |+| **Left-Right Split (4:6)** | Image-text mixed layout |+| **Top-Bottom Split** | Process descriptions |+| **Three-Column Cards** | Project lists |+| **Table** | Data comparison |----## 八、间距规范+## VIII. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 卡片间距 | 24px |-| 内容块间距 | 32px |-| 卡片内边距 | 20px |-| 卡片圆角 | 4px |-| 图标与文字 | 12px |+| Element | Value |+| ------------------ | ------ |+| Card gap | 24px |+| Content block gap | 32px |+| Card padding | 20px |+| Card border radius | 4px |+| Icon-to-text gap | 12px |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (no `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency; no `rgba()`+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Use `<polygon>` triangles for arrows instead of `<marker>`-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`+- No `<g opacity="...">` (group opacity); set opacity on each child element individually+- Use overlay layers for image transparency+- Inline styles only; no external CSS or `@font-face`----## 十、占位符规范+## X. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符,常用占位符:+Templates use `{{PLACEHOLDER}}` format placeholders. Common placeholders:-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 作者 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}`| 章节标题 |-| `{{KEY_MESSAGE}}` | 核心观点 |-| `{{PAGE_NUM}}` | 页码 |-| `{{SOURCE}}` | 数据来源 |-| `{{CONFIDENTIAL}}` | 机密标识 |-| `{{LOGO}}` | Logo文字 |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Author |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Page title |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}`| Chapter title |+| `{{KEY_MESSAGE}}` | Key message |+| `{{PAGE_NUM}}` | Page number |+| `{{SOURCE}}` | Data source |+| `{{CONFIDENTIAL}}` | Confidential label |+| `{{LOGO}}` | Logo text |----## 十一、使用说明+## XI. Usage Instructions-1. 复制模板到项目目录-2. 根据内容需求选择合适的页面模板-3. 使用占位符标记需要替换的内容-4. 通过 Executor 角色生成最终 SVG+1. Copy the template to the project directory+2. Select the appropriate page template based on content needs+3. Use placeholders to mark content that needs replacement+4. Generate the final SVG through the Executor rolediff --git a/skills/ppt-master/templates/layouts/consultant_top/design_spec.md b/skills/ppt-master/templates/layouts/consultant_top/design_spec.mdindex 1bd2acbf..c345c447 100644--- a/skills/ppt-master/templates/layouts/consultant_top/design_spec.md+++ b/skills/ppt-master/templates/layouts/consultant_top/design_spec.md@@ -1,242 +1,242 @@-# 顶级咨询模板 (Top Consultant Style) - 设计规范+# Top Consultant Style Template - Design Specification-> 适用于顶级咨询公司风格的战略汇报、高管演示、投资分析等高端场景。+> Suitable for top-tier consulting firm style strategic reports, executive presentations, investment analysis, and other high-end scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |+| Property | Description || -------------- | ------------------------------------------------------ |-| **模板名称** | consultant_top(顶级咨询模板) |-| **适用场景** | 战略规划、高管汇报、投资分析、董事会演示 |-| **设计调性** | 高端、精致、权威、数据驱动 |-| **主题模式** | 深色主题(暗黑背景 + 渐变强调 + 金色点缀) |+| **Template Name** | consultant_top (Top Consultant Template) |+| **Use Cases** | Strategic planning, executive reports, investment analysis, board presentations |+| **Design Tone** | Premium, refined, authoritative, data-driven |+| **Theme Mode** | Dark theme (dark background + gradient accents + gold highlights) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 40px,上 20px,下 40px |-| **内容安全区** | x: 40-1240, y: 40-680 |+| **Page Margins** | Left/Right 40px, Top 20px, Bottom 40px |+| **Safe Area** | x: 40-1240, y: 40-680 |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || -------------- | ----------- | -------------------------------- |-| **主背景暗黑** | `#0D1117` | 封面、章节页、结束页背景 |-| **内容页白** | `#FFFFFF` | 内容页主背景 |-| **渐变起点蓝** | `#1E40AF` | 顶部渐变条起点 |-| **渐变终点紫** | `#7C3AED` | 顶部渐变条终点 |-| **金色强调** | `#D4AF37` | 分隔线、高亮装饰 |-| **紫蓝强调** | `#6366F1` | 章节编号、次级强调 |+| **Primary Dark** | `#0D1117` | Cover, chapter, ending page backgrounds |+| **Content White** | `#FFFFFF` | Content page main background |+| **Gradient Start Blue** | `#1E40AF` | Top gradient bar start point |+| **Gradient End Purple** | `#7C3AED` | Top gradient bar end point |+| **Gold Accent** | `#D4AF37` | Dividers, highlight decorations |+| **Purple-Blue Accent** | `#6366F1` | Chapter numbers, secondary accents |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **白色文字** | `#FFFFFF` | 深色背景上的主要文字 |-| **浅灰文字** | `#9CA3AF` | 描述文字、副标题 |-| **次要文字** | `#6B7280` | 页脚、时间 |-| **正文黑** | `#111827` | 亮色背景正文 |+| **White Text** | `#FFFFFF` | Primary text on dark backgrounds |+| **Light Gray Text** | `#9CA3AF` | Descriptions, subtitles |+| **Tertiary Text** | `#6B7280` | Footer, timestamps |+| **Body Black** | `#111827` | Body text on light backgrounds |-### 中性色+### Neutral Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **卡片背景** | `#1F2937` | 深色卡片背景 |-| **分割线** | `#E5E7EB` | 亮色背景分割线 |-| **边框灰** | `#374151` | 深色背景边框 |+| **Card Background** | `#1F2937` | Dark card background |+| **Divider** | `#E5E7EB` | Dividers on light backgrounds |+| **Border Gray** | `#374151` | Borders on dark backgrounds |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `Arial, "Helvetica Neue", sans-serif`+**Font Stack**: `Arial, "Helvetica Neue", sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 | 字间距 |-| ---- | ---------------- | ---- | ------- | ------- |-| H1 | 封面主标题 | 56px | Bold | 2px |-| H2 | 页面大标题 | 28px | Bold | 1px |-| H3 | 章节标题 | 48px | Bold | 2px |-| H4 | 卡片标题 | 18px | Bold | 1px |-| P | 正文内容 | 14px | Regular | - |-| High | 强调数据 | 40px | Bold | - |-| Sub | 辅助说明 | 12px | Regular | - |+| Level | Usage | Size | Weight | Letter Spacing |+| ----- | ---------------- | ---- | ------- | -------------- |+| H1 | Cover main title | 56px | Bold | 2px |+| H2 | Page main title | 28px | Bold | 1px |+| H3 | Section title | 48px | Bold | 2px |+| H4 | Card title | 18px | Bold | 1px |+| P | Body content | 14px | Regular | - |+| High | Highlighted data | 40px | Bold | - |+| Sub | Auxiliary text | 12px | Regular | - |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0, h=6px | 渐变装饰条(蓝-紫渐变) |-| **页眉** | y=20, h=60px | 核心观点/页面标题 |-| **内容区** | y=100, h=520px| 主要内容区域 |-| **页脚** | y=660, h=60px | 数据来源、机密标识、页码 |+| Area | Position/Height | Description |+| -------------- | --------------- | -------------------------------------- |+| **Top** | y=0, h=6px | Gradient decorative bar (blue-purple gradient) |+| **Header** | y=20, h=60px | Key message / page title |+| **Content Area** | y=100, h=520px | Main content area |+| **Footer** | y=660, h=60px | Data source, confidential label, page number |-### 装饰设计+### Decorative Elements-- **顶部渐变条**: 蓝紫渐变 (`#1E40AF` → `#7C3AED`),高度 4-6px-- **左侧金色线**: 金色 (`#D4AF37`),宽度 4px,用于章节页装饰-- **网格装饰**: 低透明度线条网格,营造数据/精密感+- **Top Gradient Bar**: Blue-purple gradient (`#1E40AF` → `#7C3AED`), height 4-6px+- **Left Gold Line**: Gold (`#D4AF37`), width 4px, used for chapter page decoration+- **Grid Decoration**: Low-opacity line grid for a data/precision feel----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 暗黑背景 (`#0D1117`)-- 顶部渐变装饰条-- 左侧金色竖线装饰-- 主标题 + 副标题 + 项目编号-- 右侧网格装饰-- 底部日期、机密标识、作者信息+- Dark background (`#0D1117`)+- Top gradient decorative bar+- Left gold vertical line decoration+- Main title + subtitle + project ID+- Right-side grid decoration+- Bottom date, confidential label, author info-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents Page (02_toc.svg)-- 暗黑背景-- 顶部渐变条-- 双竖线分隔符 `||` 设计(金色)-- 章节编号使用紫蓝色-- 右侧网格装饰-- 机密标识+- Dark background+- Top gradient bar+- Double vertical line separator `||` design (gold)+- Chapter numbers in purple-blue+- Right-side grid decoration+- Confidential label-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 暗黑背景-- 顶部渐变条-- 左侧金色竖线-- 大号半透明背景编号-- 章节标题 + 描述-- 右侧网格装饰+- Dark background+- Top gradient bar+- Left gold vertical line+- Large semi-transparent background number+- Chapter title + description+- Right-side grid decoration-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 顶部渐变细条-- 深色核心观点条(金色左侧装饰)-- 灵活内容区域-- 页脚:数据来源、机密标识、页码+- White background+- Top gradient thin bar+- Dark key message bar (gold left decoration)+- Flexible content area+- Footer: data source, confidential label, page number-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 暗黑背景-- 顶部渐变条-- 网格装饰背景-- 居中感谢语-- 金色分隔线-- 联系信息卡片-- 机密标识 + 版权+- Dark background+- Top gradient bar+- Grid decoration background+- Centered thank-you message+- Gold divider+- Contact info card+- Confidential label + copyright----## 七、布局模式+## VII. Layout Patterns-| 模式 | 适用场景 |-| ------------------ | -------------------------- |-| **单栏居中** | 封面、结语 |-| **左右分栏 (5:5)** | 数据对比 |-| **左右分栏 (3:7)** | 图表+文字 |-| **矩阵网格** | 多维分析 |-| **瀑布图** | 财务分析 |-| **表格** | 数据汇总 |+| Pattern | Use Cases |+| ------------------ | ------------------------------ |+| **Single Column Centered** | Cover, ending |+| **Left-Right Split (5:5)** | Data comparison |+| **Left-Right Split (3:7)** | Chart + text |+| **Matrix Grid** | Multi-dimensional analysis |+| **Waterfall Chart** | Financial analysis |+| **Table** | Data summary |----## 八、间距规范+## VIII. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 卡片间距 | 20px |-| 内容块间距 | 24px |-| 卡片内边距 | 24px |-| 卡片圆角 | 8px |-| 图标与文字 | 10px |+| Element | Value |+| ------------------ | ------ |+| Card gap | 20px |+| Content block gap | 24px |+| Card padding | 24px |+| Card border radius | 8px |+| Icon-to-text gap | 10px |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`-8. 渐变使用 `<defs>` 定义 `<linearGradient>`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (no `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency; no `rgba()`+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Use `<polygon>` triangles for arrows instead of `<marker>`+8. Define gradients using `<defs>` with `<linearGradient>`-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`+- No `<g opacity="...">` (group opacity); set opacity on each child element individually+- Use overlay layers for image transparency+- Inline styles only; no external CSS or `@font-face`----## 十、占位符规范+## X. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符,常用占位符:+Templates use `{{PLACEHOLDER}}` format placeholders. Common placeholders:-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{PROJECT_ID}}` | 项目编号 |-| `{{AUTHOR}}` | 作者 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{KEY_MESSAGE}}` | 核心观点(Exhibit)|-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}`| 章节标题 |-| `{{PAGE_NUM}}` | 页码 |-| `{{SOURCE}}` | 数据来源 |-| `{{CONTACT_NAME}}` | 联系人姓名 |-| `{{CONTACT_INFO}}` | 联系方式 |-| `{{COPYRIGHT}}` | 版权信息 |-| `{{LOGO}}` | Logo文字 |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{PROJECT_ID}}` | Project ID |+| `{{AUTHOR}}` | Author |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Page title |+| `{{KEY_MESSAGE}}` | Key message (Exhibit) |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}`| Chapter title |+| `{{PAGE_NUM}}` | Page number |+| `{{SOURCE}}` | Data source |+| `{{CONTACT_NAME}}` | Contact person name |+| `{{CONTACT_INFO}}` | Contact information |+| `{{COPYRIGHT}}` | Copyright info |+| `{{LOGO}}` | Logo text |----## 十一、特色设计元素+## XI. Signature Design Elements-### 机密标识+### Confidential Label-所有页面底部居中显示 `CONFIDENTIAL` 标识,金色文字。+All pages display a centered `CONFIDENTIAL` label at the bottom in gold text.-### Exhibit 标题条+### Exhibit Title Bar-内容页顶部使用深色背景 + 金色左侧装饰的核心观点条,类似咨询公司的 "Exhibit" 风格。+Content pages feature a dark background + gold left decoration key message bar at the top, similar to the "Exhibit" style used by consulting firms.-### 网格背景+### Grid Background-章节页和结束页使用低透明度的网格线条装饰,营造专业数据分析氛围。+Chapter and ending pages use low-opacity grid line decoration to create a professional data analysis atmosphere.----## 十二、使用说明+## XII. Usage Instructions-1. 复制模板到项目目录-2. 根据内容需求选择合适的页面模板-3. 使用占位符标记需要替换的内容-4. 确保机密标识正确显示-5. 通过 Executor 角色生成最终 SVG+1. Copy the template to the project directory+2. Select the appropriate page template based on content needs+3. Use placeholders to mark content that needs replacement+4. Ensure the confidential label displays correctly+5. Generate the final SVG through the Executor rolediff --git a/skills/ppt-master/templates/layouts/general/design_spec.md b/skills/ppt-master/templates/layouts/general/design_spec.mdindex 83aa9fa7..a47c39cc 100644--- a/skills/ppt-master/templates/layouts/general/design_spec.md+++ b/skills/ppt-master/templates/layouts/general/design_spec.md@@ -1,220 +1,220 @@-# 通用模板 (General Style) - 设计规范+# General Style Template - Design Specification-> 适用于各类通用演示场景,包括工作汇报、项目介绍、产品展示等。+> Suitable for various general presentation scenarios, including work reports, project introductions, product showcases, and more.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |+| Property | Description || -------------- | ------------------------------------------------------ |-| **模板名称** | general(通用模板) |-| **适用场景** | 工作汇报、项目介绍、产品展示、培训演示 |-| **设计调性** | 现代、清新、专业、通用 |-| **主题模式** | 混合主题(深色封面/章节页 + 浅色内容页) |+| **Template Name** | general (General Template) |+| **Use Cases** | Work reports, project introductions, product showcases, training presentations |+| **Design Tone** | Modern, fresh, professional, versatile |+| **Theme Mode** | Mixed theme (dark cover/chapter pages + light content pages) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 40px,上 10px,下 60px |-| **内容安全区** | x: 40-1240, y: 90-660 |+| **Page Margins** | Left/Right 40px, Top 10px, Bottom 60px |+| **Safe Area** | x: 40-1240, y: 90-660 |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || -------------- | ----------- | -------------------------------- |-| **深蓝主色** | `#1E3A5F` | 封面、章节页背景、标题 |-| **深蓝暗色** | `#0F1C2E` | 渐变终点 |-| **内容背景** | `#F8FAFC` | 内容页主背景 |-| **卡片白** | `#FFFFFF` | 卡片背景 |-| **紫色强调** | `#6366F1` | 章节编号、装饰圆、强调元素 |-| **青色强调** | `#22D3EE` | 辅助装饰圆 |+| **Primary Dark Blue** | `#1E3A5F` | Cover, chapter page backgrounds, titles |+| **Dark Blue Deep** | `#0F1C2E` | Gradient end point |+| **Content Background** | `#F8FAFC` | Content page main background |+| **Card White** | `#FFFFFF` | Card background |+| **Purple Accent** | `#6366F1` | Chapter numbers, decorative circles, emphasis elements |+| **Cyan Accent** | `#22D3EE` | Secondary decorative circles |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **白色文字** | `#FFFFFF` | 深色背景上的主要文字 |-| **主文字** | `#333333` | 卡片内正文 |-| **标题深蓝** | `#1E3A5F` | 亮色背景标题 |-| **辅助文字** | `#94A3B8` | 副标题、描述 |-| **次要文字** | `#64748B` | 页脚、章节标识 |+| **White Text** | `#FFFFFF` | Primary text on dark backgrounds |+| **Primary Text** | `#333333` | Body text in cards |+| **Title Dark Blue** | `#1E3A5F` | Titles on light backgrounds |+| **Secondary Text** | `#94A3B8` | Subtitles, descriptions |+| **Tertiary Text** | `#64748B` | Footer, section labels |-### 中性色+### Neutral Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **边框灰** | `#E2E8F0` | 分割线、卡片边框 |-| **浅灰背景** | `#CBD5E1` | 占位符文字 |+| **Border Gray** | `#E2E8F0` | Dividers, card borders |+| **Light Gray Background** | `#CBD5E1` | Placeholder text |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", Arial, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", Arial, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| ---- | ---------------- | ---- | ------- |-| H1 | 封面主标题 | 48px | Bold |-| H2 | 页面标题 | 24px | Bold |-| H3 | 章节标题 | 48px | Bold |-| H4 | 卡片标题 | 20px | Bold |-| P | 正文内容 | 16px | Regular |-| High | 强调数据 | 36px | Bold |-| Sub | 辅助说明 | 14px | Regular |-| XS | 页码、版权 | 12px | Regular |+| Level | Usage | Size | Weight |+| ----- | ---------------- | ---- | ------- |+| H1 | Cover main title | 48px | Bold |+| H2 | Page title | 24px | Bold |+| H3 | Section title | 48px | Bold |+| H4 | Card title | 20px | Bold |+| P | Body content | 16px | Regular |+| High | Highlighted data | 36px | Bold |+| Sub | Auxiliary text | 14px | Regular |+| XS | Page number, copyright | 12px | Regular |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **页眉** | y=0, h=70px | 白色背景 + 底部分隔线 + 页面标题 |-| **内容区** | y=90, h=550px | 主要内容区域(白色卡片) |-| **页脚** | y=660, h=60px | 白色背景 + 章节标识 + 页码 |+| Area | Position/Height | Description |+| -------------- | --------------- | -------------------------------------- |+| **Header** | y=0, h=70px | White background + bottom divider + page title |+| **Content Area** | y=90, h=550px | Main content area (white cards) |+| **Footer** | y=660, h=60px | White background + top divider + section label + page number |-### 装饰设计+### Decorative Elements-- **装饰圆**: 低透明度渐变圆形,紫色和青色-- **左侧标识竖条**: 深蓝色 (`#1E3A5F`),宽度 4-6px-- **分隔线**: 浅灰色 (`#E2E8F0`),宽度 1px+- **Decorative Circles**: Low-opacity gradient circles in purple and cyan+- **Left Indicator Bar**: Dark blue (`#1E3A5F`), width 4-6px+- **Divider Lines**: Light gray (`#E2E8F0`), width 1px----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 深色渐变背景 (`#1E3A5F` → `#0F1C2E`)-- 右上角装饰圆(紫色、青色,低透明度)-- 左侧装饰白线-- 主标题 + 副标题-- 底部半透明信息区(日期、作者)+- Dark gradient background (`#1E3A5F` → `#0F1C2E`)+- Top-right decorative circles (purple, cyan, low opacity)+- Left decorative white line+- Main title + subtitle+- Bottom semi-transparent info area (date, author)-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents Page (02_toc.svg)-- 浅色背景-- 白色页眉 + 深蓝标题-- 卡片式目录项布局-- 双竖线分隔符 `||` 设计-- 不同颜色左侧装饰条区分章节-- 装饰圆点缀+- Light background+- White header + dark blue title+- Card-style TOC item layout+- Double vertical line separator `||` design+- Different colored left bars to distinguish sections+- Decorative circle accents-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深色纯色背景 (`#1E3A5F`)-- 装饰圆(紫色、青色,低透明度)-- 大号半透明背景编号-- 居中章节标题-- 分隔线 + 章节描述+- Dark solid background (`#1E3A5F`)+- Decorative circles (purple, cyan, low opacity)+- Large semi-transparent background number+- Centered chapter title+- Divider line + chapter description-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 浅灰背景 (`#F8FAFC`)-- 白色页眉 + 底部分隔线-- 白色内容卡片(圆角 8px)-- 白色页脚 + 顶部分隔线-- 左侧深蓝竖条章节标识+- Light gray background (`#F8FAFC`)+- White header + bottom divider+- White content cards (border radius 8px)+- White footer + top divider+- Left dark blue vertical bar section indicator-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 深色渐变背景-- 装饰圆-- 居中感谢语-- 分隔线 + 口号-- 联系信息-- 底部版权+- Dark gradient background+- Decorative circles+- Centered thank-you message+- Divider line + tagline+- Contact information+- Bottom copyright----## 七、布局模式+## VII. Layout Patterns-| 模式 | 适用场景 |-| ------------------ | -------------------------- |-| **单栏居中** | 封面、结语 |-| **卡片式双列** | 目录页 |-| **左右分栏 (5:5)** | 对比展示 |-| **左右分栏 (4:6)** | 图文混排 |-| **网格卡片** | 项目列表 |-| **表格** | 数据汇总 |+| Pattern | Use Cases |+| ------------------ | ------------------------------ |+| **Single Column Centered** | Cover, ending |+| **Two-Column Cards** | Table of contents |+| **Left-Right Split (5:5)** | Comparison display |+| **Left-Right Split (4:6)** | Image-text mixed layout |+| **Grid Cards** | Project lists |+| **Table** | Data summary |----## 八、间距规范+## VIII. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 卡片间距 | 20px |-| 内容块间距 | 24px |-| 卡片内边距 | 20px |-| 卡片圆角 | 8px |-| 图标与文字 | 12px |+| Element | Value |+| ------------------ | ------ |+| Card gap | 20px |+| Content block gap | 24px |+| Card padding | 20px |+| Card border radius | 8px |+| Icon-to-text gap | 12px |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`-8. 渐变使用 `<defs>` 定义 `<linearGradient>`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (no `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency; no `rgba()`+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Use `<polygon>` triangles for arrows instead of `<marker>`+8. Define gradients using `<defs>` with `<linearGradient>`-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`+- No `<g opacity="...">` (group opacity); set opacity on each child element individually+- Use overlay layers for image transparency+- Inline styles only; no external CSS or `@font-face`----## 十、占位符规范+## X. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符,常用占位符:+Templates use `{{PLACEHOLDER}}` format placeholders. Common placeholders:-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 作者 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}`| 章节标题 |-| `{{CHAPTER_DESC}}` | 章节描述 |-| `{{SECTION_NAME}}` | 章节名称(页脚) |-| `{{PAGE_NUM}}` | 页码 |-| `{{CONTACT_INFO}}` | 联系信息 |-| `{{COPYRIGHT}}` | 版权信息 |-| `{{LOGO}}` | Logo文字 |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Author |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Page title |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}`| Chapter title |+| `{{CHAPTER_DESC}}` | Chapter description |+| `{{SECTION_NAME}}` | Section name (footer) |+| `{{PAGE_NUM}}` | Page number |+| `{{CONTACT_INFO}}` | Contact information |+| `{{COPYRIGHT}}` | Copyright info |+| `{{LOGO}}` | Logo text |----## 十一、使用说明+## XI. Usage Instructions-1. 复制模板到项目目录-2. 根据内容需求选择合适的页面模板-3. 使用占位符标记需要替换的内容-4. 通过 Executor 角色生成最终 SVG+1. Copy the template to the project directory+2. Select the appropriate page template based on content needs+3. Use placeholders to mark content that needs replacement+4. Generate the final SVG through the Executor rolediff --git a/skills/ppt-master/templates/layouts/google_style/design_spec.md b/skills/ppt-master/templates/layouts/google_style/design_spec.mdindex ce372d74..a6e97a3f 100644--- a/skills/ppt-master/templates/layouts/google_style/design_spec.md+++ b/skills/ppt-master/templates/layouts/google_style/design_spec.md@@ -1,299 +1,299 @@-# Google 风格模板 (Google Style) - 设计规范+# Google Style Template - Design Specification-> 适用于科技公司年度报告、工作汇报、技术分享、数据展示等场景。+> Suitable for tech company annual reports, work summaries, technical sharing, data presentations, and similar scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |+| Property | Description || -------------- | ---------------------------------------------------------- |-| **模板名称** | google_style(谷歌风格模板) |-| **适用场景** | 年度工作汇报、技术分享、项目成果展示、数据驱动型演示 |-| **设计调性** | 专业、现代、简洁克制、数据驱动、充足留白 |-| **主题模式** | 亮色主题(白色/浅灰背景 + Google 品牌色强调) |+| **Template Name** | google_style (Google Style Template) |+| **Use Cases** | Annual work reports, technical sharing, project showcases, data-driven presentations |+| **Design Tone** | Professional, modern, clean and restrained, data-driven, generous whitespace |+| **Theme Mode** | Light theme (white/light gray background + Google brand color accents) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上 50px,下 50px |-| **内容安全区** | x: 60-1220, y: 50-670 |+| **Page Margins** | Left/Right 60px, Top 50px, Bottom 50px |+| **Safe Area** | x: 60-1220, y: 50-670 |----## 三、配色方案+## III. Color Scheme-### Google 品牌四色+### Google Brand Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || ---------------- | ----------- | ------------------------------------ |-| **Google Blue** | `#4285F4` | 主要标题、关键数据、主按钮 |-| **Google Red** | `#EA4335` | 重要强调、警示信息 |-| **Google Yellow**| `#FBBC04` | 辅助图标、次要强调 |-| **Google Green** | `#34A853` | 成功指标、正向数据 |+| **Google Blue** | `#4285F4` | Primary titles, key data, main buttons |+| **Google Red** | `#EA4335` | Important emphasis, warning info |+| **Google Yellow**| `#FBBC04` | Auxiliary icons, secondary emphasis |+| **Google Green** | `#34A853` | Success indicators, positive data |-### 专业配色+### Professional Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ------------------------------------ |-| **深蓝色** | `#1A237E` | 标题、核心文本、深色强调 |-| **深蓝渐变起** | `#1A73E8` | 渐变标题起点 |-| **深蓝渐变止** | `#0D47A1` | 渐变标题终点 |-| **主背景白** | `#FFFFFF` | 页面主背景 |-| **浅灰背景** | `#F8F9FA` | 卡片内背景、辅助区域 |-| **边框浅灰** | `#E8EAED` | 分割线、边框、网格线 |+| **Deep Blue** | `#1A237E` | Titles, core text, dark emphasis |+| **Deep Blue Gradient Start** | `#1A73E8` | Gradient title start point |+| **Deep Blue Gradient End** | `#0D47A1` | Gradient title end point |+| **Main Background White** | `#FFFFFF` | Page main background |+| **Light Gray Background** | `#F8F9FA` | Card inner background, auxiliary areas |+| **Light Gray Border** | `#E8EAED` | Dividers, borders, grid lines |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ------------------------------------ |-| **主文字** | `#1A237E` | 标题、重点文字 |-| **正文文字** | `#5F6368` | 正文、说明文字 |-| **辅助文字** | `#9AA0A6` | 注释、页码、提示 |-| **白色文字** | `#FFFFFF` | 深色背景上的文字 |+| **Primary Text** | `#1A237E` | Titles, important text |+| **Body Text** | `#5F6368` | Body content, descriptions |+| **Secondary Text** | `#9AA0A6` | Annotations, page numbers, tips |+| **White Text** | `#FFFFFF` | Text on dark backgrounds |-### 图表配色(按顺序使用)+### Chart Colors (use in order)-| 序号 | 色值 | 备注 |-| ---- | ----------- | -------------- |-| 1 | `#4285F4` | Google Blue |-| 2 | `#34A853` | Google Green |-| 3 | `#FBBC04` | Google Yellow |-| 4 | `#EA4335` | Google Red |+| Order | Value | Notes |+| ----- | ----------- | -------------- |+| 1 | `#4285F4` | Google Blue |+| 2 | `#34A853` | Google Green |+| 3 | `#FBBC04` | Google Yellow |+| 4 | `#EA4335` | Google Red |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`+**Font Stack**: `system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`-> 使用系统 UI 字体栈确保跨平台一致性和最佳渲染效果。+> Uses system UI font stack to ensure cross-platform consistency and optimal rendering.-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |+| Level | Usage | Size | Weight || ------ | -------------------- | ------ | ----------- |-| H1 | 封面主标题 | 52px | 700 (Bold) |-| H2 | 页面大标题 | 46px | 700 (Bold) |-| H3 | 模块标题/章节标题 | 28px | 600 |-| H4 | 卡片标题/小标题 | 24px | 600 |-| P | 正文内容 | 20px | 400 |-| Data | 大号数据数字 | 56px | 700 (Bold) |-| Label | 数据标签/说明 | 16px | 500 |-| Sub | 辅助说明/页码 | 14px | 400 |+| H1 | Cover main title | 52px | 700 (Bold) |+| H2 | Page main title | 46px | 700 (Bold) |+| H3 | Module/section title | 28px | 600 |+| H4 | Card title/subtitle | 24px | 600 |+| P | Body content | 20px | 400 |+| Data | Large data numbers | 56px | 700 (Bold) |+| Label | Data labels/descriptions | 16px | 500 |+| Sub | Auxiliary text/page number | 14px | 400 |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| -------------- | --------------- | -------------------------------------- |-| **顶部装饰条** | y=0, h=6px | 四色渐变横条,贯穿整页 |-| **标题区域** | y=50, h=60px | 页面标题 + 标题下划线 |-| **内容区** | y=130, h=500px | 主要内容区域 |-| **页脚** | y=660, h=60px | 四色圆点装饰 + 可选页码 |+| Area | Position/Height | Description |+| ------------------ | --------------- | -------------------------------------- |+| **Top Decorative Bar** | y=0, h=6px | Four-color gradient bar, spanning full width |+| **Title Area** | y=50, h=60px | Page title + title underline |+| **Content Area** | y=130, h=500px | Main content area |+| **Footer** | y=660, h=60px | Four-color dot decoration + optional page number |-### 特色设计元素+### Signature Design Elements-#### 1. 四色渐变顶部条+#### 1. Four-Color Gradient Top Bar```linearGradient: #4285F4 → #EA4335 → #FBBC04 → #34A853height: 6px, width: 100%```-#### 2. 标题下划线(四色分段)+#### 2. Title Underline (Four-Color Segments)```Blue: 150px → Red: 70px → Yellow: 70px → Green: 170px-stroke-width: 4px, y: 标题下方20px+stroke-width: 4px, y: 20px below title```-#### 3. KPI 数据卡片+#### 3. KPI Data Card```-尺寸: 280×140px-圆角: 16px-边框: 3px, 使用对应品牌色-阴影: 微阴影增加层次感+Size: 280×140px+Border radius: 16px+Border: 3px, using corresponding brand color+Shadow: Subtle shadow for depth```-#### 4. 四色圆点装饰+#### 4. Four-Color Dot Decoration```-用于页脚或分隔-radius: 6-14px (变化)-间距: 30-50px+Used in footer or as dividers+radius: 6-14px (varies)+spacing: 30-50px```-#### 5. 左侧四色竖条+#### 5. Left Four-Color Vertical Bar```-封面页专用-width: 10px, 分4段, 各180px高-颜色顺序: Blue → Red → Yellow → Green+Cover page exclusive+width: 10px, 4 segments, 180px each+Color order: Blue → Red → Yellow → Green```----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 浅色渐变背景(白色到淡蓝/淡绿)-- 左侧四色竖条装饰-- 中央圆角白色内容卡片(带微阴影)-- 渐变主标题 + 副标题-- 四色分段分隔线-- 演讲者信息(姓名、职位、日期)-- 底部四色圆点装饰+- Light gradient background (white to light blue/light green)+- Left four-color vertical bar decoration+- Centered rounded white content card (with subtle shadow)+- Gradient main title + subtitle+- Four-color segmented divider line+- Speaker info (name, title, date)+- Bottom four-color dot decoration-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents Page (02_toc.svg)-- 白色背景 + 顶部四色渐变条-- 页面标题 + 蓝色下划线-- 章节列表(左侧品牌色圆点 + 编号 + 标题)-- 可选:右侧装饰图形或数据统计+- White background + top four-color gradient bar+- Page title + blue underline+- Chapter list (left brand-color dots + numbers + titles)+- Optional: right-side decorative graphics or data stats-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深色渐变背景(深蓝到更深蓝)-- 大号章节编号(渐变色或白色)-- 章节标题(白色,大字号)-- 英文副标题(白色半透明)-- 四色装饰元素+- Dark gradient background (deep blue to darker blue)+- Large chapter number (gradient or white)+- Chapter title (white, large font)+- English subtitle (white, semi-transparent)+- Four-color decorative elements-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 顶部四色渐变条-- 页面标题 + 蓝色下划线-- 灵活内容区域(支持多种布局)-- 底部四色圆点装饰+- White background+- Top four-color gradient bar+- Page title + blue underline+- Flexible content area (supports multiple layouts)+- Bottom four-color dot decoration-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 浅色渐变背景-- 中央圆角白色内容卡片-- 渐变 "Thank You!" 标题-- 四色分隔线-- 感谢列表(品牌色圆点 + 人员/事项)-- 结语 + 底部四色圆点+- Light gradient background+- Centered rounded white content card+- Gradient "Thank You!" title+- Four-color divider line+- Acknowledgment list (brand-color dots + names/items)+- Closing remarks + bottom four-color dots----## 七、布局模式+## VII. Layout Patterns-| 模式 | 适用场景 |+| Pattern | Use Cases || ---------------------- | ---------------------------------- |-| **居中卡片式** | 封面页、结束页、重要观点 |-| **左文右图** | 文字描述 + 图表/KPI区 |-| **KPI 网格 (2×2/2×3)** | 数据概览、关键指标展示 |-| **三栏卡片** | 项目列表、功能介绍 |-| **四象限** | 分类展示、SWOT分析 |-| **上下分区** | 两个相关主题并列展示 |-| **时间轴** | 发展历程、规划展示 |-| **Dashboard 风格** | 多指标数据看板 |+| **Centered Card** | Cover, ending, key points |+| **Left Text Right Image** | Text description + chart/KPI area |+| **KPI Grid (2×2/2×3)** | Data overview, key metrics display |+| **Three-Column Cards** | Project lists, feature introductions |+| **Four Quadrants** | Category display, SWOT analysis |+| **Top-Bottom Split** | Two related topics side by side |+| **Timeline** | Development history, roadmap |+| **Dashboard Style** | Multi-metric data dashboard |----## 八、间距规范+## VIII. Spacing Guidelines-| 元素 | 数值 |-| ------------------ | -------- |-| 页面边距 | 60px |-| 标题与内容间距 | 30-40px |-| 模块间距 | 60-80px |-| 卡片间距 | 20-24px |-| 卡片内边距 | 20px |-| 卡片圆角 | 16px |-| 图标与文字间距 | 15px |+| Element | Value |+| -------------------- | -------- |+| Page margins | 60px |+| Title-to-content gap | 30-40px |+| Module gap | 60-80px |+| Card gap | 20-24px |+| Card padding | 20px |+| Card border radius | 16px |+| Icon-to-text gap | 15px |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`-5. 渐变使用 `<linearGradient>` 定义在 `<defs>` 中+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (no `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency+5. Define gradients using `<linearGradient>` within `<defs>`-### 禁用元素+### Prohibited Elements-禁止使用以下 SVG 特性(PPT 不兼容):+The following SVG features are prohibited (not PPT-compatible):-- `clipPath`、`mask`-- `<style>` 标签、`class` 属性+- `clipPath`, `mask`+- `<style>` tag, `class` attribute- `foreignObject`- `textPath`-- `animate*` 动画元素+- `animate*` animation elements- `script`-- `marker`、`marker-end`-- `rgba()` 颜色格式(使用 HEX + opacity 替代)+- `marker`, `marker-end`+- `rgba()` color format (use HEX + opacity instead)-### 阴影实现+### Shadow Implementation-由于 `filter` 可能影响 PPT 兼容性,建议:-- 使用微妙的边框颜色变化模拟阴影-- 或接受 `filter` 在某些旧版 PPT 中可能会被忽略,但在新版中支持良好+Since `filter` may affect PPT compatibility:+- Use subtle border color variations to simulate shadows+- Or accept that `filter` may be ignored in older PPT versions, though it works well in newer versions----## 十、占位符规范+## X. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符:+Templates use `{{PLACEHOLDER}}` format placeholders:-| 占位符 | 说明 |-| -------------------- | ------------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题/部门信息 |-| `{{SPEAKER_NAME}}` | 演讲者姓名 |-| `{{SPEAKER_TITLE}}` | 演讲者职位 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}` | 章节标题 |-| `{{CHAPTER_TITLE_EN}}`| 章节英文副标题 |-| `{{PAGE_NUM}}` | 页码 |-| `{{CONTENT_AREA}}` | 内容区域占位 |+| Placeholder | Description |+| ---------------------- | ------------------------ |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle/department info |+| `{{SPEAKER_NAME}}` | Speaker name |+| `{{SPEAKER_TITLE}}` | Speaker title/position |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Page title |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}` | Chapter title |+| `{{CHAPTER_TITLE_EN}}` | Chapter English subtitle |+| `{{PAGE_NUM}}` | Page number |+| `{{CONTENT_AREA}}` | Content area placeholder |----## 十一、示例配色应用+## XI. Color Application Examples-### KPI 卡片配色规则+### KPI Card Color Rules-| 卡片顺序 | 边框色 | 数字色 | 适用内容 |-| -------- | ---------- | ---------- | -------------- |-| 第1个 | `#4285F4` | `#4285F4` | 核心项目/主指标|-| 第2个 | `#34A853` | `#34A853` | 成本/效率指标 |-| 第3个 | `#EA4335` | `#EA4335` | 可靠性/风险 |-| 第4个 | `#FBBC04` | `#FBBC04` | 性能/增长 |+| Card Order | Border Color | Number Color | Applicable Content |+| ---------- | ------------ | ------------ | ------------------ |+| 1st | `#4285F4` | `#4285F4` | Core projects/main metrics |+| 2nd | `#34A853` | `#34A853` | Cost/efficiency metrics |+| 3rd | `#EA4335` | `#EA4335` | Reliability/risk |+| 4th | `#FBBC04` | `#FBBC04` | Performance/growth |-### 列表项配色+### List Item Colors-- 使用品牌四色循环作为列表圆点颜色-- 保持文字为统一的深蓝色 `#1A237E`+- Use the four brand colors in rotation for list bullet colors+- Keep text in a consistent deep blue `#1A237E`----## 十二、使用说明+## XII. Usage Instructions-1. 复制模板到项目目录 `templates/`-2. 根据内容需求选择合适的页面类型-3. 使用占位符标记需要替换的内容-4. 配色严格遵循 Google 品牌四色规范-5. 保持充足留白,突出核心信息-6. 数据驱动:用大号数字 + 小号标签展示 KPI+1. Copy the template to the project directory `templates/`+2. Select the appropriate page type based on content needs+3. Use placeholders to mark content that needs replacement+4. Strictly follow the Google brand four-color scheme+5. Maintain generous whitespace to highlight key information+6. Data-driven: use large numbers + small labels to display KPIs----_本规范基于 Google Material Design 理念,适配 PPT Master 项目要求_+_This specification is based on Google Material Design principles, adapted for PPT Master project requirements_diff --git a/skills/ppt-master/templates/layouts/government_blue/design_spec.md b/skills/ppt-master/templates/layouts/government_blue/design_spec.mdindex 70d8c86a..79628f58 100644--- a/skills/ppt-master/templates/layouts/government_blue/design_spec.md+++ b/skills/ppt-master/templates/layouts/government_blue/design_spec.md@@ -1,231 +1,231 @@-# 政府蓝模板 (Government Blue Style) - 设计规范+# Government Blue Style Template - Design Specification-> 适用于各级政府机构政务汇报、重点项目推介、规划方案汇报、招商引资等场景。+> Suitable for government agency briefings, key project presentations, planning proposals, investment promotion, and similar scenarios across all levels of government.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |+| Property | Description || -------------- | ------------------------------------------------------------ |-| **模板名称** | government_blue(政府蓝模板) |-| **适用场景** | 重点项目汇报、十四五规划、工作总结、招商引资、政策解读 |-| **设计调性** | 大气、科技感、现代化、专业政务风格 |-| **主题模式** | 亮色主题(白色背景 + 蓝色渐变装饰) |+| **Template Name** | government_blue (Government Blue Template) |+| **Use Cases** | Key project briefings, Five-Year Plan presentations, work summaries, investment promotion, policy interpretation |+| **Design Tone** | Grand, tech-forward, modern, professional government style |+| **Theme Mode** | Light theme (white background + blue gradient accents) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上 80px,下 40px |-| **内容安全区** | x: 60-1220, y: 80-680 |+| **Page Margins** | Left/Right 60px, Top 80px, Bottom 40px |+| **Safe Area** | x: 60-1220, y: 80-680 |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || -------------- | ----------- | ---------------------------------- |-| **主导深蓝** | `#0050B3` | 标题、核心边框、序号块 |-| **科技亮蓝** | `#00B4D8` | 装饰元素、强调色、渐变亮部 |-| **深海蓝** | `#003366` | 章节页背景、渐变暗部 |-| **辅助浅蓝** | `#E6F4FF` | 背景底色、弱化区块 |-| **天际蓝** | `#90E0EF` | 点缀装饰、次级强调 |+| **Primary Deep Blue** | `#0050B3` | Titles, key borders, section number blocks |+| **Tech Bright Blue** | `#00B4D8` | Decorative elements, accent color, gradient highlights |+| **Ocean Blue** | `#003366` | Chapter page backgrounds, gradient dark end |+| **Auxiliary Light Blue** | `#E6F4FF` | Background base, subdued blocks |+| **Sky Blue** | `#90E0EF` | Decorative accents, secondary emphasis |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **主文字** | `#1A1A1A` | 正文、标题 |-| **白色文字** | `#FFFFFF` | 深色色块上的文字 |-| **辅助文字** | `#4A5568` | 置灰章节、辅助说明 |-| **浅色辅助** | `#718096` | 注释、页码、提示 |+| **Primary Text** | `#1A1A1A` | Body text, titles |+| **White Text** | `#FFFFFF` | Text on dark backgrounds |+| **Secondary Text** | `#4A5568` | Dimmed sections, supplementary notes |+| **Light Auxiliary** | `#718096` | Annotations, page numbers, hints |-### 功能色+### Functional Colors-| 用途 | 色值 | 说明 |+| Usage | Value | Description || -------- | ----------- | -------------- |-| **成功** | `#38A169` | 完成/达标 |-| **警示** | `#E53E3E` | 注意/预警 |-| **信息** | `#3182CE` | 一般说明 |+| **Success** | `#38A169` | Completed/On target |+| **Warning** | `#E53E3E` | Attention/Alert |+| **Info** | `#3182CE` | General information |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", "SimHei", "Source Han Sans SC", Arial, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", "SimHei", "Source Han Sans SC", Arial, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| ---- | ---------------- | ---- | ------- |-| H1 | 封面主标题 | 52px | Bold |-| H2 | 页面大标题 | 28px | Bold |-| H3 | 模块标题/小标题 | 24px | Bold |-| P | 正文内容 | 18px | Regular |-| High | 强调数据 | 36px | Bold |-| Sub | 辅助说明 | 14px | Regular |+| Level | Usage | Size | Weight |+| ----- | ------------------ | ---- | ------- |+| H1 | Cover main title | 52px | Bold |+| H2 | Page heading | 28px | Bold |+| H3 | Section title/Subtitle | 24px | Bold |+| P | Body content | 18px | Regular |+| High | Highlighted data | 36px | Bold |+| Sub | Supplementary text | 14px | Regular |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0, h=6px | 蓝色渐变横条(亮蓝→深蓝),贯穿整页 |-| **标题栏** | y=30, h=50px | 章节序号块 + 标题文字 + 右上角徽标 |-| **内容区** | y=100, h=560px | 主要内容区域 |-| **页脚** | y=680, h=40px | 页码、单位名称、底部装饰线 |+| Area | Position/Height | Description |+| ---------- | --------------- | -------------------------------------- |+| **Top** | y=0, h=6px | Blue gradient bar (bright blue → deep blue), full width |+| **Title Bar** | y=30, h=50px | Section number block + title text + top-right logo |+| **Content Area** | y=100, h=560px | Main content area |+| **Footer** | y=680, h=40px | Page number, organization name, bottom decoration line |-### 导航栏设计+### Navigation Bar Design-- **顶部装饰线**: 蓝色渐变(`#00B4D8` → `#0050B3`),高度 6px,贯穿整页-- **底部装饰线**: 深蓝色 (`#0050B3`),高度 4px,y=716-- **标题栏** (y=30):- - 章节序号块: 深蓝色正方形 (50×50px),白色数字居中- - 标题文字: 距序号块 20px,28px 字号,`#1A1A1A`- - 右上角徽标: 固定于 x=1107,尺寸 113×50px+- **Top Decoration Line**: Blue gradient (`#00B4D8` → `#0050B3`), height 6px, full width+- **Bottom Decoration Line**: Deep blue (`#0050B3`), height 4px, y=716+- **Title Bar** (y=30):+ - Section number block: Deep blue square (50×50px), white number centered+ - Title text: 20px from number block, 28px font size, `#1A1A1A`+ - Top-right logo: Fixed at x=1107, dimensions 113×50px----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 深蓝渐变背景 + 科技网格纹理-- 左侧亮蓝装饰条-- 主标题 + 副标题(白色)-- 汇报人/单位信息-- 底部日期区域-- 几何装饰圆形+- Deep blue gradient background + tech grid texture+- Left-side bright blue accent bar+- Main title + subtitle (white)+- Presenter/Organization info+- Bottom date area+- Geometric decorative circles-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- 浅蓝渐变背景-- 左侧装饰梯形 + 渐变竖条-- 最多支持5个章节-- 圆形编号 + 连接线设计-- 悬浮卡片效果(使用纯色模拟)+- Light blue gradient background+- Left-side decorative trapezoid + gradient vertical bar+- Supports up to 5 chapters+- Circular numbering + connector line design+- Floating card effect (simulated with solid colors)-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深蓝色渐变背景-- 径向光晕装饰-- 大号章节编号(半透明 + 描边效果)-- 章节标题 + 英文副标题-- 亮蓝装饰条+- Deep blue gradient background+- Radial glow decoration+- Large chapter number (semi-transparent + stroke effect)+- Chapter title + English subtitle+- Bright blue accent bar-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 浅色渐变背景-- 渐变序号块-- 虚线分隔线-- 灵活内容区域-- 支持多种布局模式+- Light gradient background+- Gradient number block+- Dashed divider lines+- Flexible content area+- Supports multiple layout modes-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 深蓝渐变背景-- 波浪曲线装饰-- 居中感谢语(中英文)-- 亮蓝分隔线-- 联系信息+- Deep blue gradient background+- Wave curve decoration+- Centered thank-you message (Chinese and English)+- Bright blue divider line+- Contact information----## 七、布局模式+## VII. Layout Modes-| 模式 | 适用场景 |-| ------------------ | -------------------------- |-| **单栏居中** | 封面、结语、重要观点 |-| **左右分栏 (5:5)** | 对比展示 |-| **左右分栏 (4:6)** | 图文混排 |-| **上下分栏** | 流程说明、政策列表 |-| **三栏卡片** | 项目列表、数据展示 |-| **矩阵网格** | 分类展示 |-| **表格** | 数据对比、规范列表 |+| Mode | Use Cases |+| ------------------ | ------------------------------ |+| **Single Column Centered** | Cover, closing, key points |+| **Two Columns (5:5)** | Comparative display |+| **Two Columns (4:6)** | Image-text mixed layout |+| **Top-Bottom Split** | Process descriptions, policy lists |+| **Three-Column Cards** | Project lists, data display |+| **Matrix Grid** | Category display |+| **Table** | Data comparison, specification lists |----## 八、间距规范+## VIII. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 卡片间距 | 24px |-| 内容块间距 | 32px |-| 卡片内边距 | 24px |-| 卡片圆角 | 8px |-| 图标与文字 | 12px |+| Element | Value |+| ---------------- | ------ |+| Card spacing | 24px |+| Content block spacing | 32px |+| Card padding | 24px |+| Card border radius | 8px |+| Icon-to-text gap | 12px |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (no `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency; `rgba()` is prohibited+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Use `<polygon>` triangles instead of `<marker>` for arrows-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`+- No `<g opacity="...">` (group opacity); set opacity on each child element individually+- Use overlay layers instead of image opacity+- Use inline styles only; external CSS and `@font-face` are prohibited----## 十、占位符规范+## X. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符,常用占位符:+Templates use `{{PLACEHOLDER}}` format placeholders. Common placeholders:-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 单位名称(中文) |-| `{{AUTHOR_EN}}` | 单位名称(英文) |-| `{{PRESENTER}}` | 汇报人 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{PAGE_NUM}}` | 页码 |-| `{{DATE}}` | 日期 |-| `{{ORGANIZATION}}` | 单位全称 |-| `{{ORG_SHORT}}` | 单位简称 |-| `{{CONTACT_INFO}}` | 联系信息 |-| `{{LOGO_HEADER}}` | 页眉徽标文件名 |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Organization name (Chinese) |+| `{{AUTHOR_EN}}` | Organization name (English) |+| `{{PRESENTER}}` | Presenter |+| `{{PAGE_TITLE}}` | Page title |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{PAGE_NUM}}` | Page number |+| `{{DATE}}` | Date |+| `{{ORGANIZATION}}` | Full organization name |+| `{{ORG_SHORT}}` | Abbreviated organization name |+| `{{CONTACT_INFO}}` | Contact information |+| `{{LOGO_HEADER}}` | Header logo filename |----## 十一、使用说明+## XI. Usage Instructions-1. 复制模板到项目目录-2. 替换 images 目录中的徽标文件(如有)-3. 根据内容需求选择合适的页面模板-4. 使用占位符标记需要替换的内容-5. 通过 Executor 角色生成最终 SVG+1. Copy the template to the project directory+2. Replace logo files in the images directory (if applicable)+3. Select the appropriate page template based on content requirements+4. Mark content to be replaced using placeholders+5. Generate the final SVG through the Executor role----## 十二、设计亮点+## XII. Design Highlights-- **科技感渐变**: 亮蓝到深蓝的渐变体现现代科技风格-- **几何装饰元素**: 圆形、网格增添科技氛围-- **波浪曲线**: 结束页动感装饰-- **悬浮卡片效果**: 目录页现代化设计-- **清晰视觉层级**: 确保信息传达效率+- **Tech Gradient**: Bright-to-deep blue gradient reflects a modern tech aesthetic+- **Geometric Decorative Elements**: Circles and grids add a tech atmosphere+- **Wave Curves**: Dynamic decoration on the ending page+- **Floating Card Effect**: Modern design for the table of contents page+- **Clear Visual Hierarchy**: Ensures efficient information deliverydiff --git a/skills/ppt-master/templates/layouts/government_red/design_spec.md b/skills/ppt-master/templates/layouts/government_red/design_spec.mdindex 969caae5..258afb9e 100644--- a/skills/ppt-master/templates/layouts/government_red/design_spec.md+++ b/skills/ppt-master/templates/layouts/government_red/design_spec.md@@ -1,223 +1,223 @@-# 政府红模板 (Government Red Style) - 设计规范+# Government Red Style Template - Design Specification-> 适用于各级政府机构政务汇报、政策宣讲、工作总结、项目推介等场景。+> Suitable for government agency briefings, policy presentations, work summaries, project introductions, and similar scenarios across all levels of government.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |+| Property | Description || -------------- | ------------------------------------------------------------ |-| **模板名称** | government_red(政府红模板) |-| **适用场景** | 政务汇报、政策解读、工作总结、项目推介、招商引资 |-| **设计调性** | 权威、庄重、专业、现代化政务风格 |-| **主题模式** | 亮色主题(白色背景 + 政府红/蓝强调色) |+| **Template Name** | government_red (Government Red Template) |+| **Use Cases** | Government briefings, policy interpretation, work summaries, project introductions, investment promotion |+| **Design Tone** | Authoritative, dignified, professional, modern government style |+| **Theme Mode** | Light theme (white background + government red/blue accents) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上 80px,下 40px |-| **内容安全区** | x: 60-1220, y: 80-680 |+| **Page Margins** | Left/Right 60px, Top 80px, Bottom 40px |+| **Safe Area** | x: 60-1220, y: 80-680 |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || -------------- | ----------- | ---------------------------------- |-| **政府红** | `#8B0000` | 主色调,标题栏、强调色块、装饰条 |-| **政府蓝** | `#003366` | 辅助强调色,章节页背景 |-| **背景白** | `#FFFFFF` | 页面主背景 |-| **辅助浅灰** | `#F5F7FA` | 非重点内容背景块 |-| **边框灰** | `#E4E7EB` | 分割线、边框 |-| **金色点缀** | `#DAA520` | 点缀装饰、重要数据高亮 |+| **Government Red** | `#8B0000` | Primary color, title bar, accent blocks, decoration bars |+| **Government Blue** | `#003366` | Secondary accent, chapter page backgrounds |+| **Background White** | `#FFFFFF` | Main page background |+| **Auxiliary Light Gray** | `#F5F7FA` | Non-critical content background blocks |+| **Border Gray** | `#E4E7EB` | Dividers, borders |+| **Gold Accent** | `#DAA520` | Decorative accents, important data highlights |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **主文字** | `#1A1A1A` | 正文、标题 |-| **白色文字** | `#FFFFFF` | 深色色块上的文字 |-| **辅助文字** | `#4A5568` | 置灰章节、辅助说明 |-| **浅色辅助** | `#718096` | 注释、页码、提示 |+| **Primary Text** | `#1A1A1A` | Body text, titles |+| **White Text** | `#FFFFFF` | Text on dark backgrounds |+| **Secondary Text** | `#4A5568` | Dimmed sections, supplementary notes |+| **Light Auxiliary** | `#718096` | Annotations, page numbers, hints |-### 功能色+### Functional Colors-| 用途 | 色值 | 说明 |+| Usage | Value | Description || -------- | ----------- | -------------- |-| **成功** | `#38A169` | 完成/达标 |-| **警示** | `#E53E3E` | 注意/预警 |-| **信息** | `#3182CE` | 一般说明 |+| **Success** | `#38A169` | Completed/On target |+| **Warning** | `#E53E3E` | Attention/Alert |+| **Info** | `#3182CE` | General information |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", "SimHei", "Source Han Sans SC", Arial, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", "SimHei", "Source Han Sans SC", Arial, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| ---- | ---------------- | ---- | ------- |-| H1 | 封面主标题 | 48px | Bold |-| H2 | 页面大标题 | 28px | Bold |-| H3 | 模块标题/小标题 | 24px | Bold |-| P | 正文内容 | 18px | Regular |-| High | 强调数据 | 36px | Bold |-| Sub | 辅助说明 | 14px | Regular |+| Level | Usage | Size | Weight |+| ----- | ------------------ | ---- | ------- |+| H1 | Cover main title | 48px | Bold |+| H2 | Page heading | 28px | Bold |+| H3 | Section title/Subtitle | 24px | Bold |+| P | Body content | 18px | Regular |+| High | Highlighted data | 36px | Bold |+| Sub | Supplementary text | 14px | Regular |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0, h=6px | 双色渐变横条(红+蓝),贯穿整页 |-| **标题栏** | y=30, h=50px | 章节序号块 + 标题文字 + 右上角徽标 |-| **内容区** | y=100, h=560px | 主要内容区域 |-| **页脚** | y=680, h=40px | 页码、单位名称、底部装饰线 |+| Area | Position/Height | Description |+| ---------- | --------------- | -------------------------------------- |+| **Top** | y=0, h=6px | Dual-color gradient bar (red + blue), full width |+| **Title Bar** | y=30, h=50px | Section number block + title text + top-right logo |+| **Content Area** | y=100, h=560px | Main content area |+| **Footer** | y=680, h=40px | Page number, organization name, bottom decoration line |-### 导航栏设计+### Navigation Bar Design-- **顶部装饰线**: 双色渐变(`#8B0000` → `#003366`),高度 6px,贯穿整页-- **底部装饰线**: 政府红 (`#8B0000`),高度 4px,y=716-- **标题栏** (y=30):- - 章节序号块: 政府红正方形 (50×50px),白色数字居中- - 标题文字: 距序号块 20px,28px 字号,`#1A1A1A`- - 右上角徽标: 固定于 x=1107,尺寸 113×50px+- **Top Decoration Line**: Dual-color gradient (`#8B0000` → `#003366`), height 6px, full width+- **Bottom Decoration Line**: Government red (`#8B0000`), height 4px, y=716+- **Title Bar** (y=30):+ - Section number block: Government red square (50×50px), white number centered+ - Title text: 20px from number block, 28px font size, `#1A1A1A`+ - Top-right logo: Fixed at x=1107, dimensions 113×50px----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 深色渐变背景(政府蓝为主)-- 顶部金色装饰线-- 主标题 + 副标题(居中白色)-- 单位名称:重庆两江新区发展和改革委员会-- 底部日期区域+- Dark gradient background (primarily government blue)+- Top gold decoration line+- Main title + subtitle (centered, white)+- Organization name+- Bottom date area-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- 白色背景 + 左侧红色竖条装饰-- 最多支持5个章节-- 编号采用中国红方块 + 白色数字-- 右侧可选数据展示区+- White background + left-side red vertical bar decoration+- Supports up to 5 chapters+- Numbering uses red square blocks + white numbers+- Optional data display area on the right-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深蓝色渐变背景-- 大号章节编号(半透明装饰)-- 章节标题 + 英文副标题-- 几何装饰元素+- Deep blue gradient background+- Large chapter number (semi-transparent decoration)+- Chapter title + English subtitle+- Geometric decorative elements-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 标准导航栏(红色序号块)-- 灵活内容区域-- 支持多种布局模式+- White background+- Standard navigation bar (red number block)+- Flexible content area+- Supports multiple layout modes-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 深蓝色背景-- 居中感谢语-- 单位全称-- 联系方式/地址信息+- Deep blue background+- Centered thank-you message+- Full organization name+- Contact/Address information----## 七、布局模式+## VII. Layout Modes-| 模式 | 适用场景 |-| ------------------ | -------------------------- |-| **单栏居中** | 封面、结语、重要观点 |-| **左右分栏 (5:5)** | 对比展示 |-| **左右分栏 (4:6)** | 图文混排 |-| **上下分栏** | 流程说明、政策列表 |-| **三栏卡片** | 项目列表、数据展示 |-| **矩阵网格** | 分类展示 |-| **表格** | 数据对比、规范列表 |+| Mode | Use Cases |+| ------------------ | ------------------------------ |+| **Single Column Centered** | Cover, closing, key points |+| **Two Columns (5:5)** | Comparative display |+| **Two Columns (4:6)** | Image-text mixed layout |+| **Top-Bottom Split** | Process descriptions, policy lists |+| **Three-Column Cards** | Project lists, data display |+| **Matrix Grid** | Category display |+| **Table** | Data comparison, specification lists |----## 八、间距规范+## VIII. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 卡片间距 | 24px |-| 内容块间距 | 32px |-| 卡片内边距 | 24px |-| 卡片圆角 | 8px |-| 图标与文字 | 12px |+| Element | Value |+| ---------------- | ------ |+| Card spacing | 24px |+| Content block spacing | 32px |+| Card padding | 24px |+| Card border radius | 8px |+| Icon-to-text gap | 12px |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (no `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency; `rgba()` is prohibited+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Use `<polygon>` triangles instead of `<marker>` for arrows-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`+- No `<g opacity="...">` (group opacity); set opacity on each child element individually+- Use overlay layers instead of image opacity+- Use inline styles only; external CSS and `@font-face` are prohibited----## 十、占位符规范+## X. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符,常用占位符:+Templates use `{{PLACEHOLDER}}` format placeholders. Common placeholders:-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 单位名称(中文) |-| `{{AUTHOR_EN}}` | 单位名称(英文) |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{PAGE_NUM}}` | 页码 |-| `{{DATE}}` | 日期 |-| `{{LOGO_HEADER}}` | 页眉徽标文件名 |-| `{{COVER_BG_IMAGE}}`| 封面背景图文件名 |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Organization name (Chinese) |+| `{{AUTHOR_EN}}` | Organization name (English) |+| `{{PAGE_TITLE}}` | Page title |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{PAGE_NUM}}` | Page number |+| `{{DATE}}` | Date |+| `{{LOGO_HEADER}}` | Header logo filename |+| `{{COVER_BG_IMAGE}}`| Cover background image filename |----## 十一、使用说明+## XI. Usage Instructions-1. 复制模板到项目目录-2. 替换 images 目录中的徽标文件(如有)-3. 根据内容需求选择合适的页面模板-4. 使用占位符标记需要替换的内容-5. 通过 Executor 角色生成最终 SVG+1. Copy the template to the project directory+2. Replace logo files in the images directory (if applicable)+3. Select the appropriate page template based on content requirements+4. Mark content to be replaced using placeholders+5. Generate the final SVG through the Executor role----## 十二、设计亮点+## XII. Design Highlights-- **双色渐变顶部装饰**: 红蓝渐变体现政务风格-- **金色点缀元素**: 增添庄重感-- **几何装饰图案**: 现代化政务风格-- **清晰的视觉层级**: 确保信息传达效率+- **Dual-Color Gradient Top Decoration**: Red-blue gradient reflects a government style+- **Gold Accent Elements**: Adds a sense of dignity+- **Geometric Decorative Patterns**: Modern government aesthetic+- **Clear Visual Hierarchy**: Ensures efficient information deliverydiff --git a/skills/ppt-master/templates/layouts/layouts_index.json b/skills/ppt-master/templates/layouts/layouts_index.jsonindex 80a838b8..689f5eaa 100644--- a/skills/ppt-master/templates/layouts/layouts_index.json+++ b/skills/ppt-master/templates/layouts/layouts_index.json@@ -17,7 +17,7 @@},"categories": {"brand": {- "label": "品牌风格模板",+ "label": "Brand Style Templates","layouts": ["google_style","mckinsey",@@ -31,7 +31,7 @@]},"general": {- "label": "通用风格模板",+ "label": "General Style Templates","layouts": ["consultant","consultant_top",@@ -41,7 +41,7 @@]},"scenario": {- "label": "场景专用模板",+ "label": "Scenario-Specific Templates","layouts": ["academic_defense","psychology_attachment",@@ -50,7 +50,7 @@]},"government": {- "label": "政企风格模板",+ "label": "Government/Enterprise Templates","layouts": ["government_red","government_blue",@@ -58,7 +58,7 @@]},"special": {- "label": "特殊风格模板",+ "label": "Special Style Templates","layouts": ["pixel_retro"]@@ -124,17 +124,17 @@"layouts": {"academic_defense": {"dir": "academic_defense",- "label": "学术答辩模板",+ "label": "Academic Defense Template","category": "scenario",- "summary": "适用于学术答辩、研究汇报与课题申请的规范型模板",+ "summary": "A standard template for academic defenses, research presentations, and project proposals","useCases": [- "毕业答辩",- "学术汇报",- "研究进展报告",- "课题申请"+ "Graduation defense",+ "Academic presentation",+ "Research progress report",+ "Project proposal"],- "tone": "专业、严谨、科研感、清晰层次",- "themeMode": "亮色主题(白色背景 + 深蓝标题条)",+ "tone": "Professional, rigorous, research-oriented, clear hierarchy",+ "themeMode": "Light theme (white background + dark blue title bar)","pageTypes": ["cover","toc",@@ -144,26 +144,26 @@],"assets": [],"keywords": [- "学术",- "答辩",- "科研",- "规范"+ "Academic",+ "Defense",+ "Research",+ "Standard"]},"ai_ops": {"dir": "ai_ops",- "label": "企业数智化模板",+ "label": "Enterprise Digital Intelligence Template","category": "government",- "summary": "适用于运营商 AI 运维架构、IT 系统总体视图、数字化转型方案等高信息密度场景",+ "summary": "For high-density scenarios such as telecom AI operations architecture, IT system overview, and digital transformation plans","useCases": [- "运营商 AI 运维架构",- "IT 系统总体视图",- "数字化转型方案",- "智能化建设汇报",- "企业技术规划"- ],- "tone": "信息密集、结构化、模块分区、运营商政企风格",- "themeMode": "亮色主题(白色背景 + 红蓝双色点缀 + 暖灰面板)",+ "Telecom AI operations architecture",+ "IT system overview",+ "Digital transformation plan",+ "Smart infrastructure report",+ "Enterprise technology roadmap"+ ],+ "tone": "Information-dense, structured, modular layout, telecom/government-enterprise style",+ "themeMode": "Light theme (white background + red/blue accents + warm gray panels)","pageTypes": ["cover","toc",@@ -175,26 +175,26 @@"reference_style.svg"],"keywords": [- "运营商",- "AI运维",- "数智化",- "高密度",- "架构视图"+ "Telecom",+ "AI operations",+ "Digital intelligence",+ "High density",+ "Architecture view"]},"anthropic": {"dir": "anthropic",- "label": "Anthropic 风格模板",+ "label": "Anthropic Style Template","category": "brand",- "summary": "适用于 AI / LLM 技术分享与产品发布的科技感模板",+ "summary": "A tech-oriented template for AI/LLM knowledge sharing and product launches","useCases": [- "AI 技术分享",- "开发者大会",- "技术培训",- "产品发布"+ "AI technology sharing",+ "Developer conference",+ "Technical training",+ "Product launch"],- "tone": "科技感、专业、现代、结论先行",- "themeMode": "混合主题(深色封面/章节 + 亮色内容页)",+ "tone": "Tech-forward, professional, modern, conclusion-first",+ "themeMode": "Hybrid theme (dark cover/chapter + light content pages)","pageTypes": ["cover","toc",@@ -206,23 +206,23 @@"keywords": ["AI","LLM",- "开发者",- "科技"+ "Developer",+ "Technology"]},"consultant": {"dir": "consultant",- "label": "咨询顾问模板",+ "label": "Consultant Template","category": "general",- "summary": "适用于商业咨询、战略分析和项目汇报的专业模板",+ "summary": "A professional template for business consulting, strategic analysis, and project reports","useCases": [- "商业咨询",- "战略分析",- "项目汇报",- "企业培训"+ "Business consulting",+ "Strategic analysis",+ "Project report",+ "Corporate training"],- "tone": "专业、简约、商务、现代",- "themeMode": "深色主题(深蓝背景 + 蓝色强调色 + 金色点缀)",+ "tone": "Professional, minimalist, business, modern",+ "themeMode": "Dark theme (dark blue background + blue accent + gold highlights)","pageTypes": ["cover","toc",@@ -232,25 +232,25 @@],"assets": [],"keywords": [- "咨询",- "商务",- "战略",- "汇报"+ "Consulting",+ "Business",+ "Strategy",+ "Report"]},"consultant_top": {"dir": "consultant_top",- "label": "顶级咨询模板",+ "label": "Top-Tier Consulting Template","category": "general",- "summary": "适用于董事会和高管级战略汇报的 MBB 风格模板",+ "summary": "An MBB-style template for board-level and executive strategic presentations","useCases": [- "战略规划",- "高管汇报",- "投资分析",- "董事会演示"+ "Strategic planning",+ "Executive presentation",+ "Investment analysis",+ "Board presentation"],- "tone": "高端、精致、权威、数据驱动",- "themeMode": "深色主题(暗黑背景 + 渐变强调 + 金色点缀)",+ "tone": "Premium, refined, authoritative, data-driven",+ "themeMode": "Dark theme (dark background + gradient accent + gold highlights)","pageTypes": ["cover","toc",@@ -261,24 +261,24 @@"assets": [],"keywords": ["MBB",- "董事会",- "高管",- "战略"+ "Board",+ "Executive",+ "Strategy"]},"general": {"dir": "general",- "label": "通用模板",+ "label": "General Template","category": "general",- "summary": "适用于多数工作汇报和项目介绍的通用模板",+ "summary": "A versatile template suitable for most work reports and project introductions","useCases": [- "工作汇报",- "项目介绍",- "产品展示",- "培训演示"+ "Work report",+ "Project introduction",+ "Product showcase",+ "Training presentation"],- "tone": "现代、清新、专业、通用",- "themeMode": "混合主题(深色封面/章节页 + 浅色内容页)",+ "tone": "Modern, fresh, professional, versatile",+ "themeMode": "Hybrid theme (dark cover/chapter pages + light content pages)","pageTypes": ["cover","toc",@@ -288,25 +288,25 @@],"assets": [],"keywords": [- "通用",- "商业演示",- "工作汇报",- "项目介绍"+ "General",+ "Business presentation",+ "Work report",+ "Project introduction"]},"google_style": {"dir": "google_style",- "label": "Google 风格模板",+ "label": "Google Style Template","category": "brand",- "summary": "适用于年度汇报和技术分享的 Google 品牌风格模板",+ "summary": "A Google-branded template for annual reports and technical sharing","useCases": [- "年度工作汇报",- "技术分享",- "项目成果展示",- "数据驱动型演示"+ "Annual work report",+ "Technical sharing",+ "Project showcase",+ "Data-driven presentation"],- "tone": "专业、现代、简洁克制、数据驱动、充足留白",- "themeMode": "亮色主题(白色/浅灰背景 + Google 品牌色强调)",+ "tone": "Professional, modern, clean and restrained, data-driven, ample whitespace",+ "themeMode": "Light theme (white/light gray background + Google brand color accents)","pageTypes": ["cover","toc",@@ -317,25 +317,25 @@"assets": [],"keywords": ["Google",- "品牌风格",- "技术分享",- "年度报告"+ "Brand style",+ "Technical sharing",+ "Annual report"]},"government_blue": {"dir": "government_blue",- "label": "政府蓝模板",+ "label": "Government Blue Template","category": "government",- "summary": "适用于智慧政务与数字化转型汇报的蓝色政务模板",+ "summary": "A blue government-themed template for smart governance and digital transformation reports","useCases": [- "重点项目汇报",- "十四五规划",- "工作总结",- "招商引资",- "政策解读"- ],- "tone": "大气、科技感、现代化、专业政务风格",- "themeMode": "亮色主题(白色背景 + 蓝色渐变装饰)",+ "Key project report",+ "Five-year plan",+ "Work summary",+ "Investment promotion",+ "Policy briefing"+ ],+ "tone": "Grand, tech-forward, modernized, professional government style",+ "themeMode": "Light theme (white background + blue gradient decorations)","pageTypes": ["cover","toc",@@ -345,26 +345,26 @@],"assets": [],"keywords": [- "政务",- "政府蓝",- "智慧城市",- "数字化"+ "Government affairs",+ "Government blue",+ "Smart city",+ "Digitalization"]},"government_red": {"dir": "government_red",- "label": "政府红模板",+ "label": "Government Red Template","category": "government",- "summary": "适用于政务汇报与党建场景的红色政务模板",+ "summary": "A red government-themed template for government reports and party-building scenarios","useCases": [- "政务汇报",- "政策解读",- "工作总结",- "项目推介",- "招商引资"- ],- "tone": "权威、庄重、专业、现代化政务风格",- "themeMode": "亮色主题(白色背景 + 政府红/蓝强调色)",+ "Government report",+ "Policy briefing",+ "Work summary",+ "Project promotion",+ "Investment promotion"+ ],+ "tone": "Authoritative, solemn, professional, modernized government style",+ "themeMode": "Light theme (white background + government red/blue accents)","pageTypes": ["cover","toc",@@ -374,25 +374,25 @@],"assets": [],"keywords": [- "政务",- "党建",- "政府红",- "权威"+ "Government affairs",+ "Party building",+ "Government red",+ "Authoritative"]},"mckinsey": {"dir": "mckinsey",- "label": "麦肯锡风格模板",+ "label": "McKinsey Style Template","category": "brand",- "summary": "适用于战略咨询和投资分析的麦肯锡风格模板",+ "summary": "A McKinsey-style template for strategic consulting and investment analysis","useCases": [- "战略咨询",- "高管汇报",- "投资分析",- "商业提案"+ "Strategic consulting",+ "Executive presentation",+ "Investment analysis",+ "Business proposal"],- "tone": "数据驱动、结构化思维、专业留白、极简高端",- "themeMode": "亮色主题(白色背景 + McKinsey Blue 强调)",+ "tone": "Data-driven, structured thinking, professional whitespace, minimalist premium",+ "themeMode": "Light theme (white background + McKinsey Blue accent)","pageTypes": ["cover","toc",@@ -402,26 +402,26 @@],"assets": [],"keywords": [- "麦肯锡",- "咨询",- "结构化",- "高管汇报"+ "McKinsey",+ "Consulting",+ "Structured",+ "Executive presentation"]},"medical_university": {"dir": "medical_university",- "label": "医院/医科大学模板",+ "label": "Hospital/Medical University Template","category": "scenario",- "summary": "适用于医学报告、病例讨论与科研汇报的专业模板",+ "summary": "A professional template for medical reports, case discussions, and research presentations","useCases": [- "医学学术报告",- "病例讨论",- "科研汇报",- "医院工作汇报",- "医学教育培训"- ],- "tone": "专业、严谨、生命感、科技感、可信赖",- "themeMode": "亮色主题(白色背景 + 医学蓝标题条 + 生命绿点缀)",+ "Medical academic report",+ "Case discussion",+ "Research presentation",+ "Hospital work report",+ "Medical education training"+ ],+ "tone": "Professional, rigorous, life-affirming, tech-forward, trustworthy",+ "themeMode": "Light theme (white background + medical blue title bar + life green accents)","pageTypes": ["cover","toc",@@ -431,25 +431,25 @@],"assets": [],"keywords": [- "医学",- "医院",- "病例",- "科研"+ "Medical",+ "Hospital",+ "Case study",+ "Research"]},"pixel_retro": {"dir": "pixel_retro",- "label": "像素复古模板",+ "label": "Pixel Retro Template","category": "special",- "summary": "适用于技术分享和游戏主题内容的像素风模板",+ "summary": "A pixel-art template for tech sharing and gaming-themed content","useCases": [- "技术分享",- "编程教学",- "游戏介绍",- "极客风格展示"+ "Technical sharing",+ "Programming tutorial",+ "Game introduction",+ "Geek-style showcase"],- "tone": "复古游戏、霓虹赛博、极客科技、8-bit 风格",- "themeMode": "暗色主题(深空黑背景 + 霓虹强调色)",+ "tone": "Retro gaming, neon cyber, geek tech, 8-bit style",+ "themeMode": "Dark theme (deep space black background + neon accents)","pageTypes": ["cover","toc",@@ -459,25 +459,25 @@],"assets": [],"keywords": [- "像素风",- "复古游戏",- "赛博朋克",- "技术"+ "Pixel art",+ "Retro gaming",+ "Cyberpunk",+ "Technology"]},"psychology_attachment": {"dir": "psychology_attachment",- "label": "心理疗愈模板",+ "label": "Psychology Healing Template","category": "scenario",- "summary": "适用于心理治疗培训和咨询讲座的温暖专业模板",+ "summary": "A warm and professional template for psychotherapy training and counseling lectures","useCases": [- "心理治疗培训",- "学术讲座",- "咨询案例分析",- "专业分享"+ "Psychotherapy training",+ "Academic lecture",+ "Counseling case analysis",+ "Professional sharing"],- "tone": "专业、温暖、疗愈、信任感",- "themeMode": "浅色主题(云白背景 + 蓝绿渐变强调 + 多彩语义色)",+ "tone": "Professional, warm, healing, trustworthy",+ "themeMode": "Light theme (cloud white background + blue-green gradient accent + colorful semantic colors)","pageTypes": ["cover","toc",@@ -487,25 +487,25 @@],"assets": [],"keywords": [- "心理学",- "疗愈",- "咨询",- "温暖"+ "Psychology",+ "Healing",+ "Counseling",+ "Warm"]},"smart_red": {"dir": "smart_red",- "label": "智慧红橙商务模板",+ "label": "Smart Red-Orange Business Template","category": "general",- "summary": "适用于科技企业介绍和教育解决方案的活力商务模板",+ "summary": "A vibrant business template for tech company introductions and education solutions","useCases": [- "企业介绍",- "产品发布",- "解决方案演示",- "教育行业课件"+ "Company introduction",+ "Product launch",+ "Solution presentation",+ "Education courseware"],- "tone": "现代、活力、专业、几何感",- "themeMode": "混合主题(深色/彩色封面 + 浅色内容页)",+ "tone": "Modern, vibrant, professional, geometric",+ "themeMode": "Hybrid theme (dark/colorful cover + light content pages)","pageTypes": ["cover","toc",@@ -515,26 +515,26 @@],"assets": [],"keywords": [- "红橙商务",- "科技企业",- "教育",- "活力"+ "Red-orange business",+ "Tech enterprise",+ "Education",+ "Vibrant"]},"中国电建_常规": {"dir": "中国电建_常规",- "label": "中国电建常规模板",+ "label": "PowerChina Standard Template","category": "brand",- "summary": "适用于工程建设和央企汇报的稳健品牌模板",+ "summary": "A solid brand template for engineering construction and state-owned enterprise reports","useCases": [- "工程项目汇报",- "技术方案展示",- "商务洽谈",- "企业宣传",- "年度总结"- ],- "tone": "专业、稳重、国际化、央企风范",- "themeMode": "亮色主题(白色背景 + 电建蓝强调色)",+ "Engineering project report",+ "Technical proposal presentation",+ "Business negotiation",+ "Corporate promotion",+ "Annual summary"+ ],+ "tone": "Professional, steady, international, state-owned enterprise style",+ "themeMode": "Light theme (white background + PowerChina blue accent)","pageTypes": ["cover","toc",@@ -549,25 +549,25 @@"电建logo.png"],"keywords": [- "中国电建",- "央企",- "工程",- "能源"+ "PowerChina",+ "State-owned enterprise",+ "Engineering",+ "Energy"]},"中国电建_现代": {"dir": "中国电建_现代",- "label": "中国电建现代模板",+ "label": "PowerChina Modern Template","category": "brand",- "summary": "适用于重大工程和国际业务展示的现代工程模板",+ "summary": "A modern engineering template for major projects and international business presentations","useCases": [- "重大工程汇报",- "国际市场推介",- "科技成果展示",- "高端商务洽谈"+ "Major project report",+ "International market promotion",+ "Technology showcase",+ "High-end business negotiation"],- "tone": "宏大叙事、现代精工、数字科技、国际视野",- "themeMode": "深蓝科技渐变 + 精密网格纹理",+ "tone": "Grand narrative, modern precision, digital technology, international vision",+ "themeMode": "Deep blue tech gradient + precision grid texture","pageTypes": ["cover","toc",@@ -582,25 +582,25 @@"电建logo.png"],"keywords": [- "中国电建",- "国际工程",- "现代工程",- "科技"+ "PowerChina",+ "International engineering",+ "Modern engineering",+ "Technology"]},"中汽研_商务": {"dir": "中汽研_商务",- "label": "中汽研商务模板",+ "label": "CATARC Business Template","category": "brand",- "summary": "适用于认证展示和高端商务汇报的中汽研品牌模板",+ "summary": "A CATARC brand template for certification showcase and high-end business presentations","useCases": [- "产品认证展示",- "测评认证介绍",- "技术推介",- "高端商务汇报"+ "Product certification showcase",+ "Testing & certification introduction",+ "Technology promotion",+ "High-end business presentation"],- "tone": "现代科技、权威专业、沉稳大气",- "themeMode": "深蓝科技渐变 + 清爽白底内容页",+ "tone": "Modern tech, authoritative professional, composed and grand",+ "themeMode": "Deep blue tech gradient + clean white content pages","pageTypes": ["cover","toc",@@ -613,25 +613,25 @@"大型 logo.png"],"keywords": [- "中汽研",- "认证",- "商务",- "科技"+ "CATARC",+ "Certification",+ "Business",+ "Technology"]},"中汽研_常规": {"dir": "中汽研_常规",- "label": "中汽研常规模板",+ "label": "CATARC Standard Template","category": "brand",- "summary": "适用于认证和测评场景的中汽研常规模板",+ "summary": "A standard CATARC template for certification and testing scenarios","useCases": [- "产品认证展示",- "测评认证介绍",- "技术推介",- "商务拜访"+ "Product certification showcase",+ "Testing & certification introduction",+ "Technology promotion",+ "Business visit"],- "tone": "专业、权威、可信赖、咨询风格",- "themeMode": "亮色主题(白色背景 + 深蓝强调色)",+ "tone": "Professional, authoritative, trustworthy, consulting style",+ "themeMode": "Light theme (white background + dark blue accent)","pageTypes": ["cover","toc",@@ -644,24 +644,24 @@"大型 logo.png"],"keywords": [- "中汽研",- "认证",- "测评",- "权威"+ "CATARC",+ "Certification",+ "Testing",+ "Authoritative"]},"中汽研_现代": {"dir": "中汽研_现代",- "label": "中汽研现代模板",+ "label": "CATARC Modern Template","category": "brand",- "summary": "适用于前瞻技术展示和高端发布的未来科技模板",+ "summary": "A futuristic tech template for cutting-edge technology showcase and premium launches","useCases": [- "前瞻技术展示",- "战略发布",- "高端商务汇报"+ "Cutting-edge technology showcase",+ "Strategic launch",+ "High-end business presentation"],- "tone": "未来感、科技、深邃、精致",- "themeMode": "沉浸式深色封面/过渡页 + 清爽微灰内容页",+ "tone": "Futuristic, tech-forward, deep, refined",+ "themeMode": "Immersive dark cover/transition pages + clean light gray content pages","pageTypes": ["cover","toc",@@ -674,25 +674,25 @@"大型 logo.png"],"keywords": [- "中汽研",- "未来科技",- "前瞻技术",- "发布会"+ "CATARC",+ "Future tech",+ "Cutting-edge technology",+ "Launch event"]},"招商银行": {"dir": "招商银行",- "label": "招商银行模板",+ "label": "China Merchants Bank Template","category": "brand",- "summary": "适用于金融机构高端汇报和年度报告的品牌模板",+ "summary": "A brand template for premium financial institution reports and annual presentations","useCases": [- "高端工作汇报",- "业务展示",- "年度报告",- "产品推介"+ "Premium work report",+ "Business showcase",+ "Annual report",+ "Product promotion"],- "tone": "极简轻奢、精致、多层次、现代金融",- "themeMode": "亮色主题(微纹理背景 + 招行红/金精细装饰)",+ "tone": "Minimalist luxury, refined, multi-layered, modern finance",+ "themeMode": "Light theme (textured background + CMB red/gold fine decorations)","pageTypes": ["cover","toc",@@ -704,26 +704,26 @@"招商银行公司金融.png"],"keywords": [- "招商银行",- "金融",- "高端汇报",- "年度报告"+ "China Merchants Bank",+ "Finance",+ "Premium report",+ "Annual report"]},"科技蓝商务": {"dir": "科技蓝商务",- "label": "科技蓝商务模板",+ "label": "Tech Blue Business Template","category": "general",- "summary": "适用于企业汇报与方案提案的科技商务模板",+ "summary": "A tech-business template for corporate reports and solution proposals","useCases": [- "企业汇报",- "产品发布",- "方案提案",- "流程规范",- "培训材料"- ],- "tone": "科技、商务、专业、简洁",- "themeMode": "混合主题(深蓝/科技蓝封面 + 浅色内容页)",+ "Corporate report",+ "Product launch",+ "Solution proposal",+ "Process documentation",+ "Training materials"+ ],+ "tone": "Tech-forward, business, professional, clean",+ "themeMode": "Hybrid theme (dark blue/tech blue cover + light content pages)","pageTypes": ["cover","toc",@@ -733,25 +733,25 @@],"assets": [],"keywords": [- "科技蓝",- "商务",- "方案提案",- "企业汇报"+ "Tech blue",+ "Business",+ "Solution proposal",+ "Corporate report"]},"重庆大学": {"dir": "重庆大学",- "label": "重庆大学模板",+ "label": "Chongqing University Template","category": "scenario",- "summary": "适用于学术答辩与科研汇报的高校专属模板",+ "summary": "A university-exclusive template for academic defenses and research presentations","useCases": [- "学术答辩",- "科研汇报",- "教学展示",- "学术交流"+ "Academic defense",+ "Research presentation",+ "Teaching showcase",+ "Academic exchange"],- "tone": "学术稳重、山城气韵、现代简约",- "themeMode": "学术蓝主色 + 山城层叠意象",+ "tone": "Academically composed, mountain-city essence, modern minimalist",+ "themeMode": "Academic blue primary + mountain-city layered imagery","pageTypes": ["cover","toc",@@ -764,10 +764,10 @@"重庆大学logo2.png"],"keywords": [- "重庆大学",- "学术",- "答辩",- "高校"+ "Chongqing University",+ "Academic",+ "Defense",+ "University"]}}diff --git a/skills/ppt-master/templates/layouts/mckinsey/design_spec.md b/skills/ppt-master/templates/layouts/mckinsey/design_spec.mdindex 9a71934f..4653b1f2 100644--- a/skills/ppt-master/templates/layouts/mckinsey/design_spec.md+++ b/skills/ppt-master/templates/layouts/mckinsey/design_spec.md@@ -1,261 +1,261 @@-# 麦肯锡风格模板 (McKinsey Style) - 设计规范+# McKinsey Style Template - Design Specification-> 适用于战略咨询、高管汇报、投资分析、商业提案等高端商务场景。+> Suitable for strategic consulting, executive briefings, investment analysis, business proposals, and other high-end business scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------ |-| **模板名称** | mckinsey(麦肯锡风格模板) |-| **适用场景** | 战略咨询、高管汇报、投资分析、商业提案 |-| **设计调性** | 数据驱动、结构化思维、专业留白、极简高端 |-| **主题模式** | 亮色主题(白色背景 + McKinsey Blue 强调) |+| Property | Description |+| -------------- | ---------------------------------------------------------- |+| **Template Name** | mckinsey (McKinsey Style Template) |+| **Use Cases** | Strategic consulting, executive briefings, investment analysis, business proposals |+| **Design Tone** | Data-driven, structured thinking, professional whitespace, minimalist premium |+| **Theme Mode** | Light theme (white background + McKinsey Blue accent) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上 60px,下 40px |-| **内容安全区** | x: 60-1220, y: 60-680 |-| **网格基准** | 40px |+| **Page Margins** | Left/Right 60px, Top 60px, Bottom 40px |+| **Safe Area** | x: 60-1220, y: 60-680 |+| **Grid Baseline** | 40px |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || ---------------- | ----------- | -------------------------------- |-| **McKinsey Blue**| `#005587` | 主色调,标题栏、强调元素 |-| **Deep Teal** | `#004D5C` | 辅助蓝色,渐变终点 |-| **背景白** | `#FFFFFF` | 页面主背景 |-| **浅灰背景** | `#ECF0F1` | 分隔、次级背景 |+| **McKinsey Blue**| `#005587` | Primary color, title bar, accent elements |+| **Deep Teal** | `#004D5C` | Secondary blue, gradient endpoint |+| **Background White** | `#FFFFFF` | Main page background |+| **Light Gray Background** | `#ECF0F1` | Separators, secondary backgrounds |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **标题深灰** | `#2C3E50` | 主标题、卡片标题 |-| **正文灰** | `#5D6D7E` | 正文内容、说明文字 |-| **辅助灰** | `#7F8C8D` | 注释、来源、页脚 |-| **白色文字** | `#FFFFFF` | 蓝色背景上的文字 |+| **Title Dark Gray** | `#2C3E50` | Main titles, card titles |+| **Body Gray** | `#5D6D7E` | Body content, descriptive text |+| **Auxiliary Gray** | `#7F8C8D` | Annotations, sources, footer |+| **White Text** | `#FFFFFF` | Text on blue backgrounds |-### 强调色+### Accent Colors-| 用途 | 色值 | 说明 |+| Usage | Value | Description || ---------------- | ----------- | ---------------------- |-| **数据强调** | `#F5A623` | Amber,关键数据高亮 |-| **警示/问题** | `#E74C3C` | Coral,问题点、负向指标|-| **成功/正向** | `#27AE60` | 绿色,正向指标 |-| **信息蓝** | `#0076A8` | 辅助信息、图表渐变 |+| **Data Highlight** | `#F5A623` | Amber, key data emphasis |+| **Warning/Issue** | `#E74C3C` | Coral, problem areas, negative indicators |+| **Success/Positive** | `#27AE60` | Green, positive indicators |+| **Info Blue** | `#0076A8` | Supplementary info, chart gradients |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `Arial, "Helvetica Neue", "Segoe UI", sans-serif`+**Font Stack**: `Arial, "Helvetica Neue", "Segoe UI", sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| -------- | ---------------- | ------ | ------- |-| H1 | 封面主标题 | 52px | Bold |-| H2 | 页面标题 | 36px | Bold |-| H3 | 模块标题 | 22-24px| Bold |-| H4 | 卡片标题 | 16-18px| Bold |-| P | 正文内容 | 14-16px| Regular |-| Data | 数据强调 | 44px | Bold |-| Sub | 图表标签/注释 | 12-14px| Regular |+| Level | Usage | Size | Weight |+| -------- | ------------------ | ------- | ------- |+| H1 | Cover main title | 52px | Bold |+| H2 | Page title | 36px | Bold |+| H3 | Section title | 22-24px | Bold |+| H4 | Card title | 16-18px | Bold |+| P | Body content | 14-16px | Regular |+| Data | Data highlight | 44px | Bold |+| Sub | Chart labels/Annotations | 12-14px | Regular |----## 五、核心设计原则+## V. Core Design Principles-### 麦肯锡风格特色+### McKinsey Style Characteristics-1. **数据驱动**: 以关键数据与洞察为核心,强化论据支撑-2. **结构化思维**: MECE 原则,清晰的逻辑框架-3. **信息可视化**: 图表、矩阵、漏斗模型优先-4. **专业留白**: 充足的呼吸感,内容占比 < 65%-5. **网格对齐**: 40px 基准网格,精确对齐-6. **极简图标**: 几何形状,避免花哨装饰-7. **专业配色**: 避免花哨渐变,保持克制+1. **Data-Driven**: Key data and insights at the core, strengthening argument support+2. **Structured Thinking**: MECE principle, clear logical frameworks+3. **Information Visualization**: Charts, matrices, and funnel models take priority+4. **Professional Whitespace**: Ample breathing room, content coverage < 65%+5. **Grid Alignment**: 40px baseline grid, precise alignment+6. **Minimalist Icons**: Geometric shapes, avoiding ornate decoration+7. **Professional Color Palette**: Avoiding flashy gradients, maintaining restraint----## 六、页面结构+## VI. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0, h=4px | McKinsey Blue 横条装饰 |-| **标题区** | y=40, h=60px | 页面标题(左对齐,大号粗体) |-| **内容区** | y=120, h=520px| 主要内容区域 |-| **页脚** | y=680, h=40px | 页码(左)、数据来源/机密标识(右) |+| Area | Position/Height | Description |+| ---------- | --------------- | -------------------------------------- |+| **Top** | y=0, h=4px | McKinsey Blue horizontal bar |+| **Title Area** | y=40, h=60px | Page title (left-aligned, large bold) |+| **Content Area** | y=120, h=520px | Main content area |+| **Footer** | y=680, h=40px | Page number (left), data source/confidential label (right) |-### 装饰设计+### Decorative Design-- **左侧装饰条**: McKinsey Blue (`#005587`),宽度 8px(封面页)-- **顶部装饰线**: McKinsey Blue (`#005587`),高度 4px-- **卡片边框**: 浅灰 (`#ECF0F1`),宽度 2px-- **几何装饰**: 低透明度蓝色几何图案(封面页右侧)+- **Left Accent Bar**: McKinsey Blue (`#005587`), width 8px (cover page)+- **Top Decoration Line**: McKinsey Blue (`#005587`), height 4px+- **Card Borders**: Light gray (`#ECF0F1`), width 2px+- **Geometric Decoration**: Low-opacity blue geometric patterns (cover page right side)----## 七、页面类型+## VII. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 白色背景-- 左侧蓝色装饰窄条 (8px)-- 左上角短横线装饰-- 主标题 + 副标题(左对齐)-- 底部项目代码、日期-- 右侧低透明度几何装饰-- 右下角机密标识+- White background+- Left-side blue narrow accent bar (8px)+- Top-left short horizontal line decoration+- Main title + subtitle (left-aligned)+- Bottom project code, date+- Right-side low-opacity geometric decoration+- Bottom-right confidential label-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- 白色背景-- 顶部蓝色装饰条-- 标题区 "Agenda" / "Contents"-- 章节列表(编号 + 标题)-- 简洁线条分隔+- White background+- Top blue decoration bar+- Title area "Agenda" / "Contents"+- Chapter list (number + title)+- Clean line separators-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- McKinsey Blue 全屏背景-- 居中大号章节标题-- 白色文字-- 极简设计+- McKinsey Blue full-screen background+- Centered large chapter title+- White text+- Minimalist design-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 顶部蓝色装饰条-- 左对齐页面标题-- 灵活内容区域-- 页脚:页码、数据来源+- White background+- Top blue decoration bar+- Left-aligned page title+- Flexible content area+- Footer: page number, data source-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 白色背景-- 居中感谢语-- 联系信息-- 机密标识+- White background+- Centered thank-you message+- Contact information+- Confidential label----## 八、常用图表规范+## VIII. Chart Specifications-### 图表尺寸建议+### Recommended Chart Dimensions-| 图表类型 | 建议尺寸 |-| ------------ | ------------------ |-| 条形图 | 500-700 × 400-500px|-| 饼图 | 直径 300-400px |-| 数据卡片 | 150 × 120px |-| 矩阵 | 240-280px / 单元格 |-| 漏斗图 | 500 × 400px |+| Chart Type | Recommended Size |+| ---------------- | ------------------ |+| Bar chart | 500-700 × 400-500px |+| Pie chart | Diameter 300-400px |+| Data card | 150 × 120px |+| Matrix | 240-280px / cell |+| Funnel chart | 500 × 400px |-### 图表配色+### Chart Color Palette-- 主系列: `#005587`, `#0076A8`, `#4A90A4`-- 强调: `#F5A623`-- 警示: `#E74C3C`+- Primary series: `#005587`, `#0076A8`, `#4A90A4`+- Accent: `#F5A623`+- Warning: `#E74C3C`----## 九、间距规范+## IX. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 页面边距 | 60px |-| 标题区高度 | 80-100px |-| 图表间距 | 40-60px |-| 卡片内边距 | 20-24px |-| 文字行距 | 1.6 |-| 网格基准 | 40px |+| Element | Value |+| ---------------- | -------- |+| Page margins | 60px |+| Title area height | 80-100px |+| Chart spacing | 40-60px |+| Card padding | 20-24px |+| Text line height | 1.6 |+| Grid baseline | 40px |----## 十、SVG 技术约束+## X. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`-8. 渐变使用 `<defs>` 定义 `<linearGradient>`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (no `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency; `rgba()` is prohibited+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Use `<polygon>` triangles instead of `<marker>` for arrows+8. Define gradients using `<linearGradient>` within `<defs>`-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`+- No `<g opacity="...">` (group opacity); set opacity on each child element individually+- Use overlay layers instead of image opacity+- Use inline styles only; external CSS and `@font-face` are prohibited----## 十一、占位符规范+## XI. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符,常用占位符:+Templates use `{{PLACEHOLDER}}` format placeholders. Common placeholders:-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{PROJECT_CODE}}` | 项目代码 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}`| 章节标题 |-| `{{PAGE_NUM}}` | 页码 |-| `{{SOURCE}}` | 数据来源 |-| `{{CONFIDENTIAL}}` | 机密标识 |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{PROJECT_CODE}}` | Project code |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Page title |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}`| Chapter title |+| `{{PAGE_NUM}}` | Page number |+| `{{SOURCE}}` | Data source |+| `{{CONFIDENTIAL}}` | Confidential label |----## 十二、质量核对清单+## XII. Quality Checklist-### 生成前+### Pre-Generation-- [ ] 每页核心观点明确-- [ ] 数据支撑充分-- [ ] 逻辑结构清晰+- [ ] Each page has a clear core message+- [ ] Sufficient data support+- [ ] Clear logical structure-### 生成后+### Post-Generation- [ ] viewBox = `0 0 1280 720`-- [ ] McKinsey Blue 一致应用-- [ ] 关键数据突出显示(Amber/Coral)-- [ ] 图表坐标轴完整标注-- [ ] 文字可读性良好(对比度 > 4.5:1)-- [ ] 元素对齐精准(网格对齐)-- [ ] 页码/页脚信息完整-- [ ] 无 `<foreignObject>`-- [ ] 所有文本使用 `<tspan>` 换行+- [ ] McKinsey Blue consistently applied+- [ ] Key data prominently highlighted (Amber/Coral)+- [ ] Chart axes fully labeled+- [ ] Text readability is good (contrast ratio > 4.5:1)+- [ ] Elements precisely aligned (grid alignment)+- [ ] Page numbers/footer information complete+- [ ] No `<foreignObject>`+- [ ] All text uses `<tspan>` for line breaks----## 十三、使用说明+## XIII. Usage Instructions-1. 复制模板到项目目录-2. 根据汇报内容需求选择合适的页面模板-3. 使用占位符标记需要替换的内容-4. 数据图表优先,文字简洁-5. 通过 Executor 角色生成最终 SVG+1. Copy the template to the project directory+2. Select the appropriate page template based on briefing content requirements+3. Mark content to be replaced using placeholders+4. Prioritize data charts; keep text concise+5. Generate the final SVG through the Executor rolediff --git a/skills/ppt-master/templates/layouts/medical_university/design_spec.md b/skills/ppt-master/templates/layouts/medical_university/design_spec.mdindex 8f0624dd..246aa929 100644--- a/skills/ppt-master/templates/layouts/medical_university/design_spec.md+++ b/skills/ppt-master/templates/layouts/medical_university/design_spec.md@@ -1,289 +1,289 @@-# 医院/医科大学模板 (Medical University Style) - 设计规范+# Hospital / Medical University Template (Medical University Style) - Design Specification-> 适用于医院、医科大学、附属医院、医学研究机构的学术报告、病例汇报、科研成果展示等场景。+> Suitable for hospitals, medical universities, affiliated hospitals, and medical research institutions for academic reports, case presentations, research results, and related scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| ------------ | ------------------------------------------------------------ |-| **模板名称** | medical_university(医院/医科大学模板) |-| **适用场景** | 医学学术报告、病例讨论、科研汇报、医院工作汇报、医学教育培训 |-| **设计调性** | 专业、严谨、生命感、科技感、可信赖 |-| **主题模式** | 亮色主题(白色背景 + 医学蓝标题条 + 生命绿点缀) |-| **适用机构** | 各类医疗机构(医院、医科大学、附属医院、医学研究机构) |+| Property | Description |+| ---------------- | -------------------------------------------------------------------- |+| **Template Name**| medical_university (Hospital / Medical University Template) |+| **Use Cases** | Medical academic reports, case discussions, research presentations, hospital work reports, medical education and training |+| **Design Tone** | Professional, rigorous, life-affirming, tech-forward, trustworthy |+| **Theme Mode** | Light theme (white background + medical blue title bar + life green accents) |+| **Target Institutions** | All types of medical institutions (hospitals, medical universities, affiliated hospitals, medical research institutes) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |-| -------------- | -------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 40px,上 0px,下 35px |-| **内容安全区** | x: 40-1240, y: 70-665 |+| Property | Value |+| ------------------ | ---------------------------- |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Page Margins** | Left/right 40px, top 0px, bottom 35px |+| **Content Safe Area** | x: 40-1240, y: 70-665 |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |-| -------------- | --------- | --------------------------------- |-| **主导医学蓝** | `#0066B3` | 页眉背景、章节标题、主要标题 |-| **深医学蓝** | `#004080` | 章节页背景、重点强调 |-| **辅助绿** | `#00A86B` | 卡片边框、生命/健康相关内容、图标 |-| **强调橙** | `#FF6B35` | 重点高亮、关键数据、左侧装饰条 |-| **浅蓝背景** | `#E6F3FA` | 核心观点背景条、卡片内区块 |-| **浅绿背景** | `#E8F5EE` | 医疗相关卡片、健康数据区块 |-| **背景白** | `#FFFFFF` | 页面主背景 |+| Role | Value | Notes |+| ------------------ | --------- | ---------------------------------------- |+| **Primary Medical Blue** | `#0066B3` | Header background, chapter titles, main titles |+| **Deep Medical Blue** | `#004080` | Chapter page background, key emphasis |+| **Accent Green** | `#00A86B` | Card borders, life/health-related content, icons |+| **Emphasis Orange** | `#FF6B35` | Key highlights, critical data, left accent bars |+| **Light Blue BG** | `#E6F3FA` | Key message background bar, card inner blocks |+| **Light Green BG** | `#E8F5EE` | Medical-related cards, health data blocks |+| **Background White** | `#FFFFFF` | Main page background |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |-| ------------ | --------- | ---------------- |-| **白色文字** | `#FFFFFF` | 深色背景上的文字 |-| **主文字** | `#333333` | 正文内容 |-| **辅助文字** | `#666666` | 说明文字、标注 |-| **弱灰** | `#999999` | 页脚、辅助信息 |+| Role | Value | Usage |+| ---------------- | --------- | -------------------------- |+| **White Text** | `#FFFFFF` | Text on dark backgrounds |+| **Primary Text** | `#333333` | Body content |+| **Secondary Text** | `#666666` | Captions, annotations |+| **Muted Gray** | `#999999` | Footer, supplementary info |-### 中性色+### Neutral Colors-| 角色 | 色值 | 用途 |-| ---------- | --------- | -------------------- |-| **卡片灰** | `#F5F7FA` | 卡片内背景、信息区块 |-| **边框灰** | `#D0D7E0` | 卡片边框、分割线 |+| Role | Value | Usage |+| -------------- | --------- | ---------------------------- |+| **Card Gray** | `#F5F7FA` | Card inner background, info blocks |+| **Border Gray**| `#D0D7E0` | Card borders, divider lines |-### 功能色+### Functional Colors-| 用途 | 色值 | 说明 |-| -------- | --------- | ------------------ |-| **成功** | `#28A745` | 正向指标、康复数据 |-| **警示** | `#FFC107` | 注意事项、提醒 |-| **危险** | `#DC3545` | 危急值、风险提示 |-| **信息** | `#17A2B8` | 信息提示、参考数据 |+| Usage | Value | Description |+| ------------ | --------- | ------------------------------ |+| **Success** | `#28A745` | Positive indicators, recovery data |+| **Warning** | `#FFC107` | Precautions, reminders |+| **Danger** | `#DC3545` | Critical values, risk alerts |+| **Info** | `#17A2B8` | Info tips, reference data |-### 配色变体方案+### Color Variant Schemes-如需调整为其他医疗机构配色,可替换主色系中的对应色值:+To adapt to other medical institution branding, replace the corresponding values in the primary color system:-| 机构类型 | 主导色 | 辅助色 | 强调色 | 适用场景 |-| ---------- | --------- | --------- | --------- | ---------------------- |-| 默认医学蓝 | `#0066B3` | `#00A86B` | `#FF6B35` | 综合医院、医科大学 |-| 儿童医院 | `#0099CC` | `#66CC99` | `#FF9933` | 儿童医院、儿科专科 |-| 中医院 | `#8B4513` | `#228B22` | `#DAA520` | 中医院、中医药研究机构 |-| 妇幼保健院 | `#E91E8C` | `#9C27B0` | `#FF5722` | 妇幼保健院、妇产科 |+| Institution Type | Primary | Accent | Emphasis | Applicable Scenarios |+| ------------------- | --------- | --------- | --------- | ----------------------------- |+| Default Medical Blue | `#0066B3` | `#00A86B` | `#FF6B35` | General hospitals, medical universities |+| Children's Hospital | `#0099CC` | `#66CC99` | `#FF9933` | Children's hospitals, pediatric specialties |+| TCM Hospital | `#8B4513` | `#228B22` | `#DAA520` | TCM hospitals, TCM research institutes |+| Maternal & Child Health | `#E91E8C` | `#9C27B0` | `#FF5722` | Maternal & child health centers, OB/GYN |-> **使用方法**:在所有 SVG 模板文件中全局替换主色系色值即可快速切换配色方案。+> **Usage**: Perform a global find-and-replace of the primary color values across all SVG template files to quickly switch color schemes.----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", Arial, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", Arial, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| ---- | ---------- | ---- | ------- |-| H1 | 封面主标题 | 52px | Bold |-| H2 | 页面标题 | 28px | Bold |-| H3 | 章节标题 | 52px | Bold |-| H4 | 卡片标题 | 24px | Bold |-| P | 正文内容 | 18px | Regular |-| High | 强调数据 | 36px | Bold |-| Sub | 注释/来源 | 14px | Regular |-| XS | 页码/版权 | 12px | Regular |+| Level | Usage | Size | Weight |+| ----- | ---------------- | ---- | ------- |+| H1 | Cover main title | 52px | Bold |+| H2 | Page title | 28px | Bold |+| H3 | Chapter title | 52px | Bold |+| H4 | Card title | 24px | Bold |+| P | Body content | 18px | Regular |+| High | Emphasized data | 36px | Bold |+| Sub | Notes/sources | 14px | Regular |+| XS | Page number/copyright | 12px | Regular |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | -------------- | ------------------------------------ |-| **页眉** | y=0, h=70px | 医学蓝背景 + 橙色左侧竖条 + 页面标题 |-| **观点条** | y=70, h=50px | 核心观点/摘要区域(浅蓝背景) |-| **内容区** | y=135, h=515px | 主要内容区域 |-| **页脚** | y=665, h=55px | 数据来源、机构名称、页码 |+| Area | Position/Height | Description |+| ----------------- | ---------------- | -------------------------------------------- |+| **Header** | y=0, h=70px | Medical blue background + orange left vertical bar + page title |+| **Key Message Bar** | y=70, h=50px | Core message/summary area (light blue background) |+| **Content Area** | y=135, h=515px | Main content area |+| **Footer** | y=665, h=55px | Data source, institution name, page number |-### 装饰设计+### Decorative Design-- **左侧橙色竖条**: 强调橙 (`#FF6B35`),宽度 6px,用于页眉和卡片装饰-- **医学蓝边框**: 主导蓝 (`#0066B3`),用于卡片边框-- **绿色点缀**: 辅助绿 (`#00A86B`),用于健康/生命相关元素-- **十字/心电图装饰**: 医疗主题几何装饰元素+- **Left Orange Vertical Bar**: Emphasis orange (`#FF6B35`), width 6px, used for header and card decoration+- **Medical Blue Border**: Primary blue (`#0066B3`), used for card borders+- **Green Accents**: Accent green (`#00A86B`), used for health/life-related elements+- **Cross/ECG Decorations**: Medical-themed geometric decorative elements----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 白色背景-- 医学蓝顶部横条 + 橙色左侧竖条装饰-- 右上角 Logo/校徽占位区域-- 居中主标题 + 副标题-- 装饰分隔线(蓝色 + 绿色圆点)-- 汇报人信息区域(姓名、科室/导师、机构)-- 底部灰色信息区(日期)+- White background+- Medical blue top horizontal bar + orange left vertical bar decoration+- Upper-right logo/emblem placeholder area+- Centered main title + subtitle+- Decorative divider line (blue + green dots)+- Presenter information area (name, department/advisor, institution)+- Bottom gray info area (date)-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- 白色背景-- 标准页眉(医学蓝 + 橙色竖条)-- 卡片式目录项布局(2列)-- 浅蓝/浅绿背景卡片 + 左侧彩色竖条-- 可选项使用虚线边框+- White background+- Standard header (medical blue + orange vertical bar)+- Card-style TOC layout (2 columns)+- Light blue/light green background cards + left colored vertical bar+- Optional items use dashed borders-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深医学蓝全屏背景 (`#004080`)-- 右侧几何图形装饰(医疗主题)-- 左侧橙色竖条装饰-- 大号半透明背景编号-- 醒目白色章节标题-- 浅蓝章节描述+- Deep medical blue full-screen background (`#004080`)+- Right-side geometric decorations (medical theme)+- Left orange vertical bar decoration+- Large semi-transparent background chapter number+- Prominent white chapter title+- Light blue chapter description-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 标准页眉(医学蓝 + 橙色竖条)-- 核心观点条(浅蓝背景 + 蓝色左侧竖条)-- 灵活内容区域-- 页脚:数据来源、机构名称、页码+- White background+- Standard header (medical blue + orange vertical bar)+- Key message bar (light blue background + blue left vertical bar)+- Flexible content area+- Footer: data source, institution name, page number-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 白色背景-- 医学蓝顶部横条-- 居中感谢语-- 科室/联系信息-- 机构 Logo 区域+- White background+- Medical blue top horizontal bar+- Centered thank-you message+- Department/contact information+- Institution logo area----## 七、布局模式(推荐)+## VII. Layout Patterns (Recommended)-### 适用于医学报告的常见布局+### Common Layouts for Medical Reports-| 布局名称 | 适用场景 | 特点 |-| ------------ | ---------------------- | ------------------ |-| **单栏居中** | 病例概述、主要结论 | 突出重点、层次清晰 |-| **双栏对比** | 治疗前后对比、方案比较 | 左右对称、便于比较 |-| **图文混排** | 影像资料展示、病理图片 | 图片配文字说明 |-| **数据卡片** | 检验结果、生命体征 | 多指标并列展示 |-| **时间线** | 病程记录、治疗过程 | 时间顺序清晰 |-| **流程图** | 诊疗流程、操作规范 | 步骤明确、逻辑清晰 |+| Layout Name | Applicable Scenarios | Features |+| --------------------- | -------------------------------- | ------------------------------ |+| **Single Column Center** | Case overview, main conclusions | Highlights key points, clear hierarchy |+| **Dual Column Comparison** | Before/after treatment, plan comparison | Symmetrical, easy to compare |+| **Image-Text Mixed** | Imaging materials, pathology images | Images with text descriptions |+| **Data Cards** | Lab results, vital signs | Multiple metrics side by side |+| **Timeline** | Disease progression, treatment course | Clear chronological order |+| **Flowchart** | Clinical pathways, procedure standards | Clear steps, logical flow |----## 八、间距规范+## VIII. Spacing Specification-| 间距类型 | 值 | 用途 |-| ------------ | ---- | -------------------- |-| **页面边距** | 40px | 内容到页面边缘的距离 |-| **卡片间距** | 24px | 卡片之间的间距 |-| **元素间距** | 16px | 卡片内元素间的间距 |-| **文字行距** | 1.5 | 正文行高倍数 |-| **段落间距** | 20px | 段落之间的间距 |+| Spacing Type | Value | Usage |+| ------------------ | ----- | -------------------------------- |+| **Page Margins** | 40px | Distance from content to page edge |+| **Card Spacing** | 24px | Spacing between cards |+| **Element Spacing** | 16px | Spacing between elements within cards |+| **Line Height** | 1.5 | Body text line height multiplier |+| **Paragraph Spacing** | 20px | Spacing between paragraphs |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules-- viewBox 固定为 `0 0 1280 720`-- 背景使用 `<rect>` 元素-- 使用 `<tspan>` 进行文本换行-- 所有颜色使用 HEX 格式(不使用 rgba)-- 透明度使用 `fill-opacity` / `stroke-opacity`+- viewBox fixed at `0 0 1280 720`+- Use `<rect>` elements for backgrounds+- Use `<tspan>` for text wrapping+- All colors in HEX format (no rgba)+- Use `fill-opacity` / `stroke-opacity` for transparency-### 禁用元素(PPT 不兼容)+### Prohibited Elements (PPT Incompatible)-| 禁用项 | 替代方案 |-| ------------------ | ---------------------- |-| `clipPath` | 不使用裁剪 |-| `mask` | 不使用遮罩 |-| `<style>` | 使用内联样式 |-| `class` | 使用内联属性(`<defs>` 内 `id` 合法) |-| `foreignObject` | 使用 `<tspan>` 换行 |-| `textPath` | 使用普通 `<text>` |-| `animate*` / `set` | 不使用动画 |-| `marker-end` | 使用 `<polygon>` 箭头 |-| `<g opacity>` | 每个元素单独设置透明度 |+| Prohibited Item | Alternative |+| -------------------- | ------------------------------ |+| `clipPath` | Do not use clipping |+| `mask` | Do not use masking |+| `<style>` | Use inline styles |+| `class` | Use inline attributes (`id` inside `<defs>` is allowed) |+| `foreignObject` | Use `<tspan>` for wrapping |+| `textPath` | Use standard `<text>` |+| `animate*` / `set` | Do not use animations |+| `marker-end` | Use `<polygon>` for arrows |+| `<g opacity>` | Set opacity on each element individually |----## 十、占位符规范--| 占位符 | 用途 |-| ------------------- | -------------------- |-| `{{LOGO}}` | 校徽/院徽 |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 汇报人姓名 |-| `{{DEPARTMENT}}` | 科室/院系 |-| `{{ADVISOR}}` | 指导老师 |-| `{{INSTITUTION}}` | 机构名称 |-| `{{DATE}}` | 日期 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}` | 章节标题 |-| `{{CHAPTER_DESC}}` | 章节描述 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{KEY_MESSAGE}}` | 核心观点 |-| `{{CONTENT_AREA}}` | 内容区域 |-| `{{SOURCE}}` | 数据来源 |-| `{{PAGE_NUM}}` | 页码 |-| `{{SECTION_NAME}}` | 章节名称(页脚) |-| `{{TOC_ITEM_N}}` | 目录项(N=1,2,3...) |+## X. Placeholder Specification++| Placeholder | Usage |+| ------------------- | ---------------------------- |+| `{{LOGO}}` | Emblem/institution logo |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Presenter name |+| `{{DEPARTMENT}}` | Department/school |+| `{{ADVISOR}}` | Thesis advisor |+| `{{INSTITUTION}}` | Institution name |+| `{{DATE}}` | Date |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}` | Chapter title |+| `{{CHAPTER_DESC}}` | Chapter description |+| `{{PAGE_TITLE}}` | Page title |+| `{{KEY_MESSAGE}}` | Key message |+| `{{CONTENT_AREA}}` | Content area |+| `{{SOURCE}}` | Data source |+| `{{PAGE_NUM}}` | Page number |+| `{{SECTION_NAME}}` | Section name (footer) |+| `{{TOC_ITEM_N}}` | TOC item (N=1,2,3...) |----## 十一、使用说明+## XI. Usage Notes-### 1. 复制模板到项目+### 1. Copy Template to Project```bash-cp templates/layouts/medical_university/* projects/<项目>/templates/+cp templates/layouts/medical_university/* projects/<project>/templates/```-### 2. Logo 放置建议+### 2. Logo Placement Guidelines-- 封面页:右上角,尺寸约 160×50px-- 内容页:右上角页眉内,尺寸约 120×35px-- 结束页:可放大展示,居中或配合联系信息+- Cover page: Upper-right corner, approx. 160×50px+- Content page: Upper-right within header, approx. 120×35px+- Ending page: Can be enlarged, centered or paired with contact info----## 十二、医学内容专用组件+## XII. Medical Content-Specific Components-### 数据卡片(生命体征)+### Data Card (Vital Signs)```xml<rect x="x" y="y" width="180" height="100" fill="#E8F5EE" rx="8"/>-<text x="x+90" y="y+35" text-anchor="middle" fill="#333333" font-size="14">体温</text>+<text x="x+90" y="y+35" text-anchor="middle" fill="#333333" font-size="14">Temperature</text><text x="x+90" y="y+70" text-anchor="middle" fill="#00A86B" font-size="28" font-weight="bold">36.5°C</text>```-### 警示标签+### Warning Label```xml<rect x="x" y="y" width="80" height="28" fill="#FFC107" rx="4"/>-<text x="x+40" y="y+19" text-anchor="middle" fill="#333333" font-size="14">注意</text>+<text x="x+40" y="y+19" text-anchor="middle" fill="#333333" font-size="14">Caution</text>```-### 危急值标签+### Critical Value Label```xml<rect x="x" y="y" width="80" height="28" fill="#DC3545" rx="4"/>-<text x="x+40" y="y+19" text-anchor="middle" fill="#FFFFFF" font-size="14">危急值</text>+<text x="x+40" y="y+19" text-anchor="middle" fill="#FFFFFF" font-size="14">Critical</text>```diff --git a/skills/ppt-master/templates/layouts/pixel_retro/design_spec.md b/skills/ppt-master/templates/layouts/pixel_retro/design_spec.mdindex 4b77a318..02c0a4a2 100644--- a/skills/ppt-master/templates/layouts/pixel_retro/design_spec.md+++ b/skills/ppt-master/templates/layouts/pixel_retro/design_spec.md@@ -1,203 +1,203 @@-# 像素复古模板 (Pixel Retro Style) - 设计规范+# Pixel Retro Style Template - Design Specification-> 适用于技术分享、编程教学、游戏相关演示、极客风格内容展示等场景。+> Suitable for tech talks, programming tutorials, game-related presentations, geek-style content showcases, and similar scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------ |-| **模板名称** | pixel_retro(像素复古模板) |-| **适用场景** | 技术分享、编程教学、游戏介绍、极客风格展示 |-| **设计调性** | 复古游戏、霓虹赛博、极客科技、8-bit 风格 |-| **主题模式** | 暗色主题(深空黑背景 + 霓虹强调色) |+| Property | Description |+| -------------- | ---------------------------------------------------------- |+| **Template Name** | pixel_retro (Pixel Retro Template) |+| **Use Cases** | Tech talks, programming tutorials, game introductions, geek-style showcases |+| **Design Tone** | Retro gaming, neon cyberpunk, geek tech, 8-bit style |+| **Theme Mode** | Dark theme (deep space black background + neon accents) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上 50px,下 40px |-| **内容安全区** | x: 60-1220, y: 50-680 |+| **Page Margins** | Left/Right 60px, Top 50px, Bottom 40px |+| **Safe Area** | x: 60-1220, y: 50-680 |----## 三、配色方案+## III. Color Scheme-### 背景色系+### Background Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || -------------- | ----------- | -------------------------------- |-| **深空黑** | `#0D1117` | 主背景色 |-| **星夜蓝** | `#161B22` | 卡片/区块背景 |-| **暗边框** | `#30363D` | 边框/分隔线 |+| **Deep Space Black** | `#0D1117` | Main background color |+| **Starry Night Blue** | `#161B22` | Card/block background |+| **Dark Border** | `#30363D` | Borders/dividers |-### 强调色系(霓虹系)+### Accent Colors (Neon Series)-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | -------------------------------- |-| **霓虹绿** | `#39FF14` | 主强调色、成功、存档点、Git |-| **赛博粉** | `#FF2E97` | 第二强调色、警示、对比、GitHub |-| **电光蓝** | `#00D4FF` | 第三强调色、链接、信息、流程 |-| **金黄色** | `#FFD700` | 第四强调色、历史、时间线、高亮 |+| **Neon Green** | `#39FF14` | Primary accent, success, save points, Git |+| **Cyber Pink** | `#FF2E97` | Secondary accent, warnings, contrast, GitHub |+| **Electric Blue** | `#00D4FF` | Tertiary accent, links, info, flows |+| **Gold Yellow** | `#FFD700` | Quaternary accent, history, timelines, highlights |-### 辅助色系+### Auxiliary Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | -------------------------------- |-| **暗绿** | `#238636` | 成功状态柔和版本 |-| **暗粉** | `#8B2252` | 柔和粉色 |-| **暗蓝** | `#1F6FEB` | 柔和蓝色 |+| **Dark Green** | `#238636` | Muted version of success state |+| **Dark Pink** | `#8B2252` | Muted pink |+| **Dark Blue** | `#1F6FEB` | Muted blue |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **月光白** | `#E6EDF3` | 主要文字 |-| **灰雾色** | `#8B949E` | 次要说明文字 |-| **纯白** | `#FFFFFF` | 强调标题 |+| **Moonlight White** | `#E6EDF3` | Primary text |+| **Mist Gray** | `#8B949E` | Secondary descriptive text |+| **Pure White** | `#FFFFFF` | Emphasized titles |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**标题字体**: `"Consolas", "Monaco", "Courier New", monospace` - 像素/代码感+**Title Font**: `"Consolas", "Monaco", "Courier New", monospace` - Pixel/code aesthetic-**正文字体**: `-apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif`+**Body Font**: `-apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif`-**代码字体**: `"Cascadia Code", "Fira Code", "Consolas", monospace`+**Code Font**: `"Cascadia Code", "Fira Code", "Consolas", monospace`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| ---- | ---------------- | ---- | ------- |-| H1 | 封面主标题 | 52px | Bold |-| H2 | 页面大标题 | 36px | Bold |-| H3 | 模块标题/小标题 | 22px | 600 |-| P | 正文内容 | 18px | Regular |-| High | 强调数据 | 48px | Bold |-| Sub | 辅助说明 | 14px | Regular |-| Code | 代码文字 | 16px | Regular |+| Level | Usage | Size | Weight |+| ----- | ------------------ | ---- | ------- |+| H1 | Cover main title | 52px | Bold |+| H2 | Page heading | 36px | Bold |+| H3 | Section title/Subtitle | 22px | 600 |+| P | Body content | 18px | Regular |+| High | Highlighted data | 48px | Bold |+| Sub | Supplementary text | 14px | Regular |+| Code | Code text | 16px | Regular |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0, h=4-6px | 霓虹绿装饰线(双线效果) |-| **标题区** | y=50, h=70px | 页面标题 + 英文副标题 |-| **内容区** | y=130, h=510px| 主要内容区域 |-| **页脚** | y=680, h=40px | 页码、装饰线、进度指示 |+| Area | Position/Height | Description |+| ---------- | --------------- | -------------------------------------- |+| **Top** | y=0, h=4-6px | Neon green decoration line (dual-line effect) |+| **Title Area** | y=50, h=70px | Page title + English subtitle |+| **Content Area** | y=130, h=510px | Main content area |+| **Footer** | y=680, h=40px | Page number, decoration line, progress indicator |-### 装饰元素+### Decorative Elements-- **顶部装饰线**: 霓虹绿双线(主线 4px + 辅助线 2px)-- **底部装饰线**: 霓虹绿双线(辅助线 4px + 主线 4px)-- **像素方块**: 角落使用递减透明度的方块装饰(100%→60%→30%)-- **扫描线网格**: 可选的低透明度背景网格线+- **Top Decoration Line**: Neon green dual lines (main line 4px + auxiliary line 2px)+- **Bottom Decoration Line**: Neon green dual lines (auxiliary line 4px + main line 4px)+- **Pixel Blocks**: Corner decorations with decreasing opacity (100% → 60% → 30%)+- **Scanline Grid**: Optional low-opacity background grid lines----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 深空黑背景-- 顶部/底部霓虹装饰线-- 像素风控制台图形(可选)-- 主标题(霓虹绿发光效果)-- 副标题(月光白)-- 功能按钮组(横向排列)-- 底部提示语(如 "PRESS START")+- Deep space black background+- Top/bottom neon decoration lines+- Pixel-style console graphic (optional)+- Main title (neon green glow effect)+- Subtitle (moonlight white)+- Function button group (horizontal layout)+- Bottom prompt text (e.g., "PRESS START")-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- 深空黑背景-- 标准顶部装饰-- 章节列表(带重要度标签)- - 🔴 关键必学- - 🟡 建议了解- - 🟢 可选内容-- 像素风列表样式+- Deep space black background+- Standard top decoration+- Chapter list (with importance labels)+ - Red: Essential / Must-learn+ - Yellow: Recommended+ - Green: Optional+- Pixel-style list design-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深空黑背景-- 全屏霓虹效果-- 大号章节编号(发光效果)-- 章节标题 + 英文副标题-- 像素风装饰框+- Deep space black background+- Full-screen neon effect+- Large chapter number (glow effect)+- Chapter title + English subtitle+- Pixel-style decorative frame-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 深空黑背景-- 标准顶部装饰-- 页面标题(霓虹绿 + 发光)-- 英文副标题(灰雾色)-- **内容区域完全开放**(y=140 到 y=670,宽度 1160px)-- 底部页码+- Deep space black background+- Standard top decoration+- Page title (neon green + glow)+- English subtitle (mist gray)+- **Fully open content area** (y=140 to y=670, width 1160px)+- Bottom page number-> ⚠️ **设计原则**: 内容页模板仅提供页面框架(标题区 + 页脚),内容区域由 Executor 根据实际内容自由设计。可使用的布局包括但不限于:卡片、进度条、表格、时间线、对比图等。+> **Design Principle**: The content page template only provides the page frame (title area + footer). The content area is freely designed by the Executor based on actual content. Available layouts include but are not limited to: cards, progress bars, tables, timelines, comparison charts, etc.-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 深空黑背景-- 霓虹发光主标题-- 总结卡片组-- "GAME SAVED" 视觉效果-- 进度按钮组+- Deep space black background+- Neon glow main title+- Summary card group+- "GAME SAVED" visual effect+- Progress button group----## 七、布局模式+## VII. Layout Modes-| 模式 | 适用场景 |-| ------------------ | -------------------------- |-| **单栏居中** | 封面、结语、重要观点 |-| **左右分栏 (5:5)** | 对比展示(如 Git vs GitHub)|-| **双列卡片** | 功能列表、特性对比 |-| **三栏卡片** | 要点总结、项目列表 |-| **进度条展示** | 数据统计、使用率 |-| **时间线** | 历史、流程、工作流 |+| Mode | Use Cases |+| ------------------ | ------------------------------ |+| **Single Column Centered** | Cover, closing, key points |+| **Two Columns (5:5)** | Comparative display (e.g., Git vs GitHub) |+| **Dual-Column Cards** | Feature lists, trait comparisons |+| **Three-Column Cards** | Key takeaways, project lists |+| **Progress Bar Display** | Data statistics, usage rates |+| **Timeline** | History, processes, workflows |----## 八、间距规范+## VIII. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 卡片间距 | 20-30px|-| 内容块间距 | 30px |-| 卡片内边距 | 20-24px|-| 卡片圆角 | 0px(方块感)或 4px |-| 边框宽度 | 2-3px |-| 图标与文字 | 12px |+| Element | Value |+| ---------------- | ------ |+| Card spacing | 20-30px |+| Content block spacing | 30px |+| Card padding | 20-24px |+| Card border radius | 0px (blocky feel) or 4px |+| Border width | 2-3px |+| Icon-to-text gap | 12px |----## 九、视觉特效+## IX. Visual Effects-### 像素风格特征+### Pixel Style Characteristics-- 方块化图标和装饰-- 使用 █ ▓ ░ ▀ ▄ ◼ ◻ 等字符装饰-- 进度条使用方块填充-- 边框使用双线或点状模拟-- 卡片角落添加像素装饰块+- Blocky icons and decorations+- Use block characters such as: full block, dark shade, light shade, upper half, lower half, small black/white squares for decoration+- Progress bars filled with blocks+- Borders use double lines or dotted patterns+- Card corners with pixel decoration blocks-### 霓虹发光效果+### Neon Glow Effect-对关键文字/元素添加发光滤镜:+Apply glow filters to key text/elements:```xml<defs>@@ -210,95 +210,95 @@</filter></defs>-<!-- 使用方式 -->-<text filter="url(#glowGreen)" fill="#39FF14">发光文字</text>+<!-- Usage -->+<text filter="url(#glowGreen)" fill="#39FF14">Glowing Text</text>```-> ⚠️ **注意**: `filter` 效果在 PPT 中通常会被忽略,但在支持 SVG 的查看器中效果良好。+> **Note**: `filter` effects are typically ignored in PPT, but render well in SVG-compatible viewers.-### Emoji 使用+### Emoji Usage-- 🎮 游戏/存档-- 💾 保存-- 🔀 分支/合并-- 📁 文件夹-- 📝 文档-- 🚀 发布-- ⏪ 回退-- 👾 开发者-- 🌐 网络/云端-- ✅ 确认/成功-- 🎯 目标/要点-- 🤔 问题/思考+- 🎮 Game/Save+- 💾 Save+- 🔀 Branch/Merge+- 📁 Folder+- 📝 Document+- 🚀 Release+- ⏪ Revert+- 👾 Developer+- 🌐 Network/Cloud+- ✅ Confirm/Success+- 🎯 Target/Key Point+- 🤔 Question/Thinking----## 十、SVG 技术约束+## X. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (no `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency; `rgba()` is prohibited+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Use `<polygon>` triangles instead of `<marker>` for arrows-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`-- `filter` 效果作为增强(允许使用),不影响基础显示+- No `<g opacity="...">` (group opacity); set opacity on each child element individually+- Use overlay layers instead of image opacity+- Use inline styles only; external CSS and `@font-face` are prohibited+- `filter` effects serve as enhancements (allowed) and do not affect baseline display----## 十一、占位符规范+## XI. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符,常用占位符:+Templates use `{{PLACEHOLDER}}` format placeholders. Common placeholders:-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 作者/单位 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{PAGE_TITLE_EN}}`| 页面英文标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{PAGE_NUM}}` | 页码 |-| `{{TOTAL_PAGES}}` | 总页数 |-| `{{VERSION}}` | 版本号 |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Author/Organization |+| `{{PAGE_TITLE}}` | Page title |+| `{{PAGE_TITLE_EN}}`| Page title (English) |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{PAGE_NUM}}` | Page number |+| `{{TOTAL_PAGES}}` | Total page count |+| `{{VERSION}}` | Version number |----## 十二、使用说明+## XII. Usage Instructions-1. 复制模板到项目 `templates/` 目录-2. 根据内容需求选择合适的页面模板-3. 使用占位符标记需要替换的内容-4. 通过 Executor 角色生成最终 SVG-5. 发光效果使用 `filter` 定义(在 `<defs>` 中)-6. 注意保持霓虹色系的一致性+1. Copy the template to the project `templates/` directory+2. Select the appropriate page template based on content requirements+3. Mark content to be replaced using placeholders+4. Generate the final SVG through the Executor role+5. Define glow effects using `filter` (within `<defs>`)+6. Maintain consistency of the neon color scheme----## 十三、配色快速参考+## XIII. Color Quick Reference```-背景层:- 主背景 #0D1117 深空黑- 卡片背景 #161B22 星夜蓝- 边框 #30363D 暗边框--强调色(按顺序使用):- 主强调 #39FF14 霓虹绿 ████- 第二强调 #FF2E97 赛博粉 ████- 第三强调 #00D4FF 电光蓝 ████- 第四强调 #FFD700 金黄色 ████--文字:- 主文字 #E6EDF3 月光白- 辅助文字 #8B949E 灰雾色- 强调文字 #FFFFFF 纯白+Background Layer:+ Main background #0D1117 Deep Space Black+ Card background #161B22 Starry Night Blue+ Borders #30363D Dark Border++Accent Colors (use in order):+ Primary accent #39FF14 Neon Green+ Secondary accent #FF2E97 Cyber Pink+ Tertiary accent #00D4FF Electric Blue+ Quaternary accent #FFD700 Gold Yellow++Text:+ Primary text #E6EDF3 Moonlight White+ Secondary text #8B949E Mist Gray+ Emphasis text #FFFFFF Pure White```diff --git a/skills/ppt-master/templates/layouts/psychology_attachment/design_spec.md b/skills/ppt-master/templates/layouts/psychology_attachment/design_spec.mdindex 3e434069..0d8b4803 100644--- a/skills/ppt-master/templates/layouts/psychology_attachment/design_spec.md+++ b/skills/ppt-master/templates/layouts/psychology_attachment/design_spec.md@@ -1,297 +1,297 @@-# 心理疗愈模板 (Psychology Attachment Style) - 设计规范+# Psychology Healing Template (Psychology Attachment Style) - Design Specification-> 适用于心理学、心理治疗、咨询培训、学术分享等专业场景。+> Suitable for psychology, psychotherapy, counseling training, and academic sharing in professional settings.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| ------------ | ------------------------------------------------ |-| **模板名称** | psychology_attachment(心理疗愈模板) |-| **适用场景** | 心理治疗培训、学术讲座、咨询案例分析、专业分享 |-| **设计调性** | 专业、温暖、疗愈、信任感 |-| **主题模式** | 浅色主题(云白背景 + 蓝绿渐变强调 + 多彩语义色) |+| Property | Description |+| ---------------- | ------------------------------------------------------------ |+| **Template Name**| psychology_attachment (Psychology Healing Template) |+| **Use Cases** | Psychotherapy training, academic lectures, counseling case analysis, professional sharing |+| **Design Tone** | Professional, warm, healing, trustworthy |+| **Theme Mode** | Light theme (cloud white background + blue-green gradient accent + multi-color semantic colors) |-### 核心视觉隐喻+### Core Visual Metaphor-采用"**安全基地**"作为核心视觉隐喻:+The design adopts "**Secure Base**" as the core visual metaphor:-- **结构稳固**:页面布局如同安全的依恋关系,有清晰的边界和可预期的模式-- **层次分明**:信息层级如同依恋系统的组织——从生物本能到高阶反思-- **温暖专业**:色彩既体现专业权威,又传递治愈温暖+- **Structural Stability**: Page layout resembles a secure attachment relationship with clear boundaries and predictable patterns+- **Clear Hierarchy**: Information levels mirror the organization of the attachment system — from biological instinct to higher-order reflection+- **Warm Professionalism**: Colors convey both professional authority and healing warmth----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |-| -------------- | --------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 40px,上 60px,下 40px |-| **内容安全区** | x: 40-1240, y: 60-680 |+| Property | Value |+| ------------------ | ------------------------------- |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Page Margins** | Left/right 40px, top 60px, bottom 40px |+| **Content Safe Area** | x: 40-1240, y: 60-680 |-### 页面分区+### Page Zones-| 区域 | Y坐标范围 | 高度 | 用途 |-| ---------- | --------- | ----- | ------------------ |-| 顶部标题区 | 60-120 | 60px | 页面标题、章节标识 |-| 主内容区 | 130-640 | 510px | 核心内容展示 |-| 底部信息区 | 650-680 | 30px | 页码、章节导航 |+| Zone | Y-Range | Height | Usage |+| ---------------- | --------- | ------ | -------------------------- |+| Top Title Area | 60-120 | 60px | Page title, chapter labels |+| Main Content | 130-640 | 510px | Core content display |+| Bottom Info Area | 650-680 | 30px | Page number, chapter nav |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 语义角色 | 颜色名称 | HEX | RGB | 使用说明 |-| ----------- | -------- | --------- | ----------- | ------------------------ |-| **主导色** | 安全蓝 | `#2E5C8E` | 46,92,142 | 标题、关键框架、安全依恋 |-| **背景色** | 云白 | `#F8FAFC` | 248,250,252 | 页面背景 |-| **强调色A** | 温暖橙 | `#E07843` | 224,120,67 | 活现、情感、矛盾型 |-| **强调色B** | 疗愈绿 | `#3D8B7A` | 61,139,122 | 成长、整合、安全型 |-| **强调色C** | 冷漠灰蓝 | `#64748B` | 100,116,139 | 回避型、冷漠型 |-| **警示色** | 创伤红 | `#B54545` | 181,69,69 | 混乱型、未解决创伤 |+| Semantic Role | Color Name | HEX | RGB | Usage |+| ----------------- | ------------- | --------- | ----------- | ---------------------------------- |+| **Dominant** | Secure Blue | `#2E5C8E` | 46,92,142 | Titles, key frameworks, secure attachment |+| **Background** | Cloud White | `#F8FAFC` | 248,250,252 | Page background |+| **Accent A** | Warm Orange | `#E07843` | 224,120,67 | Activation, emotion, anxious type |+| **Accent B** | Healing Green | `#3D8B7A` | 61,139,122 | Growth, integration, secure type |+| **Accent C** | Cool Gray-Blue| `#64748B` | 100,116,139 | Avoidant type, dismissive type |+| **Warning** | Trauma Red | `#B54545` | 181,69,69 | Disorganized type, unresolved trauma |-### 依恋类型专属配色+### Attachment Type Color Assignments-| 依恋类型 | 主色 | 辅色 | 象征 |-| --------------- | --------- | --------- | ---------- |-| 安全型/自主型 | `#3D8B7A` | `#D4EDDA` | 成长、协调 |-| 回避型/冷漠型 | `#64748B` | `#E2E8F0` | 疏离、抑制 |-| 矛盾型/迷恋型 | `#E07843` | `#FED7AA` | 焦虑、放大 |-| 混乱型/未解决型 | `#B54545` | `#FECACA` | 创伤、碎片 |+| Attachment Type | Primary | Secondary | Symbolism |+| ---------------------------- | --------- | --------- | ---------------------- |+| Secure / Autonomous | `#3D8B7A` | `#D4EDDA` | Growth, coherence |+| Avoidant / Dismissive | `#64748B` | `#E2E8F0` | Detachment, suppression |+| Anxious-Ambivalent / Preoccupied | `#E07843` | `#FED7AA` | Anxiety, amplification |+| Disorganized / Unresolved | `#B54545` | `#FECACA` | Trauma, fragmentation |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |-| ------------ | --------- | ----------------------- |-| **主标题** | `#1E293B` | 深墨蓝,封面/页面主标题 |-| **副标题** | `#2E5C8E` | 安全蓝,强调性副标题 |-| **正文** | `#374151` | 深灰,正文内容 |-| **辅助文本** | `#6B7280` | 中灰,注释说明 |-| **次要文本** | `#64748B` | 灰蓝,页码等 |-| **白色文字** | `#FFFFFF` | 深色背景上的文字 |-| **浅色文字** | `#E5E7EB` | 深色背景上的副文字 |-| **英文灰** | `#94A3B8` | 英文副标题 |+| Role | Value | Usage |+| ----------------- | --------- | ---------------------------------- |+| **Main Title** | `#1E293B` | Dark ink blue, cover/page titles |+| **Subtitle** | `#2E5C8E` | Secure blue, emphasized subtitles |+| **Body Text** | `#374151` | Dark gray, body content |+| **Helper Text** | `#6B7280` | Medium gray, annotations |+| **Secondary Text**| `#64748B` | Gray-blue, page numbers etc. |+| **White Text** | `#FFFFFF` | Text on dark backgrounds |+| **Light Text** | `#E5E7EB` | Secondary text on dark backgrounds |+| **English Gray** | `#94A3B8` | English subtitles |-### 渐变色+### Gradients-| 名称 | 起点 | 中点 | 终点 | 用途 |-| ---------- | --------- | --------- | --------- | --------------- |-| 封面渐变 | `#1E3A5F` | `#2E5C8E` | `#3D8B7A` | 封面/章节页背景 |-| 结束页渐变 | `#1E3A5F` | `#2E5C8E` | `#3D8B7A` | 结束页背景 |+| Name | Start | Middle | End | Usage |+| ---------------- | --------- | --------- | --------- | ---------------------- |+| Cover Gradient | `#1E3A5F` | `#2E5C8E` | `#3D8B7A` | Cover/chapter page BG |+| Ending Gradient | `#1E3A5F` | `#2E5C8E` | `#3D8B7A` | Ending page background |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**中文字体栈**: `"PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif`+**Chinese Font Stack**: `"PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif`-**英文字体栈**: `system-ui, -apple-system, sans-serif`+**English Font Stack**: `system-ui, -apple-system, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 | 行高 |-| ----- | ---------- | ---- | -------- | ---- |-| H1 | 封面主标题 | 52px | Bold | 1.2 |-| H2 | 页面主标题 | 32px | Bold | 1.3 |-| H3 | 章节副标题 | 24px | SemiBold | 1.3 |-| H4 | 卡片标题 | 20px | SemiBold | 1.4 |-| Body | 正文内容 | 18px | Regular | 1.5 |-| Small | 注释说明 | 14px | Regular | 1.4 |+| Level | Usage | Size | Weight | Line Height |+| ----- | ---------------- | ---- | -------- | ----------- |+| H1 | Cover main title | 52px | Bold | 1.2 |+| H2 | Page main title | 32px | Bold | 1.3 |+| H3 | Section subtitle | 24px | SemiBold | 1.3 |+| H4 | Card title | 20px | SemiBold | 1.4 |+| Body | Body content | 18px | Regular | 1.5 |+| Small | Annotations | 14px | Regular | 1.4 |-### 间距系统+### Spacing System-| 用途 | 间距值 |-| ---------- | ------------------------- |-| 基础单位 | 8px |-| 元素间距 | 16px / 24px / 32px / 48px |-| 段落间距 | 24px |-| 列表项间距 | 12px |-| 卡片内边距 | 24px |+| Usage | Value |+| ------------------ | ------------------------- |+| Base unit | 8px |+| Element spacing | 16px / 24px / 32px / 48px |+| Paragraph spacing | 24px |+| List item spacing | 12px |+| Card inner padding | 24px |----## 五、页面结构+## V. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ---------- | -------------------------- |-| **左装饰** | x=0, w=8px | 主导色垂直装饰条(内容页) |-| **顶部** | y=60-120 | 页面标题 + 英文副标题 |-| **分隔线** | y=125-130 | 装饰分隔线 |-| **内容区** | y=130-640 | 主要内容区域(510px高) |-| **页脚** | y=650-700 | 页码、章节信息 |+| Area | Position/Height | Description |+| ----------------- | --------------- | ------------------------------------ |+| **Left Accent** | x=0, w=8px | Dominant color vertical bar (content pages) |+| **Top** | y=60-120 | Page title + English subtitle |+| **Divider** | y=125-130 | Decorative divider line |+| **Content Area** | y=130-640 | Main content area (510px height) |+| **Footer** | y=650-700 | Page number, chapter info |-### 装饰设计+### Decorative Design-- **左侧装饰条**: 主导色 (`#2E5C8E`),宽度 8px,贯穿全页-- **分隔线**: 浅灰色 (`#E5E7EB`),宽度 1-2px-- **圆形装饰**: 低透明度圆形,用于章节页/封面背景+- **Left Accent Bar**: Dominant color (`#2E5C8E`), width 8px, spanning the full page height+- **Divider Line**: Light gray (`#E5E7EB`), width 1-2px+- **Circle Decorations**: Low-opacity circles for chapter page/cover backgrounds----## 六、页面类型--### 1. 封面页 (01_cover.svg)--- **背景**: 蓝绿渐变 (`#1E3A5F` → `#2E5C8E` → `#3D8B7A`)-- **装饰**: 可选背景图片(opacity=0.25)-- **标题区**: 居中,主标题 52px + 副标题 28px-- **英文标题**: 浅灰色,24px-- **装饰线**: 温暖橙色细线,200px 宽-- **底部**: 引言卡片(半透明背景 + 疗愈绿左边框)-- **标签**: 关键词标签(半透明胶囊)-- **页码**: 右下角,14px--### 2. 目录页 (02_toc.svg)--- **背景**: 云白 (`#F8FAFC`)-- **左装饰**: 主导色 8px 竖条-- **标题**: "内容概览" + "Contents Overview"-- **左侧**: 五章节列表(彩色编号方块 + 标题 + 描述)- - 章节1: 主导蓝 `#2E5C8E`- - 章节2: 疗愈绿 `#3D8B7A`- - 章节3: 温暖橙 `#E07843`- - 章节4: 冷漠灰蓝 `#64748B`- - 章节5: 创伤红 `#B54545`-- **右侧**: 学习目标卡片-- **中间**: 虚线分隔--### 3. 章节页 (02_chapter.svg)--- **背景**: 蓝绿渐变-- **装饰**: 多个低透明度同心圆、斜线装饰-- **大号编号**: 120px,半透明白色居中-- **章节标签**: 胶囊形状 "CHAPTER X"-- **标题**: 48px 白色粗体-- **副标题**: 24px 浅灰英文-- **装饰线**: 温暖橙色细线,200px-- **引言**: 半透明引言卡片-- **关键词**: 底部标签组-- **页码**: 右下角--### 4. 内容页 (03_content.svg)--- **背景**: 云白-- **左装饰**: 主导蓝 8px 竖条-- **标题区**: 主标题 28px + 英文副标题 16px-- **分隔线**: 标题下方装饰线-- **内容区**: 灵活布局(三栏/左右分栏/单栏)-- **卡片样式**:- - 白色背景 + 浅灰边框- - 圆角 12-16px- - 彩色顶部条 / 彩色左边框-- **底部提示**: 浅灰背景提示条(可选)-- **页码**: 右下角--### 5. 结束页 (04_ending.svg)--- **背景**: 蓝绿渐变-- **装饰**: 网络连接图(圆点 + 连线)-- **标题**: 主标题 56px + 副标题 28px-- **英文**: 浅灰英文标题-- **装饰线**: 温暖橙色细线,300px-- **信息区**: 半透明信息卡片-- **底部**: 版权信息+## VI. Page Types++### 1. Cover Page (01_cover.svg)++- **Background**: Blue-green gradient (`#1E3A5F` → `#2E5C8E` → `#3D8B7A`)+- **Decoration**: Optional background image (opacity=0.25)+- **Title Area**: Centered, main title 52px + subtitle 28px+- **English Title**: Light gray, 24px+- **Decorative Line**: Warm orange thin line, 200px wide+- **Bottom**: Quote card (semi-transparent background + healing green left border)+- **Tags**: Keyword tags (semi-transparent capsules)+- **Page Number**: Bottom-right, 14px++### 2. Table of Contents (02_toc.svg)++- **Background**: Cloud white (`#F8FAFC`)+- **Left Accent**: Dominant color 8px vertical bar+- **Title**: "Contents Overview"+- **Left Side**: Five-chapter list (colored number blocks + title + description)+ - Chapter 1: Dominant blue `#2E5C8E`+ - Chapter 2: Healing green `#3D8B7A`+ - Chapter 3: Warm orange `#E07843`+ - Chapter 4: Cool gray-blue `#64748B`+ - Chapter 5: Trauma red `#B54545`+- **Right Side**: Learning objectives card+- **Center**: Dashed divider++### 3. Chapter Page (02_chapter.svg)++- **Background**: Blue-green gradient+- **Decoration**: Multiple low-opacity concentric circles, diagonal line accents+- **Large Number**: 120px, semi-transparent white, centered+- **Chapter Label**: Capsule shape "CHAPTER X"+- **Title**: 48px white bold+- **Subtitle**: 24px light gray English+- **Decorative Line**: Warm orange thin line, 200px+- **Quote**: Semi-transparent quote card+- **Keywords**: Bottom tag group+- **Page Number**: Bottom-right++### 4. Content Page (03_content.svg)++- **Background**: Cloud white+- **Left Accent**: Dominant blue 8px vertical bar+- **Title Area**: Main title 28px + English subtitle 16px+- **Divider**: Decorative line below title+- **Content Area**: Flexible layout (three-column / left-right split / single column)+- **Card Styles**:+ - White background + light gray border+ - Border radius 12-16px+ - Colored top bar / colored left border+- **Bottom Tip**: Light gray background tip bar (optional)+- **Page Number**: Bottom-right++### 5. Ending Page (04_ending.svg)++- **Background**: Blue-green gradient+- **Decoration**: Network connection graph (dots + lines)+- **Title**: Main title 56px + subtitle 28px+- **English**: Light gray English title+- **Decorative Line**: Warm orange thin line, 300px+- **Info Area**: Semi-transparent info card+- **Bottom**: Copyright information----## 七、布局模式+## VII. Layout Patterns-### 7.1 三栏并列(对比/发现)+### 7.1 Three-Column Side-by-Side (Comparison/Findings)```-[卡片1: 360px] [间距: 40px] [卡片2: 360px] [间距: 40px] [卡片3: 360px]+[Card 1: 360px] [Gap: 40px] [Card 2: 360px] [Gap: 40px] [Card 3: 360px]```-- 每卡片: 彩色顶部条 + 图标 + 编号 + 标题 + 内容 + 底部标签-- 适用于: 三个发现、三种类型对比+- Each card: Colored top bar + icon + number + title + content + bottom tag+- Suitable for: Three findings, three-type comparisons-### 7.2 左右分栏+### 7.2 Left-Right Split```-[左栏: 560px] [间距: 60px] [右栏: 580px]+[Left Column: 560px] [Gap: 60px] [Right Column: 580px]```-- 左侧: 概念/理论-- 右侧: 应用/实践-- 适用于: 概念解释、治疗关系+- Left side: Concepts/theory+- Right side: Application/practice+- Suitable for: Concept explanations, therapeutic relationships-### 7.3 垂直堆叠(层级结构)+### 7.3 Vertical Stack (Hierarchical Structure)```┌─────────────────────────────────┐-│ 顶层:元认知 │+│ Top Layer: Metacognition │├─────────────────────────────────┤-│ 表征层 │+│ Representation Layer │├─────────────────────────────────┤-│ 情感层 │+│ Affective Layer │├─────────────────────────────────┤-│ 躯体层 │+│ Somatic Layer │└─────────────────────────────────┘```-- 适用于: 自我发展层级、理论框架+- Suitable for: Self-development hierarchy, theoretical frameworks-### 7.4 依恋类型四格+### 7.4 Attachment Type Quadrant-| 安全型 (绿) | 回避型 (灰蓝) |-| 矛盾型 (橙) | 混乱型 (红) |+| Secure (Green) | Avoidant (Gray-Blue) |+| Anxious-Ambivalent (Orange) | Disorganized (Red) |-- 各卡片使用对应的依恋类型配色+- Each card uses the corresponding attachment type color scheme----## 八、视觉元素规范+## VIII. Visual Element Specifications-### 8.1 卡片样式+### 8.1 Card Styles```xml-<!-- 标准信息卡片 -->+<!-- Standard info card --><rect rx="12" fill="#FFFFFF" stroke="#E5E7EB" stroke-width="1"/>-<!-- 强调卡片(带左边框) -->+<!-- Emphasis card (with left border) --><rect rx="12" fill="#FFFFFF"/><rect x="0" width="4" fill="#2E5C8E" rx="2"/>-<!-- 彩色顶部卡片 -->+<!-- Colored top card --><rect rx="16" fill="#FFFFFF" stroke="#E5E7EB" stroke-width="1"/>-<rect rx="16" width="100%" height="80" fill="#2E5C8E"/> <!-- 顶部色块 -->+<rect rx="16" width="100%" height="80" fill="#2E5C8E"/> <!-- Top color block -->```-### 8.2 编号方块+### 8.2 Number Blocks```xml<path fill="#2E5C8E" d="M8,0 H42 A8,8 0 0 1 50,8 V42 A8,8 0 0 1 42,50 H8 A8,8 0 0 1 0,42 V8 A8,8 0 0 1 8,0 Z"/><text x="25" y="33" font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle">1</text>```-### 8.3 标签样式+### 8.3 Tag Styles```xml-<!-- 胶囊标签 -->+<!-- Capsule tag --><path fill="#E0F2FE" d="M33,0 H107 A13,13 0 0 1 120,13 V13 A13,13 0 0 1 107,26 H33 A13,13 0 0 1 20,13 V13 A13,13 0 0 1 33,0 Z"/>-<text x="70" y="18" font-size="13" fill="#2E5C8E" text-anchor="middle">标签文字</text>+<text x="70" y="18" font-size="13" fill="#2E5C8E" text-anchor="middle">Tag Text</text>```-### 8.4 引言卡片+### 8.4 Quote Cards```xml-<!-- 半透明引言卡片 -->+<!-- Semi-transparent quote card --><path fill="#FFFFFF" fill-opacity="0.1" d="..."/>-<path fill="#3D8B7A" d="..." rx="2"/> <!-- 左侧装饰条 -->-<text font-style="italic" fill="#E5E7EB">引言内容</text>+<path fill="#3D8B7A" d="..." rx="2"/> <!-- Left accent bar -->+<text font-style="italic" fill="#E5E7EB">Quote content</text>```-### 8.5 分隔线+### 8.5 Divider Lines```xml<line x1="60" y1="Y" x2="1240" y2="Y" stroke="#E5E7EB" stroke-width="2"/>@@ -299,90 +299,90 @@----## 九、图标使用+## IX. Icon Usage-### 占位符格式+### Placeholder Format```xml<use data-icon="icon-name" x="X" y="Y" width="32" height="32" fill="COLOR"/>```-### 常用图标映射+### Common Icon Mappings-| 概念 | 图标 |-| --------- | ----------------------- |-| 依恋/联结 | `heart`, `link` |-| 安全基地 | `home`, `shield-check` |-| 心智化 | `brain`, `lightbulb` |-| 情感调节 | `activity`, `sliders` |-| 觉察 | `eye`, `compass` |-| 创伤 | `alert-triangle`, `zap` |-| 修复 | `refresh-cw`, `tool` |-| 发展 | `trending-up`, `layers` |+| Concept | Icons |+| -------------------- | ------------------------- |+| Attachment/Bonding | `heart`, `link` |+| Secure Base | `home`, `shield-check` |+| Mentalization | `brain`, `lightbulb` |+| Affect Regulation | `activity`, `sliders` |+| Awareness | `eye`, `compass` |+| Trauma | `alert-triangle`, `zap` |+| Repair | `refresh-cw`, `tool` |+| Development | `trending-up`, `layers` |----## 十、SVG 技术约束+## X. SVG Technical Constraints-### viewBox 规范+### viewBox Specification```xml<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">```-### 禁用功能(黑名单)+### Prohibited Features (Blocklist)-| 分类 | 禁用项 |-| ------------- | ------------------------------- |-| **裁剪/遮罩** | ❌ `clipPath`, `mask` |-| **样式系统** | ❌ `<style>`, `class`(`<defs>` 内 `id` 合法) |-| **结构/嵌套** | ❌ `<foreignObject>` |-| **文本/字体** | ❌ `textPath`, `@font-face` |-| **动画/交互** | ❌ `<animate*>`, `<set>`, `on*` |-| **标记/箭头** | ❌ `marker`, `marker-end` |+| Category | Prohibited Items |+| ------------------ | --------------------------------------- |+| **Clipping/Masking** | `clipPath`, `mask` |+| **Style System** | `<style>`, `class` (`id` inside `<defs>` is allowed) |+| **Structure/Nesting** | `<foreignObject>` |+| **Text/Font** | `textPath`, `@font-face` |+| **Animation/Interaction** | `<animate*>`, `<set>`, `on*` |+| **Markers/Arrows** | `marker`, `marker-end` |-### PPT 兼容性规则+### PPT Compatibility Rules-| ❌ 禁止 | ✅ 正确替代 |-| ------------------------------ | --------------------------------------------- |-| `fill="rgba(255,255,255,0.1)"` | `fill="#FFFFFF" fill-opacity="0.1"` |-| `stroke="rgba(0,0,0,0.5)"` | `stroke="#000000" stroke-opacity="0.5"` |-| `<g opacity="0.2">...</g>` | 每个子元素单独设置 `opacity` / `fill-opacity` |+| Prohibited | Correct Alternative |+| ---------------------------------- | ------------------------------------------------------ |+| `fill="rgba(255,255,255,0.1)"` | `fill="#FFFFFF" fill-opacity="0.1"` |+| `stroke="rgba(0,0,0,0.5)"` | `stroke="#000000" stroke-opacity="0.5"` |+| `<g opacity="0.2">...</g>` | Set `opacity` / `fill-opacity` on each child element individually |----## 十一、占位符规范--| 占位符 | 用途 |-| -------------------- | -------------- |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{TITLE_EN}}` | 英文标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}` | 章节标题 |-| `{{CHAPTER_EN}}` | 章节英文标题 |-| `{{QUOTE}}` | 引言内容 |-| `{{QUOTE_AUTHOR}}` | 引言作者 |-| `{{PAGE_NUM}}` | 页码 |-| `{{COVER_BG_IMAGE}}` | 封面背景图路径 |+## XI. Placeholder Specification++| Placeholder | Usage |+| -------------------- | -------------------- |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{TITLE_EN}}` | English title |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}` | Chapter title |+| `{{CHAPTER_EN}}` | Chapter English title |+| `{{QUOTE}}` | Quote content |+| `{{QUOTE_AUTHOR}}` | Quote author |+| `{{PAGE_NUM}}` | Page number |+| `{{COVER_BG_IMAGE}}` | Cover background image path |----## 十二、使用说明+## XII. Usage Notes-### 模板使用步骤+### Template Usage Steps-1. **复制模板**: 将模板文件复制到项目 `templates/` 目录-2. **替换占位符**: 使用实际内容替换 `{{}}` 占位符-3. **调整配色**: 根据主题微调配色方案-4. **生成内容**: 使用 Executor 角色生成具体页面-5. **后处理**: 运行 `finalize_svg.py` 完成图片嵌入+1. **Copy Template**: Copy template files to the project `templates/` directory+2. **Replace Placeholders**: Replace `{{}}` placeholders with actual content+3. **Adjust Colors**: Fine-tune the color scheme based on the theme+4. **Generate Content**: Use the Executor role to generate specific pages+5. **Post-process**: Run `finalize_svg.py` to complete image embedding-### 适用主题+### Applicable Topics-- 心理治疗与咨询-- 依恋理论研究-- 发展心理学-- 临床案例分析-- 学术培训讲座-- 心理学课程教学+- Psychotherapy and counseling+- Attachment theory research+- Developmental psychology+- Clinical case analysis+- Academic training lectures+- Psychology course instructiondiff --git a/skills/ppt-master/templates/layouts/smart_red/design_spec.md b/skills/ppt-master/templates/layouts/smart_red/design_spec.mdindex cd4b6381..0422332e 100644--- a/skills/ppt-master/templates/layouts/smart_red/design_spec.md+++ b/skills/ppt-master/templates/layouts/smart_red/design_spec.md@@ -1,162 +1,162 @@-# smart_red - 智慧红橙商务风格设计规范+# smart_red - Smart Red-Orange Business Style Design Specification-> 适用于科技企业介绍、教育行业解决方案、智慧校园建设方案等场景,风格现代、活力。+> Suitable for tech company introductions, education industry solutions, smart campus proposals, and similar scenarios. Modern and energetic style.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------ |-| **模板名称** | smart_red (智慧红橙商务风格) |-| **适用场景** | 企业介绍、产品发布、解决方案演示、教育行业课件 |-| **设计调性** | 现代、活力、专业、几何感 |-| **主题模式** | 混合主题(深色/彩色封面 + 浅色内容页) |+| Property | Description |+| -------------- | ---------------------------------------------------------- |+| **Template Name** | smart_red (Smart Red-Orange Business Style) |+| **Use Cases** | Company introductions, product launches, solution presentations, education industry courseware |+| **Design Tone** | Modern, energetic, professional, geometric |+| **Theme Mode** | Hybrid theme (dark/colorful cover + light content pages) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px || **viewBox** | `0 0 1280 720` |-| **安全边距** | 60px (左右), 50px (上下) |-| **内容区域** | x: 60-1220, y: 100-670 |-| **标题区域** | y: 50-100 |-| **网格基准** | 40px |+| **Safe Margins** | 60px (left/right), 50px (top/bottom) |+| **Content Area** | x: 60-1220, y: 100-670 |+| **Title Area** | y: 50-100 |+| **Grid Baseline** | 40px |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Value | Notes || ---------------- | ----------- | -------------------------------- |-| **主色 Red** | `#DE3545` | 品牌识别、标题装饰、几何切角 |-| **辅助色 Orange**| `#F0964D` | 几何点缀、渐变搭配 |-| **深色背景 Dark**| `#333333` | 封面背景、几何切角、深色页脚 |+| **Primary Red** | `#DE3545` | Brand identity, title decoration, geometric cutouts |+| **Auxiliary Orange** | `#F0964D` | Geometric accents, gradient pairing |+| **Dark Background** | `#333333` | Cover background, geometric cutouts, dark footer |-### 中性色+### Neutral Colors-| 角色 | 色值 | 用途 |+| Role | Value | Usage || -------------- | ----------- | ---------------------- |-| **浅灰背景** | `#F5F5F7` | 页面背景 |-| **边框灰** | `#E0E0E0` | 模块分割线、卡片边框 |-| **正文黑** | `#333333` | 标题及正文标准色 |-| **说明灰** | `#666666` | 副标题、注释文字 |-| **纯白** | `#FFFFFF` | 卡片背景 |+| **Light Gray Background** | `#F5F5F7` | Page background |+| **Border Gray** | `#E0E0E0` | Section dividers, card borders |+| **Body Black** | `#333333` | Standard color for titles and body text |+| **Description Gray** | `#666666` | Subtitles, annotation text |+| **Pure White** | `#FFFFFF` | Card background |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `Arial, "Helvetica Neue", "Microsoft YaHei", sans-serif`+**Font Stack**: `Arial, "Helvetica Neue", "Microsoft YaHei", sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| -------- | ---------------- | ------ | ------- |-| H1 | 封面主标题 | 60-80px| Bold |-| H2 | 页面标题 | 32-40px| Bold |-| H3 | 小节/卡片标题 | 24-28px| Bold |-| P | 正文内容 | 18-20px| Regular |-| Caption | 辅助说明 | 14-16px| Regular |+| Level | Usage | Size | Weight |+| -------- | ------------------ | ------- | ------- |+| H1 | Cover main title | 60-80px | Bold |+| H2 | Page title | 32-40px | Bold |+| H3 | Subsection/Card title | 24-28px | Bold |+| P | Body content | 18-20px | Regular |+| Caption | Supplementary text | 14-16px | Regular |----## 五、核心设计原则+## V. Core Design Principles-### 几何商务风格+### Geometric Business Style-1. **几何切角**: 封面、目录、过渡页使用大面积三角形切角设计。-2. **红黑对比**: 红色主色搭配深灰色块,营造专业且有冲击力的视觉效果。-3. **卡片式布局**: 内容页采用白色卡片承载内容,背景使用浅灰,增加层次感。-4. **留白**: 保持适度留白,避免信息过载。+1. **Geometric Cutouts**: Cover, table of contents, and transition pages use large triangular cutout designs.+2. **Red-Black Contrast**: Red primary color paired with dark gray blocks creates a professional and impactful visual.+3. **Card-Based Layout**: Content pages use white cards to hold content, with light gray backgrounds for added depth.+4. **Whitespace**: Maintain adequate whitespace to avoid information overload.-### 高级美化特性 (v2.0)+### Advanced Refinement Features (v2.0)-1. **多层几何叠加**: 主要三角形配合半透明小型三角形,增加视觉深度。-2. **阴影效果**: 文字阴影、卡片阴影、圆形阴影,提升立体感。-3. **双线装饰**: 装饰线采用双线样式(粗+细),更具设计感。-4. **微妙光晕**: 在内容区域后添加极淡的色彩光晕,增加高端感。-5. **纹理点缀**: 面板添加极淡的斜线纹理,增加质感。-6. **圆形阴影**: 目录编号圆形带阴影,暗示交互性。+1. **Multi-Layer Geometric Overlay**: Main triangles paired with semi-transparent smaller triangles for visual depth.+2. **Shadow Effects**: Text shadows, card shadows, and circle shadows for a 3D feel.+3. **Dual-Line Decoration**: Decorative lines use dual-line styles (thick + thin) for enhanced design appeal.+4. **Subtle Glow**: Ultra-faint color glow behind content areas for a premium feel.+5. **Texture Accents**: Panels with very faint diagonal line textures for added tactile quality.+6. **Circle Shadows**: Table of contents numbering circles with shadows to suggest interactivity.----## 六、页面结构+## VI. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0-80 | 导航栏/标题区 |-| **内容区** | y=100-660 | 主要内容区域(卡片/图示) |-| **页脚** | y=680 | 页码及版权信息 |+| Area | Position/Height | Description |+| ---------- | --------------- | -------------------------------------- |+| **Top** | y=0-80 | Navigation bar / Title area |+| **Content Area** | y=100-660 | Main content area (cards/diagrams) |+| **Footer** | y=680 | Page number and copyright information |-### 装饰设计+### Decorative Design-- **三角形切角**: 封面和封底的核心视觉元素。-- **侧边栏**: 目录页特有的左侧红色多边形面板。-- **顶部装饰条**: 内容页顶部的红色切角装饰。+- **Triangular Cutouts**: Core visual element of cover and back pages.+- **Sidebar**: Left-side red polygonal panel unique to the table of contents page.+- **Top Decoration Bar**: Red cutout decoration at the top of content pages.----## 七、页面类型+## VII. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- **背景**: 浅灰背景 `#F5F5F7`-- **左上角**: 红色大三角切角 (0,0 -> 350,0 -> 0,350)-- **左下角**: 深灰色三角切角 (0,720 -> 300,720 -> 0,420)-- **右下角**: 红色大三角切角 (1280,720 -> 1280,320 -> 880,720)-- **标题区**: 居中偏右显示主标题 `{{TITLE}}` 和副标题 `{{SUBTITLE}}`-- **信息区**: 底部显示汇报人 `{{AUTHOR}}` 和日期 `{{DATE}}`+- **Background**: Light gray background `#F5F5F7`+- **Top-Left**: Red large triangular cutout (0,0 -> 350,0 -> 0,350)+- **Bottom-Left**: Dark gray triangular cutout (0,720 -> 300,720 -> 0,420)+- **Bottom-Right**: Red large triangular cutout (1280,720 -> 1280,320 -> 880,720)+- **Title Area**: Main title `{{TITLE}}` and subtitle `{{SUBTITLE}}` displayed center-right+- **Info Area**: Presenter `{{AUTHOR}}` and date `{{DATE}}` displayed at bottom-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- **背景**: 浅灰背景 `#F5F5F7`-- **左侧**: 全高红色多边形面板 + "目录"大字-- **右侧**: 内容列表区域-- **目录项**: 垂直排列,使用圆形数字索引 (01, 02...)+- **Background**: Light gray background `#F5F5F7`+- **Left Side**: Full-height red polygonal panel + large "Contents" text+- **Right Side**: Content list area+- **TOC Items**: Vertically arranged with circular number indices (01, 02...)-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- **装饰**: 红色三角形呼应封面 (左上/右下)-- **中心**: 大号章节编号 `{{CHAPTER_NUM}}` + 章节标题 `{{CHAPTER_TITLE}}`-- **风格**: 简洁有力,色彩鲜明+- **Decoration**: Red triangles echoing the cover (top-left / bottom-right)+- **Center**: Large chapter number `{{CHAPTER_NUM}}` + chapter title `{{CHAPTER_TITLE}}`+- **Style**: Clean and impactful, vivid colors-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- **顶部**: 白色导航栏 + 右上角红色切角装饰 + 标题双三角装饰-- **背景**: 浅灰背景 `#F5F5F7`-- **标题**: 居左显示页面标题 `{{PAGE_TITLE}}`-- **内容**: `{{CONTENT_AREA}}` 使用白色卡片样式(圆角+描边)-- **页脚**: 包含版权信息和页码+- **Top**: White navigation bar + top-right red cutout decoration + title dual-triangle decoration+- **Background**: Light gray background `#F5F5F7`+- **Title**: Page title `{{PAGE_TITLE}}` displayed left-aligned+- **Content**: `{{CONTENT_AREA}}` uses white card style (rounded corners + border)+- **Footer**: Includes copyright information and page number-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- **布局**: 与封面完全呼应的三角布局(左上红、左下灰、右下红)-- **居中**: 显示感谢语 "谢谢观看"-- **底部**: 留白用于联系信息+- **Layout**: Triangular layout fully echoing the cover (top-left red, bottom-left gray, bottom-right red)+- **Center**: Thank-you message displayed+- **Bottom**: Whitespace reserved for contact information----## 八、常用组件+## VIII. Common Components-### 卡片样式+### Card Style```xml-<!-- 白色内容卡片 -->+<!-- White content card --><rect x="60" y="110" width="1160" height="540" rx="4" ry="4" fill="#FFFFFF" stroke="#E0E0E0" stroke-width="1" />```-### 目录圆形编号+### TOC Circular Numbering```xml<circle cx="40" cy="40" r="30" fill="#FFFFFF" stroke="#DE3545" stroke-width="2" />@@ -165,41 +165,41 @@----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules-1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(**严禁** `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`-7. 渐变使用 `<defs>` 定义+1. viewBox: `0 0 1280 720`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (**strictly no** `<foreignObject>`)+4. Use `fill-opacity` / `stroke-opacity` for transparency+5. Prohibited: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`+7. Define gradients using `<defs>`----## 十、占位符规范+## X. Placeholder Specification-| 占位符 | 说明 |+| Placeholder | Description || ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 演讲者/作者 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CONTENT_AREA}}` | 内容区域标识 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}`| 章节标题 |-| `{{PAGE_NUM}}` | 页码 |-| `{{TOC_ITEM_1}}` | 目录项 1 |-| `{{CLOSING_MESSAGE}}`| 结束语 |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Presenter/Author |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Page title |+| `{{CONTENT_AREA}}` | Content area identifier |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}`| Chapter title |+| `{{PAGE_NUM}}` | Page number |+| `{{TOC_ITEM_1}}` | TOC item 1 |+| `{{CLOSING_MESSAGE}}`| Closing message |----## 十一、使用说明+## XI. Usage Instructions-1. 复制本目录到项目目录。-2. 根据内容需求选择页面模板。-3. 修改 SVG 中的文本内容或替换图片。-4. 使用 `ppt-master` 工具生成 PPTX 文件。+1. Copy this directory to the project directory.+2. Select the appropriate page template based on content requirements.+3. Modify the text content in the SVG files or replace images.+4. Use the `ppt-master` tool to generate the PPTX file.diff --git "a/skills/ppt-master/templates/layouts/\344\270\255\345\233\275\347\224\265\345\273\272_\345\270\270\350\247\204/design_spec.md" "b/skills/ppt-master/templates/layouts/\344\270\255\345\233\275\347\224\265\345\273\272_\345\270\270\350\247\204/design_spec.md"index 0683b73d..d6ee84b4 100644--- "a/skills/ppt-master/templates/layouts/\344\270\255\345\233\275\347\224\265\345\273\272_\345\270\270\350\247\204/design_spec.md"+++ "b/skills/ppt-master/templates/layouts/\344\270\255\345\233\275\347\224\265\345\273\272_\345\270\270\350\247\204/design_spec.md"@@ -1,205 +1,205 @@-# 中国电建模板 (POWERCHINA Style) - 设计规范+# POWERCHINA (中国电建) Standard Template - Design Specification-> 适用于中国电力建设集团有限公司项目汇报、工程展示、商务洽谈、企业宣传等场景。+> Suitable for PowerChina (China Power Construction Corporation) project reports, engineering showcases, business negotiations, corporate promotion, and similar scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------------ |-| **模板名称** | 中国电建_常规(原 powerchina) |-| **适用场景** | 工程项目汇报、技术方案展示、商务洽谈、企业宣传、年度总结 |-| **设计调性** | 专业、稳重、国际化、央企风范 |-| **主题模式** | 亮色主题(白色背景 + 电建蓝强调色) |+| Property | Description |+| -------------- | ---------------------------------------------------------------- |+| **Template Name** | 中国电建_常规 (formerly powerchina) |+| **Use Cases** | Engineering project reports, technical proposal presentations, business negotiations, corporate promotion, annual summaries |+| **Design Tone** | Professional, composed, international, state-owned enterprise style |+| **Theme Mode** | Light theme (white background + POWERCHINA blue accent) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上 80px,下 40px |-| **内容安全区** | x: 60-1220, y: 80-680 |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Page Margins** | Left/Right 60px, Top 80px, Bottom 40px |+| **Safe Area** | x: 60-1220, y: 80-680 |----## 三、配色方案+## III. Color Scheme-### 主色系(电建品牌色)+### Primary Colors (POWERCHINA Brand Colors)-| 角色 | 色值 | 备注 |+| Role | Color Value | Notes || -------------- | ----------- | ---------------------------------- |-| **电建蓝** | `#00418D` | 主色调,标题栏、强调色块、装饰条 |-| **深邃蓝** | `#002B5C` | 章节页背景、渐变暗部 |-| **活力蓝** | `#0066CC` | 辅助强调、图表色 |-| **天际蓝** | `#4A90D9` | 装饰点缀、次级强调 |-| **背景白** | `#FFFFFF` | 页面主背景 |-| **辅助浅灰** | `#F4F6F8` | 非重点内容背景块 |+| **POWERCHINA Blue** | `#00418D` | Primary color for title bars, accent blocks, decorative bars |+| **Deep Blue** | `#002B5C` | Chapter page background, gradient dark end |+| **Vibrant Blue** | `#0066CC` | Secondary accent, chart colors |+| **Sky Blue** | `#4A90D9` | Decorative accents, tertiary emphasis |+| **Background White** | `#FFFFFF` | Main page background |+| **Auxiliary Light Gray** | `#F4F6F8` | Secondary content background blocks |-### 辅助色(中国红点缀)+### Auxiliary Colors (China Red Accents)-| 角色 | 色值 | 备注 |+| Role | Color Value | Notes || -------------- | ----------- | ---------------------------------- |-| **中国红** | `#C41E3A` | 重要数据强调、点缀装饰 |-| **金色** | `#C9A227` | 荣誉、成就展示 |+| **China Red** | `#C41E3A` | Key data emphasis, decorative accents |+| **Gold** | `#C9A227` | Honors, achievements display |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Color Value | Usage || -------------- | ----------- | ---------------------- |-| **主文字** | `#1A1A1A` | 正文、标题 |-| **白色文字** | `#FFFFFF` | 深色色块上的文字 |-| **辅助文字** | `#4A5568` | 置灰章节、辅助说明 |-| **浅色辅助** | `#718096` | 注释、页码、提示 |+| **Primary Text** | `#1A1A1A` | Body text, headings |+| **White Text** | `#FFFFFF` | Text on dark backgrounds |+| **Secondary Text** | `#4A5568` | Dimmed chapters, auxiliary descriptions |+| **Light Auxiliary** | `#718096` | Annotations, page numbers, hints |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", "SimHei", Arial, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", "SimHei", Arial, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| ---- | ---------------- | ---- | ------- |-| H1 | 封面主标题 | 48px | Bold |-| H2 | 页面大标题 | 28px | Bold |-| H3 | 模块标题/小标题 | 24px | Bold |-| P | 正文内容 | 18px | Regular |-| High | 强调数据 | 36px | Bold |-| Sub | 辅助说明 | 14px | Regular |+| Level | Usage | Size | Weight |+| ----- | ------------------ | ---- | ------- |+| H1 | Cover main title | 48px | Bold |+| H2 | Page heading | 28px | Bold |+| H3 | Section title / Subtitle | 24px | Bold |+| P | Body content | 18px | Regular |+| High | Emphasized data | 36px | Bold |+| Sub | Auxiliary notes | 14px | Regular |----## 五、页面结构+## V. Page Structure-### 通用布局+### Common Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0, h=6px | 电建蓝渐变横条,贯穿整页 |-| **标题栏** | y=30, h=50px | 章节序号块 + 标题文字 + 右上角Logo |-| **内容区** | y=100, h=560px | 主要内容区域 |-| **页脚** | y=680, h=40px | 页码、企业名称、底部装饰线 |+| Area | Position/Height | Description |+| ---------- | --------------- | -------------------------------------- |+| **Top** | y=0, h=6px | POWERCHINA blue gradient bar spanning full width |+| **Title Bar** | y=30, h=50px | Chapter number block + Title text + Top-right Logo |+| **Content** | y=100, h=560px | Main content area |+| **Footer** | y=680, h=40px | Page number, company name, bottom decorative line |----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 深蓝渐变背景 + 工程感斜线纹理-- 左侧品牌蓝装饰条-- 主标题 + 副标题(白色)-- 企业英文名称 POWERCHINA-- 底部红色装饰条+- Deep blue gradient background + engineering-style diagonal line texture+- Left-side brand blue decorative bar+- Main title + subtitle (white)+- Company English name POWERCHINA+- Bottom red decorative bar-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- 白色背景 + 左侧蓝色装饰区-- 最多支持5个章节-- 数字编号 + 竖线分隔设计-- 右侧可放置企业数据+- White background + left-side blue decorative area+- Supports up to 5 chapters+- Numbered items + vertical line separator design+- Right side can display corporate data-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深蓝色渐变背景-- 大号章节编号-- 章节标题 + 英文副标题-- 几何网格装饰+- Deep blue gradient background+- Large chapter number+- Chapter title + English subtitle+- Geometric grid decoration-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 标准导航栏-- 灵活内容区域-- 支持多种布局模式+- White background+- Standard navigation bar+- Flexible content area+- Supports multiple layout patterns-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 深蓝渐变背景-- 企业Logo区域-- 感谢语(中英文)-- 企业信息+- Deep blue gradient background+- Corporate Logo area+- Thank-you message (Chinese & English)+- Corporate information----## 七、布局模式(推荐)+## VII. Layout Patterns (Recommended)-### 1. 左右分栏 (Split Column)-- 经典图文混排,左文右图或左图右文。-- 分栏比例推荐 1:1 或 2:3。+### 1. Split Column+- Classic image-text mixed layout: left text / right image, or left image / right text.+- Recommended split ratio: 1:1 or 2:3.-### 2. 卡片阵列 (Card Grid)-- 3列或4列卡片布局,用于展示项目案例或荣誉资质。-- 卡片背景推荐使用辅助浅灰 `#F4F6F8`。+### 2. Card Grid+- 3-column or 4-column card layout for showcasing project cases or qualifications.+- Card background recommended: auxiliary light gray `#F4F6F8`.-### 3. 流程图 (Process)-- 横向时间轴或流程图,展示项目进度。-- 使用电建蓝作为主轴颜色,中国红标记关键节点。+### 3. Process Flow+- Horizontal timeline or flowchart for displaying project progress.+- POWERCHINA blue as the main axis color, China Red for key milestone markers.----## 八、间距规范+## VIII. Spacing Guidelines-| 属性 | 值 | 说明 |-| ------------ | ----- | ------------------------ |-| **基础单位** | 8px | 所有间距应为 8px 的倍数 |-| **模块间距** | 32px | 大模块之间的标准间距 |-| **卡片间距** | 24px | 卡片之间的间距 |-| **内部留白** | 24px | 卡片内部的 Padding |-| **文本行距** | 1.5 | 正文标准行距 |+| Property | Value | Description |+| -------------- | ----- | ------------------------ |+| **Base Unit** | 8px | All spacing should be multiples of 8px |+| **Module Gap** | 32px | Standard gap between major modules |+| **Card Gap** | 24px | Gap between cards |+| **Inner Padding** | 24px | Padding inside cards |+| **Line Height** | 1.5 | Standard body line height |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules-1. viewBox 固定为 `0 0 1280 720`-2. 背景必须包含全屏 `<rect>`-3. 文本换行使用 `<tspan>`-4. 透明度必须使用 `fill-opacity` / `stroke-opacity`-5. 箭头需使用 `<polygon>` 绘制,禁止 `marker`+1. viewBox fixed at `0 0 1280 720`+2. Background must include a full-screen `<rect>`+3. Text wrapping via `<tspan>`+4. Opacity must use `fill-opacity` / `stroke-opacity`+5. Arrows must use `<polygon>`, no `marker`-### 禁用元素 (黑名单)+### Forbidden Elements (Blacklist)-- `clipPath`, `mask` (裁剪/遮罩)-- `<style>`, `class` (样式表;`<defs>` 内 `id` 合法)-- `foreignObject` (外部对象)-- `textPath` (路径文本)-- `animate`, `animateTransform`, `set` (动画)+- `clipPath`, `mask` (clipping/masking)+- `<style>`, `class` (stylesheets; `id` within `<defs>` is allowed)+- `foreignObject` (foreign objects)+- `textPath` (text on path)+- `animate`, `animateTransform`, `set` (animations)-- `rgba()` 颜色格式 (必须用 hex + opacity)-- `<g opacity="...">` (组透明度,需单独设置)+- `rgba()` color format (must use hex + opacity)+- `<g opacity="...">` (group opacity — set individually on each element)----## 十、占位符规范--| 占位符 | 说明 |-| ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 汇报单位 |-| `{{PRESENTER}}` | 汇报人 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{PAGE_NUM}}` | 页码 |-| `{{DATE}}` | 日期 |-| `{{CHAPTER_TITLE}}`| 章节标题 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CONTENT_AREA}}` | 内容区域标识 |+## X. Placeholder Specification++| Placeholder | Description |+| -------------------- | ------------------ |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Presenting organization |+| `{{PRESENTER}}` | Presenter |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{PAGE_NUM}}` | Page number |+| `{{DATE}}` | Date |+| `{{CHAPTER_TITLE}}` | Chapter title |+| `{{PAGE_TITLE}}` | Page title |+| `{{CONTENT_AREA}}` | Content area identifier |----## 十一、使用说明(推荐)+## XI. Usage Notes (Recommended)-1. **Logo 适配**: 封面页和结束页使用反白 Logo,内容页右上角使用彩色或反白 Logo。-2. **图片资源**: 确保 template 目录下 `images/` 文件夹内包含必要的 Logo 文件。-3. **字体**: 推荐安装“微软雅黑”以获得最佳显示效果。+1. **Logo Adaptation**: Cover and ending pages use inverted (white) Logo; content page upper-right uses color or inverted Logo.+2. **Image Assets**: Ensure the `images/` folder under the template directory contains necessary Logo files.+3. **Fonts**: Recommend installing "Microsoft YaHei" for optimal display.diff --git "a/skills/ppt-master/templates/layouts/\344\270\255\345\233\275\347\224\265\345\273\272_\347\216\260\344\273\243/design_spec.md" "b/skills/ppt-master/templates/layouts/\344\270\255\345\233\275\347\224\265\345\273\272_\347\216\260\344\273\243/design_spec.md"index 6401d0fd..685497c1 100644--- "a/skills/ppt-master/templates/layouts/\344\270\255\345\233\275\347\224\265\345\273\272_\347\216\260\344\273\243/design_spec.md"+++ "b/skills/ppt-master/templates/layouts/\344\270\255\345\233\275\347\224\265\345\273\272_\347\216\260\344\273\243/design_spec.md"@@ -1,173 +1,173 @@-# 中国电建模板 v2 (POWERCHINA Modern) - 设计规范+# POWERCHINA (中国电建) Modern Template v2 - Design Specification-> 适用于中国电建重大项目汇报、国际业务展示、高端峰会路演、科技创新成果发布等场景。-> **v2.0 特性**: 融合现代工程美学与国际化视野,强调结构感、通透性与数字化表达。+> Suitable for POWERCHINA major project reports, international business showcases, high-end summit roadshows, technology innovation releases, and similar scenarios.+> **v2.0 Features**: Blends modern engineering aesthetics with an international perspective, emphasizing structural form, transparency, and digital expression.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------------ |-| **模板名称** | 中国电建_现代(原 powerchina_v2) |-| **适用场景** | 重大工程汇报、国际市场推介、科技成果展示、高端商务洽谈 |-| **设计调性** | **宏大叙事、现代精工、数字科技、国际视野** |-| **主题模式** | 深蓝科技渐变 + 精密网格纹理 |+| Property | Description |+| -------------- | ---------------------------------------------------------------- |+| **Template Name** | 中国电建_现代 (formerly powerchina_v2) |+| **Use Cases** | Major engineering reports, international market promotion, technology achievement showcases, high-end business negotiations |+| **Design Tone** | **Grand narrative, modern precision, digital tech, international vision** |+| **Theme Mode** | Deep blue tech gradient + precision grid texture |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 80px,上 100px,下 60px |-| **内容安全区** | x: 80-1200, y: 100-660 |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Page Margins** | Left/Right 80px, Top 100px, Bottom 60px |+| **Safe Area** | x: 80-1200, y: 100-660 |----## 三、配色方案+## III. Color Scheme-### 主色系(升级版)+### Primary Colors (Upgraded)-| 角色 | 色值 | 渐变方案 (SVG defs) | 备注 |-| -------------- | ----------- | -------------------------------- | ---------------------------------- |-| **电建蓝** | `#00418D` | `#00418D` -> `#072C61` | 品牌核心色,用于主背景、标题栏 |-| **科技蓝** | `#0066CC` | `#0066CC` -> `#0088FF` | 提亮色,用于图表、强调边框 |-| **深海蓝** | `#001F45` | N/A | 页面底色,营造深邃感 |-| **工程白** | `#FFFFFF` | N/A | 标题文字、反白图标 |+| Role | Color Value | Gradient (SVG defs) | Notes |+| -------------- | ----------- | ------------------------------ | ---------------------------------- |+| **POWERCHINA Blue** | `#00418D` | `#00418D` -> `#072C61` | Brand core color for main backgrounds, title bars |+| **Tech Blue** | `#0066CC` | `#0066CC` -> `#0088FF` | Highlight color for charts, accent borders |+| **Deep Sea Blue** | `#001F45` | N/A | Page base color for a deep, immersive feel |+| **Engineering White** | `#FFFFFF` | N/A | Title text, inverted icons |-### 辅助色(国之重器)+### Auxiliary Colors (National Strength)-| 角色 | 色值 | 用途 |+| Role | Color Value | Usage || -------------- | ----------- | ---------------------------------- |-| **中国红** | `#C41E3A` | 关键数据点睛、进度条指示 |-| **建筑灰** | `#E2E8F0` | 网格线、次级文字 |-| **光辉金** | `#FFD700` | 荣誉勋章、高光时刻 (Opacity 20%) |+| **China Red** | `#C41E3A` | Key data emphasis, progress bar indicators |+| **Architectural Gray** | `#E2E8F0` | Grid lines, secondary text |+| **Glorious Gold** | `#FFD700` | Honors, milestone highlights (Opacity 20%) |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**优先字体栈**: `"Microsoft YaHei", "PingFang SC", "Heiti SC", "Segoe UI", Arial, sans-serif`+**Primary Font Stack**: `"Microsoft YaHei", "PingFang SC", "Heiti SC", "Segoe UI", Arial, sans-serif`-### 字号层级 (强化对比)+### Font Size Hierarchy (Enhanced Contrast)-| 层级 | 用途 | 字号 | 字重 | 颜色 |-| ---- | ---------------- | ---- | ------- | ---------- |-| H1 | 封面主标题 | 60px | Bold | #FFFFFF |-| H2 | 页面大标题 | 36px | Bold | #00418D |-| H3 | 模块标题 | 24px | Bold | #1A202C |-| P | 正文内容 | 18px | Regular | #4A5568 |-| Num | 巨型装饰数字 | 120px| Bold | Opacity 5% |+| Level | Usage | Size | Weight | Color |+| ----- | ------------------ | ----- | ------- | ---------- |+| H1 | Cover main title | 60px | Bold | #FFFFFF |+| H2 | Page heading | 36px | Bold | #00418D |+| H3 | Section title | 24px | Bold | #1A202C |+| P | Body content | 18px | Regular | #4A5568 |+| Num | Giant decorative numbers | 120px | Bold | Opacity 5% |----## 五、页面结构+## V. Page Structure-### 通用导航栏 (y=0 to 100)+### Common Navigation Bar (y=0 to 100)-- **顶部蓝条**: 高度 8px,深蓝渐变。-- **Logo区域**: 右上角固定,配合白色底板。-- **标题组合**: 左上角,采用 **"标签式" (Tag Style)** 设计,模拟工程图纸标签。+- **Top Blue Bar**: 8px height, deep blue gradient.+- **Logo Area**: Fixed at upper-right corner with a white backing plate.+- **Title Group**: Upper-left corner using **"Tag Style"** design, simulating engineering drawing labels.----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)-- **视觉重心**: **"基石" (Foundation)** 概念。底部厚重深蓝支撑,顶部通透。-- **背景**: 叠加精密 **"经纬网格" (Geo Grid)**,象征全球布局。-- **排版**: 居中对称布局,彰显央企稳重感。+### 1. Cover Page (01_cover.svg)+- **Visual Focus**: **"Foundation"** concept. Heavy deep blue supporting the bottom, transparent top.+- **Background**: Overlaid with precision **"Geo Grid"** (latitude-longitude grid), symbolizing global presence.+- **Layout**: Center-symmetric layout, projecting state-owned enterprise gravitas.-### 2. 目录页 (02_toc.svg)-- **布局**: **"工程里程碑" (Milestones)**。横向时间轴或卡片连接,寓意项目推进。-- **元素**: 使用连接线和节点圆点,模拟电路或管网。+### 2. Table of Contents (02_toc.svg)+- **Layout**: **"Milestones"** style. Horizontal timeline or connected cards, representing project progression.+- **Elements**: Connection lines and node dots, simulating circuits or pipeline networks.-### 3. 章节页 (02_chapter.svg)-- **背景**: 深蓝科技感渐变,右侧大面积留白给透视网格。-- **数字**: 巨大的轮廓字 (Stroke Only),不仅是编号,更是建筑结构的一部分。+### 3. Chapter Page (02_chapter.svg)+- **Background**: Deep blue tech gradient; large whitespace on the right for perspective grid.+- **Numbers**: Giant outlined numbers (Stroke Only) — not just chapter numbers, but part of the architectural structure.-### 4. 内容页 (03_content.svg)-- **布局**: **"控制台" (Console)** 风格。顶部导航栏规整,内容区最大化。-- **细节**: 四角添加 **"瞄准框" (Corner Marks)**,增强精密感。+### 4. Content Page (03_content.svg)+- **Layout**: **"Console"** style. Orderly top navigation bar, maximized content area.+- **Details**: **"Corner Marks"** added at all four corners for a precision engineering feel.-### 5. 结束页 (04_ending.svg)-- **背景**: 呼应封面的"基石"结构。-- **元素**: 强化"合作共赢"概念,二维码/联系方式区域化展示。+### 5. Ending Page (04_ending.svg)+- **Background**: Echoes the cover's "Foundation" structure.+- **Elements**: Reinforces "win-win cooperation" concept with QR code / contact information displayed in zones.----## 七、布局模式(推荐)+## VII. Layout Patterns (Recommended)-### 1. 科技卡片 (Tech Cards)-- 带有微弱边框和 glowing 效果的卡片。-- 适合展示关键技术指标或创新成果。+### 1. Tech Cards+- Cards with subtle borders and a glowing effect.+- Ideal for showcasing key technical indicators or innovation achievements.-### 2. 数据仪表盘 (Dashboard)-- 结合图表和关键数据的组合布局。-- 使用科技蓝作为图表主色。+### 2. Dashboard+- Combined layout of charts and key data.+- Uses Tech Blue as the primary chart color.-### 3. 工程图解 (Blueprint)-- 利用经纬网格背景,通过线条和标注解释复杂结构。+### 3. Blueprint+- Leverages the Geo Grid background to explain complex structures through lines and annotations.----## 八、间距规范+## VIII. Spacing Guidelines-| 属性 | 值 | 说明 |-| ------------ | ----- | ------------------------ |-| **基础单位** | 4px | 精密设计使用 4px 网格 |-| **模块间距** | 40px | 宽大间距,增加呼吸感 |-| **卡片间距** | 20px | 紧凑但清晰的间距 |-| **内部留白** | 32px | 内容与边框的距离 |+| Property | Value | Description |+| -------------- | ----- | ------------------------ |+| **Base Unit** | 4px | Precision design uses a 4px grid |+| **Module Gap** | 40px | Generous spacing for breathing room |+| **Card Gap** | 20px | Compact yet clear spacing |+| **Inner Padding** | 32px | Distance between content and border |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules-1. **渐变**: 使用 `<linearGradient>` 营造金属质感或光影感。-2. **网格**: 使用 `<pattern>` 定义精细网格背景,Opacity 控制在 0.05-0.1。-3. **透明度**: 严格使用 `fill-opacity` / `stroke-opacity`。-4. **禁区**: 无 `clipPath`, `mask`。+1. **Gradients**: Use `<linearGradient>` to create metallic or light/shadow effects.+2. **Grid**: Use `<pattern>` to define precision grid backgrounds with opacity controlled at 0.05-0.1.+3. **Opacity**: Strictly use `fill-opacity` / `stroke-opacity`.+4. **Forbidden**: No `clipPath`, `mask`.-### 禁用元素 (黑名单)+### Forbidden Elements (Blacklist)-- `clipPath`, `mask` (裁剪/遮罩)-- `<style>`, `class` (样式表;`<defs>` 内 `id` 合法)-- `foreignObject` (外部对象)-- `textPath` (路径文本)-- `animate`, `animateTransform`, `set` (动画)+- `clipPath`, `mask` (clipping/masking)+- `<style>`, `class` (stylesheets; `id` within `<defs>` is allowed)+- `foreignObject` (foreign objects)+- `textPath` (text on path)+- `animate`, `animateTransform`, `set` (animations)-- `rgba()` 颜色格式 (必须用 hex + opacity)-- `<g opacity="...">` (组透明度,需单独设置)+- `rgba()` color format (must use hex + opacity)+- `<g opacity="...">` (group opacity — set individually on each element)----## 十、占位符规范+## X. Placeholder Specification-| 占位符 | 描述 |-| ------------------ | ------------------ |-| `{{TITLE}}` | 演示文稿主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 汇报单位 |-| `{{PRESENTER}}` | 汇报人 |-| `{{DATE}}` | 日期 |-| `{{CHAPTER_NUM}}` | 章节编号 (01, 02) |-| `{{PAGE_TITLE}}` | 内容页标题 |-| `{{STAT_1}}` | 统计数据1 |-| `{{CONTENT_AREA}}` | 内容区域标识 |+| Placeholder | Description |+| ------------------ | --------------------- |+| `{{TITLE}}` | Presentation main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Presenting organization |+| `{{PRESENTER}}` | Presenter |+| `{{DATE}}` | Date |+| `{{CHAPTER_NUM}}` | Chapter number (01, 02) |+| `{{PAGE_TITLE}}` | Content page title |+| `{{STAT_1}}` | Statistical data 1 |+| `{{CONTENT_AREA}}` | Content area identifier |----## 十一、使用说明(推荐)+## XI. Usage Notes (Recommended)-1. **Logo**: 推荐使用白色 PNG Logo 以适应深色背景。-2. **背景图**: 封面背景网格已嵌入 SVG,无需外部图片。-3. **字体**: 优先使用无衬线字体,英文推荐 Roboto 或 Arial。+1. **Logo**: Recommend using white PNG Logo to suit dark backgrounds.+2. **Background Images**: Cover background grid is embedded in SVG; no external images needed.+3. **Fonts**: Prefer sans-serif fonts; Roboto or Arial recommended for English text.diff --git "a/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\345\225\206\345\212\241/design_spec.md" "b/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\345\225\206\345\212\241/design_spec.md"index 4688dcf9..cdd3ba99 100644--- "a/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\345\225\206\345\212\241/design_spec.md"+++ "b/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\345\225\206\345\212\241/design_spec.md"@@ -1,162 +1,162 @@-# 中汽研模板 (CATARC Style) - 设计规范 (v2.0 优化版)+# CATARC (中汽研) Business Template - Design Specification (v2.0 Enhanced)-> 适用于中汽研产品认证、测评认证、技术展示、商务拜访等场景。-> **v2.0 更新**: 全面升级为现代科技商务风格,引入渐变、微光效果与几何装饰。+> Suitable for CATARC product certification, evaluation & certification, technology showcases, business visits, and similar scenarios.+> **v2.0 Update**: Fully upgraded to a modern tech-business style with gradients, subtle glow effects, and geometric decorations.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------ |-| **模板名称** | 中汽研_商务(原 zhongqiyan_v2) |-| **适用场景** | 产品认证展示、测评认证介绍、技术推介、高端商务汇报 |-| **设计调性** | **现代科技、权威专业、沉稳大气** |-| **主题模式** | 深蓝科技渐变 + 清爽白底内容页 |+| Property | Description |+| -------------- | ---------------------------------------------------------- |+| **Template Name** | 中汽研_商务 (formerly zhongqiyan_v2) |+| **Use Cases** | Product certification display, evaluation presentations, technology promotion, high-end business reporting |+| **Design Tone** | **Modern tech, authoritative & professional, composed & grand** |+| **Theme Mode** | Deep blue tech gradient + clean white content pages |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上 90px,下 50px |-| **内容安全区** | x: 60-1220, y: 90-670 |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Page Margins** | Left/Right 60px, Top 90px, Bottom 50px |+| **Safe Area** | x: 60-1220, y: 90-670 |----## 三、配色方案+## III. Color Scheme-### 核心色板+### Core Palette-| 角色 | 色值 | 渐变方案 (SVG defs) | 备注 |-| -------------- | ----------- | -------------------------------- | -------------------------------- |-| **主导深蓝** | `#003366` | `#003366` -> `#001F4D` | 品牌主色基调 |-| **科技亮蓝** | `#0050B3` | `#0050B3` -> `#007ACC` | 提亮装饰、渐变亮部 |-| **辅助冷灰** | `#F0F2F5` | N/A | 背景块、卡片底色 |-| **活力红** | `#D32F2F` | N/A | 强调点缀、警示 |-| **纯白** | `#FFFFFF` | N/A | 文字、反白图标 |+| Role | Color Value | Gradient (SVG defs) | Notes |+| -------------- | ----------- | ------------------------------ | -------------------------------- |+| **Primary Deep Blue** | `#003366` | `#003366` -> `#001F4D` | Brand primary tone |+| **Tech Bright Blue** | `#0050B3` | `#0050B3` -> `#007ACC` | Highlight decoration, gradient bright end |+| **Auxiliary Cool Gray** | `#F0F2F5` | N/A | Background blocks, card base |+| **Vibrant Red** | `#D32F2F` | N/A | Accent, emphasis, alerts |+| **Pure White** | `#FFFFFF` | N/A | Text, inverted icons |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Color Value | Usage || -------------- | ----------- | ---------------------- |-| **主标题/正文**| `#1F2937` | 深灰,用于白底正文 |-| **副文本** | `#6B7280` | 浅灰,用于说明文字 |-| **反白文字** | `#FFFFFF` | 深色背景上的文字 |-| **水印文字** | `#E5E7EB` | 极浅灰,用于背景大字 |+| **Headings/Body** | `#1F2937` | Dark gray for body text on white backgrounds |+| **Secondary Text** | `#6B7280` | Light gray for descriptions |+| **Inverted Text** | `#FFFFFF` | Text on dark backgrounds |+| **Watermark Text** | `#E5E7EB` | Very light gray for background text |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**优先字体栈**: `"Microsoft YaHei", "PingFang SC", "Heiti SC", "Segoe UI", Arial, sans-serif`+**Primary Font Stack**: `"Microsoft YaHei", "PingFang SC", "Heiti SC", "Segoe UI", Arial, sans-serif`-### 字号层级 (优化对比度)+### Font Size Hierarchy (Optimized Contrast)-| 层级 | 用途 | 字号 | 字重 | 颜色 |-| ---- | ---------------- | ---- | ------- | ---------- |-| H1 | 封面主标题 | 56px | Bold | #FFFFFF |-| H2 | 页面大标题 | 32px | Bold | #003366 |-| H3 | 模块标题 | 24px | Bold | #333333 |-| P | 正文内容 | 18px | Regular | #4B5563 |-| Num | 序号/装饰数字 | 80px+| Bold | Opacity 10%|+| Level | Usage | Size | Weight | Color |+| ----- | ------------------ | ---- | ------- | ---------- |+| H1 | Cover main title | 56px | Bold | #FFFFFF |+| H2 | Page heading | 32px | Bold | #003366 |+| H3 | Section title | 24px | Bold | #333333 |+| P | Body content | 18px | Regular | #4B5563 |+| Num | Decorative numbers | 80px+| Bold | Opacity 10%|----## 五、页面结构+## V. Page Structure-### 通用导航栏 (y=0 to 90)+### Common Navigation Bar (y=0 to 90)-- **顶部彩条**: 渐变蓝条,高度 6px。-- **Logo区域**: 右上角固定。-- **标题组合**: 左上角,包含章节序号(色块衬底)与页面标题。-- **装饰线**: 标题下方淡灰色细线,增加透气感。+- **Top Color Bar**: Gradient blue bar, 6px height.+- **Logo Area**: Fixed at upper-right corner.+- **Title Group**: Upper-left corner, includes chapter number (with colored block background) and page title.+- **Decorative Line**: Light gray thin line below the title for visual breathing room.----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)-- **视觉重心**: 左侧大面积留白或图片,右侧/底部深色科技感切割。-- **装饰**: 动态几何线条(Tech Lines),模拟光束感。-- **内容布局**: 标题左对齐或居中悬浮卡片式,增强层级感。+### 1. Cover Page (01_cover.svg)+- **Visual Focus**: Large whitespace or image on the left, dark tech-styled cutout on the right/bottom.+- **Decoration**: Dynamic geometric lines (Tech Lines), simulating light beam effects.+- **Content Layout**: Title left-aligned or centered floating card style for enhanced hierarchy.-### 2. 目录页 (02_toc.svg)-- **布局**: 卡片式列表。每章一个横向卡片,带有微阴影(模拟)。-- **数字**: 极大的半透明数字背景(01, 02...)增加设计感。+### 2. Table of Contents (02_toc.svg)+- **Layout**: Card-style list. Each chapter as a horizontal card with simulated subtle shadow.+- **Numbers**: Extra-large semi-transparent numbers in the background (01, 02...) for added design appeal.-### 3. 章节页 (02_chapter.svg)-- **背景**: 全屏深蓝径向渐变,营造沉浸感。-- **元素**: 中央聚合式排版,辅以放射状线条或圆环装饰。+### 3. Chapter Page (02_chapter.svg)+- **Background**: Full-screen deep blue radial gradient for an immersive feel.+- **Elements**: Center-focused typography with radiating lines or ring decorations.-### 4. 内容页 (03_content.svg)-- **布局**: 清爽白底,最大化内容展示区。-- **辅助**: 右下角添加极淡的Logo水印。+### 4. Content Page (03_content.svg)+- **Layout**: Clean white background, maximizing content display area.+- **Auxiliary**: Very faint Logo watermark in the lower-right corner.-### 5. 结束页 (04_ending.svg)-- **背景**: 呼应封面的深色调。-- **元素**: 居中感谢语,配以精致的联系方式排版。+### 5. Ending Page (04_ending.svg)+- **Background**: Echoes the cover's dark tone.+- **Elements**: Centered thank-you message with refined contact information layout.----## 七、布局模式(推荐)+## VII. Layout Patterns (Recommended)-### 1. 卡片式列表 (Card List)-- 宽卡片垂直排列,适合目录或要点陈述。-- 使用阴影模拟(如透明黑色矩形)增加浮动感。+### 1. Card List+- Wide cards arranged vertically, suitable for table of contents or key points.+- Use shadow simulation (e.g., semi-transparent black rectangles) for a floating effect.-### 2. 对比布局 (Contrast Layout)-- 左右分栏,左深右浅或左图右文,强调对比。+### 2. Contrast Layout+- Left-right split: left dark / right light, or left image / right text, emphasizing contrast.-### 3. 中心辐射 (Radial)-- 核心概念居中,四周环绕说明,适合章节页或总结页。+### 3. Radial Layout+- Core concept centered with surrounding explanations, suitable for chapter or summary pages.----## 八、间距规范+## VIII. Spacing Guidelines-| 属性 | 值 | 说明 |-| ------------ | ----- | ------------------------ |-| **基础单位** | 8px | 8px 栅格系统 |-| **模块间距** | 32px | 舒适的阅读间距 |-| **卡片间距** | 16px | 紧凑与关联感 |+| Property | Value | Description |+| -------------- | ----- | ------------------------ |+| **Base Unit** | 8px | 8px grid system |+| **Module Gap** | 32px | Comfortable reading gap |+| **Card Gap** | 16px | Compact with cohesion |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules-1. **渐变支持**: 使用 `<linearGradient>` 和 `<radialGradient>` 定义在 `<defs>` 中。-2. **阴影模拟**: PPT不支持 SVG滤镜阴影,使用**半透明黑色矩形 (`fill="#000000" fill-opacity="0.1"`)** 错位叠加来模拟卡片阴影。-3. **透明度**: 严格使用 `fill-opacity` / `stroke-opacity`。-4. **禁区**: 无 `clipPath`, `mask`。+1. **Gradient Support**: Use `<linearGradient>` and `<radialGradient>` defined within `<defs>`.+2. **Shadow Simulation**: PPT does not support SVG filter shadows. Use **semi-transparent black rectangles (`fill="#000000" fill-opacity="0.1"`)** with offset stacking to simulate card shadows.+3. **Opacity**: Strictly use `fill-opacity` / `stroke-opacity`.+4. **Forbidden**: No `clipPath`, `mask`.----## 十、占位符规范+## X. Placeholder Specification-| 占位符 | 描述 |-| ------------------ | ------------------ |-| `{{TITLE}}` | 演示文稿主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 汇报人/部门 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 内容页标题 |-| `{{CHAPTER_NUM}}` | 章节编号 (01, 02) |-| `{{LOGO_LARGE}}` | 封面/封底大Logo |-| `{{LOGO_HEADER}}` | 导航栏小Logo |+| Placeholder | Description |+| ------------------ | --------------------- |+| `{{TITLE}}` | Presentation main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Presenter / Department |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Content page title |+| `{{CHAPTER_NUM}}` | Chapter number (01, 02) |+| `{{LOGO_LARGE}}` | Cover/back page large Logo |+| `{{LOGO_HEADER}}` | Navigation bar small Logo |----## 十一、使用说明(推荐)+## XI. Usage Notes (Recommended)-1. **阴影处理**: 所有卡片阴影已通过矢量矩形模拟,不仅兼容性好,而且支持无损缩放。-2. **渐变**: 如需修改渐变色,请在 `<defs>` 区域调整 `stop-color`。-3. **Logo**: 建议使用透明底 PNG,对于深色背景页使用反白 Logo。+1. **Shadow Handling**: All card shadows are simulated via vector rectangles, ensuring good compatibility and lossless scaling.+2. **Gradients**: To modify gradient colors, adjust `stop-color` values in the `<defs>` section.+3. **Logo**: Recommend using transparent PNG. Use inverted (white) Logo for dark background pages.diff --git "a/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\345\270\270\350\247\204/design_spec.md" "b/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\345\270\270\350\247\204/design_spec.md"index 743d17ee..bb53c1b6 100644--- "a/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\345\270\270\350\247\204/design_spec.md"+++ "b/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\345\270\270\350\247\204/design_spec.md"@@ -1,210 +1,210 @@-# 中汽研模板 (CATARC Style) - 设计规范+# CATARC (中汽研) Standard Template - Design Specification-> 适用于中汽研产品认证、测评认证、技术展示、商务拜访等场景。+> Suitable for CATARC product certification, evaluation & certification, technology showcases, business visits, and similar scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------ |-| **模板名称** | 中汽研_常规(原 zhongqiyan) |-| **适用场景** | 产品认证展示、测评认证介绍、技术推介、商务拜访 |-| **设计调性** | 专业、权威、可信赖、咨询风格 |-| **主题模式** | 亮色主题(白色背景 + 深蓝强调色) |+| Property | Description |+| -------------- | ---------------------------------------------------------- |+| **Template Name** | 中汽研_常规 (formerly zhongqiyan) |+| **Use Cases** | Product certification display, evaluation presentations, technology promotion, business visits |+| **Design Tone** | Professional, authoritative, trustworthy, consulting style |+| **Theme Mode** | Light theme (white background + deep blue accent) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上 80px,下 40px |-| **内容安全区** | x: 60-1220, y: 80-680 |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Page Margins** | Left/Right 60px, Top 80px, Bottom 40px |+| **Safe Area** | x: 60-1220, y: 80-680 |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |+| Role | Color Value | Notes || -------------- | ----------- | -------------------------------- |-| **主导深蓝** | `#004098` | 标题栏、导航条、章节序号块、装饰条 |-| **背景白** | `#FFFFFF` | 页面主背景 |-| **辅助浅灰** | `#F5F5F5` | 非重点内容背景块 |-| **边框灰** | `#E0E0E0` | 分割线、边框 |-| **强调红** | `#CC0000` | 关键信息高亮 |+| **Primary Deep Blue** | `#004098` | Title bar, navigation bar, chapter number blocks, decorative bars |+| **Background White** | `#FFFFFF` | Main page background |+| **Auxiliary Light Gray** | `#F5F5F5` | Secondary content background blocks |+| **Border Gray** | `#E0E0E0` | Dividers, borders |+| **Accent Red** | `#CC0000` | Key information highlight |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Color Value | Usage || -------------- | ----------- | ---------------------- |-| **主文字** | `#333333` | 正文、标题 |-| **白色文字** | `#FFFFFF` | 深色色块上的文字 |-| **辅助文字** | `#666666` | 置灰章节、辅助说明 |-| **浅色辅助** | `#999999` | 注释、页码、提示 |+| **Primary Text** | `#333333` | Body text, headings |+| **White Text** | `#FFFFFF` | Text on dark backgrounds |+| **Secondary Text** | `#666666` | Dimmed chapters, auxiliary descriptions |+| **Light Auxiliary** | `#999999` | Annotations, page numbers, hints |-### 功能色+### Functional Colors-| 用途 | 色值 | 说明 |-| -------- | ----------- | -------------- |-| **成功** | `#4CAF50` | 通过/认证 |-| **警示** | `#CC0000` | 不合格/注意 |+| Usage | Color Value | Description |+| ---------- | ----------- | -------------- |+| **Success** | `#4CAF50` | Pass / Certified |+| **Warning** | `#CC0000` | Failed / Attention |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", "SimHei", Arial, Calibri, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", "SimHei", Arial, Calibri, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| ---- | ---------------- | ---- | ------- |-| H1 | 封面主标题 | 48px | Bold |-| H2 | 页面大标题 | 28px | Bold |-| H3 | 模块标题/小标题 | 24px | Bold |-| P | 正文内容 | 18px | Regular |-| High | 强调数据 | 36px | Bold |-| Sub | 辅助说明 | 14px | Regular |+| Level | Usage | Size | Weight |+| ----- | ------------------ | ---- | ------- |+| H1 | Cover main title | 48px | Bold |+| H2 | Page heading | 28px | Bold |+| H3 | Section title / Subtitle | 24px | Bold |+| P | Body content | 18px | Regular |+| High | Emphasized data | 36px | Bold |+| Sub | Auxiliary notes | 14px | Regular |----## 五、页面结构+## V. Page Structure-### 通用布局+### Common Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0, h=4px | 深蓝色横条,贯穿整页 |-| **标题栏** | y=30, h=50px | 章节序号块 + 标题文字 + 右上角Logo |-| **内容区** | y=100, h=560px | 主要内容区域 |-| **页脚** | y=680, h=40px | 页码(右对齐)、底部装饰线 |+| Area | Position/Height | Description |+| ---------- | --------------- | -------------------------------------- |+| **Top** | y=0, h=4px | Deep blue bar spanning full width |+| **Title Bar** | y=30, h=50px | Chapter number block + Title text + Top-right Logo |+| **Content** | y=100, h=560px | Main content area |+| **Footer** | y=680, h=40px | Page number (right-aligned), bottom decorative line |-### 导航栏设计+### Navigation Design-- **顶部装饰线**: 深蓝色 (`#004098`),高度 4px,贯穿整页-- **底部装饰线**: 深蓝色 (`#004098`),高度 4px,y=716-- **标题栏** (y=30):- - 章节序号块: 深蓝色正方形 (50×50px),白色数字/文字居中- - 标题文字: 距序号块 20px,28px 字号,`#333333`- - 右上角 Logo: 固定于 x=1107,尺寸 113×50px+- **Top Decorative Line**: Deep blue (`#004098`), height 4px, spanning full width+- **Bottom Decorative Line**: Deep blue (`#004098`), height 4px, y=716+- **Title Bar** (y=30):+ - Chapter number block: Deep blue square (50×50px), white number/text centered+ - Title text: 20px from number block, 28px font size, `#333333`+ - Top-right Logo: Fixed at x=1107, size 113×50px----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- 支持背景图(AI生成/用户提供)-- 半透明遮罩层增强文字可读性-- 居中大型Logo-- 主标题 + 副标题-- 单位名称(中英文)+- Supports background image (AI-generated / user-provided)+- Semi-transparent overlay for text readability+- Large centered Logo+- Main title + subtitle+- Organization name (Chinese & English)-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- 双竖线分隔符 `||` 设计-- 最多支持5个章节-- 左侧装饰竖线-- 右侧可选统计数据展示区+- Double vertical line `||` separator design+- Supports up to 5 chapters+- Left decorative vertical line+- Optional statistics display area on the right-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- 深蓝色渐变背景-- 大号章节编号-- 章节标题 + 英文副标题+- Deep blue gradient background+- Large chapter number+- Chapter title + English subtitle-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- 白色背景-- 标准导航栏-- 灵活内容区域-- 支持多种布局模式+- White background+- Standard navigation bar+- Flexible content area+- Supports multiple layout patterns-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- 深蓝色纯色背景-- 居中Logo-- 感谢语-- 单位信息+- Deep blue solid background+- Centered Logo+- Thank-you message+- Organization information----## 七、布局模式(推荐)+## VII. Layout Patterns (Recommended)-| 模式 | 适用场景 |-| ------------------ | -------------------------- |-| **单栏居中** | 封面、结语、重要观点 |-| **左右分栏 (5:5)** | 对比展示 |-| **左右分栏 (4:6)** | 图文混排 |-| **上下分栏** | 流程说明、标准列表 |-| **三栏卡片** | 项目列表 |-| **矩阵网格** | 分类展示 |-| **表格** | 数据对比、规范列表 |+| Pattern | Use Cases |+| -------------------- | ------------------------------ |+| **Single Column Center** | Cover, conclusion, key points |+| **Left-Right Split (5:5)** | Comparison display |+| **Left-Right Split (4:6)** | Image-text mixed layout |+| **Top-Bottom Split** | Process description, standards list |+| **Three-Column Cards** | Project listings |+| **Matrix Grid** | Category display |+| **Table** | Data comparison, specification lists |----## 八、间距规范+## VIII. Spacing Guidelines-| 元素 | 数值 |-| ------------ | ------ |-| 卡片间距 | 24px |-| 内容块间距 | 32px |-| 卡片内边距 | 24px |-| 卡片圆角 | 8px |-| 图标与文字 | 12px |+| Element | Value |+| -------------- | ------ |+| Card gap | 24px |+| Content block gap | 32px |+| Card padding | 24px |+| Card border radius | 8px |+| Icon-to-text gap | 12px |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(禁止 `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`-5. 禁止使用:`clipPath`、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`、`marker`/`marker-end`-7. 箭头使用 `<polygon>` 三角形替代 `<marker>`+2. Use `<rect>` elements for backgrounds+3. Text wrapping via `<tspan>` (no `<foreignObject>`)+4. Opacity via `fill-opacity` / `stroke-opacity`, no `rgba()`+5. Forbidden: `clipPath`, `mask`, `<style>`, `class`, `foreignObject`+6. Forbidden: `textPath`, `animate*`, `script`, `marker`/`marker-end`+7. Use `<polygon>` triangles for arrows instead of `<marker>`-### PPT 兼容性规则+### PPT Compatibility Rules-- 禁止 `<g opacity="...">`(组透明度),每个子元素单独设置-- 图片透明度使用遮罩层替代-- 仅使用内联样式,禁止外部 CSS 和 `@font-face`+- No `<g opacity="...">` (group opacity) — set opacity on each child element individually+- Use overlay layers for image transparency+- Inline styles only — no external CSS or `@font-face`----## 十、占位符规范+## X. Placeholder Specification-模板使用 `{{PLACEHOLDER}}` 格式的占位符,常用占位符:+Templates use `{{PLACEHOLDER}}` format. Common placeholders:-| 占位符 | 说明 |-| ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 作者/单位(中文) |-| `{{AUTHOR_EN}}` | 作者/单位(英文) |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{PAGE_NUM}}` | 页码 |-| `{{LOGO_LARGE}}` | 大型Logo文件名 |-| `{{LOGO_HEADER}}` | 页眉Logo文件名 |-| `{{COVER_BG_IMAGE}}`| 封面背景图文件名 |+| Placeholder | Description |+| -------------------- | ------------------ |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Author / Organization (Chinese) |+| `{{AUTHOR_EN}}` | Author / Organization (English) |+| `{{PAGE_TITLE}}` | Page title |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{PAGE_NUM}}` | Page number |+| `{{LOGO_LARGE}}` | Large Logo filename |+| `{{LOGO_HEADER}}` | Header Logo filename |+| `{{COVER_BG_IMAGE}}` | Cover background image filename |----## 十一、使用说明(推荐)+## XI. Usage Notes (Recommended)-1. **模板部署**: 复制模板到项目目录。-2. **资源替换**: 替换 `images` 目录中的 `大型 logo.png` (592×238) 和 `右上角 logo.png` (113×50)。-3. **内容生成**: 根据内容需求选择合适的页面模板,使用 `{{}}` 占位符替换内容。-4. **生成 SVG**: 通过自动化脚本生成最终 SVG 文件。+1. **Template Deployment**: Copy the template to your project directory.+2. **Asset Replacement**: Replace `大型 logo.png` (592×238) and `右上角 logo.png` (113×50) in the `images` directory.+3. **Content Generation**: Select appropriate page templates based on content needs, and replace content using `{{}}` placeholders.+4. **SVG Generation**: Generate final SVG files via automation scripts.diff --git "a/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\347\216\260\344\273\243/design_spec.md" "b/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\347\216\260\344\273\243/design_spec.md"index 9dfbd6a1..5e55c142 100644--- "a/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\347\216\260\344\273\243/design_spec.md"+++ "b/skills/ppt-master/templates/layouts/\344\270\255\346\261\275\347\240\224_\347\216\260\344\273\243/design_spec.md"@@ -1,166 +1,166 @@-# 中汽研模板 (CATARC Style) - 设计规范 (v3.0 Future Tech)+# CATARC (中汽研) Modern Template - Design Specification (v3.0 Future Tech)-> 适用于中汽研高端发布会、前瞻技术汇报、国际交流等场景。-> **v3.0 更新**: 引入"未来科技"设计语言,使用深邃蓝+霓虹青配色,强调空间感与光影流动。+> Suitable for CATARC high-end launches, forward-looking technology presentations, international exchanges, and similar scenarios.+> **v3.0 Update**: Introduces a "Future Tech" design language with deep blue + neon cyan palette, emphasizing spatial depth and flowing light effects.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------ |-| **模板名称** | 中汽研_现代(CATARC_Modern_Tech) |-| **适用场景** | 前瞻技术展示、战略发布、高端商务汇报 |-| **设计调性** | **未来感、科技、深邃、精致** |-| **主题模式** | 沉浸式深色封面/过渡页 + 清爽微灰内容页 |+| Property | Description |+| -------------- | ---------------------------------------------------------- |+| **Template Name** | 中汽研_现代 (CATARC_Modern_Tech) |+| **Use Cases** | Forward-looking technology showcases, strategic releases, high-end business reporting |+| **Design Tone** | **Futuristic, tech-forward, deep & refined** |+| **Theme Mode** | Immersive dark cover/transition pages + clean light-gray content pages |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 80px,上 100px,下 60px |-| **内容安全区** | x: 80-1200, y: 100-660 |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Page Margins** | Left/Right 80px, Top 100px, Bottom 60px |+| **Safe Area** | x: 80-1200, y: 100-660 |----## 三、配色方案+## III. Color Scheme-### 核心色板 (Future Tech Palette)+### Core Palette (Future Tech Palette)-| 角色 | 色值 | 渐变方案 (SVG defs) | 备注 |-| -------------- | ----------- | -------------------------------- | -------------------------------- |-| **深邃夜空** | `#001529` | `#001529` -> `#002B52` | 封面/过渡页主背景 |-| **科技蓝** | `#1890FF` | `#1890FF` -> `#096DD9` | 主视觉强调色 |-| **霓虹青** | `#00E5FF` | `#00E5FF` -> `#00B5D8` | 极亮色点缀,用于高光/数据 |-| **极昼灰** | `#F7F9FC` | N/A | 内容页背景 (非纯白,更护眼) |-| **暗夜黑** | `#1F2937` | N/A | 正文文字 |+| Role | Color Value | Gradient (SVG defs) | Notes |+| -------------- | ----------- | ------------------------------ | -------------------------------- |+| **Deep Night Sky** | `#001529` | `#001529` -> `#002B52` | Cover/transition page main background |+| **Tech Blue** | `#1890FF` | `#1890FF` -> `#096DD9` | Primary visual accent |+| **Neon Cyan** | `#00E5FF` | `#00E5FF` -> `#00B5D8` | Ultra-bright accent for highlights/data |+| **Polar Gray** | `#F7F9FC` | N/A | Content page background (not pure white, easier on eyes) |+| **Dark Night** | `#1F2937` | N/A | Body text |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |+| Role | Color Value | Usage || -------------- | ----------- | ---------------------- |-| **主标题(深)** | `#FFFFFF` | 深色背景上的主标题 |-| **主标题(浅)** | `#001529` | 浅色背景上的主标题 |-| **正文** | `#374151` | 内容页正文 |-| **次级文本** | `#6B7280` | 辅助说明 |-| **装饰字** | `#E5E7EB` | 极浅水印字 |+| **Heading (Dark BG)** | `#FFFFFF` | Main title on dark backgrounds |+| **Heading (Light BG)** | `#001529` | Main title on light backgrounds |+| **Body Text** | `#374151` | Content page body text |+| **Secondary Text** | `#6B7280` | Auxiliary descriptions |+| **Decorative Text** | `#E5E7EB` | Very light watermark text |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**优先字体栈**: `"Roboto", "Helvetica Neue", "Microsoft YaHei", "PingFang SC", sans-serif`-*英文数字推荐使用 Roboto 或 Arial 以体现科技几何感。*+**Primary Font Stack**: `"Roboto", "Helvetica Neue", "Microsoft YaHei", "PingFang SC", sans-serif`+*English and numbers are recommended to use Roboto or Arial for a tech geometric feel.*-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 | 颜色 |-| ---- | ---------------- | ---- | ------- | ---------- |-| H1 | 封面主标题 | 64px | Bold | #FFFFFF |-| H2 | 页面大标题 | 36px | Bold | #001529 |-| H3 | 模块标题 | 24px | Bold | #1890FF |-| P | 正文内容 | 18px | Regular | #374151 |-| Deco | 装饰性大数字 | 120px| Bold | Opacity 5% |+| Level | Usage | Size | Weight | Color |+| ----- | ------------------ | ----- | ------- | ---------- |+| H1 | Cover main title | 64px | Bold | #FFFFFF |+| H2 | Page heading | 36px | Bold | #001529 |+| H3 | Section title | 24px | Bold | #1890FF |+| P | Body content | 18px | Regular | #374151 |+| Deco | Decorative large numbers | 120px | Bold | Opacity 5% |----## 五、页面结构 (Asymmetric Tech Layout)+## V. Page Structure (Asymmetric Tech Layout)-### 通用导航栏 (y=0 to 100)+### Common Navigation Bar (y=0 to 100)-- **非对称设计**: 标题左对齐,但增加左侧几何装饰条。-- **Logo**: 悬浮于右上角,带微弱发光效果。-- **装饰**: 顶部仅在右侧保留一抹亮色线条,打破平衡。+- **Asymmetric Design**: Title left-aligned with a geometric decorative bar on the left.+- **Logo**: Floating in the upper-right corner with a subtle glow effect.+- **Decoration**: Top area retains only a splash of bright color line on the right side, breaking visual balance.----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)-- **视觉重心**: **深邃空间感**。背景使用深蓝径向渐变。-- **Hero Element**: 右侧使用抽象的 **"光之流线" (Luminous Flow)** 或 **"数字矩阵" (Digital Matrix)**。-- **标题**: 左下对齐,强调厚重的字体和霓虹色下划线。+### 1. Cover Page (01_cover.svg)+- **Visual Focus**: **Deep spatial depth**. Background uses a deep blue radial gradient.+- **Hero Element**: Right side features abstract **"Luminous Flow"** or **"Digital Matrix"** graphics.+- **Title**: Bottom-left aligned, emphasizing bold typography with a neon-colored underline.-### 2. 目录页 (02_toc.svg)-- **布局**: **左黑右白 (Split Screen)**。-- **左侧**: 深色区域放置 "CONTENTS" 和 Logo。-- **右侧**: 浅色区域放置目录项。摒弃卡片,改用 **"时间轴" (Timeline)** 或 **"悬浮列表"** 样式。-- **序号**: 使用霓虹青色 (`#00E5FF`) 高亮。+### 2. Table of Contents (02_toc.svg)+- **Layout**: **Split Screen (left dark, right light)**.+- **Left Side**: Dark area containing "CONTENTS" and Logo.+- **Right Side**: Light area with TOC items. Replaces cards with **"Timeline"** or **"Floating List"** style.+- **Numbers**: Highlighted in neon cyan (`#00E5FF`).-### 3. 章节页 (02_chapter.svg)-- **背景**: 深色背景。-- **特效**: 巨大的镂空数字背景 (Stroke Text)。-- **动感**: 增加倾斜的装饰线,模拟速度感。+### 3. Chapter Page (02_chapter.svg)+- **Background**: Dark background.+- **Special Effect**: Large outlined numbers in the background (Stroke Text).+- **Dynamism**: Added tilted decorative lines to simulate a sense of speed.-### 4. 内容页 (03_content.svg)-- **背景**: 极浅灰 `#F7F9FC`。-- **Header**: 悬浮式标题栏,增加层级感。-- **Watermark**: 右下角放置科技感的几何图形水印。+### 4. Content Page (03_content.svg)+- **Background**: Very light gray `#F7F9FC`.+- **Header**: Floating title bar for enhanced hierarchy.+- **Watermark**: Tech-styled geometric watermark in the lower-right corner.-### 5. 结束页 (04_ending.svg)-- **背景**: 呼应封面。-- **中心**: 简约的 "Thank You",辅以环绕的光圈装饰。+### 5. Ending Page (04_ending.svg)+- **Background**: Echoes the cover.+- **Center**: Minimalist "Thank You" with surrounding halo ring decoration.----## 七、布局模式(推荐)+## VII. Layout Patterns (Recommended)-### 1. 悬浮时间轴 (Floating Timeline)-- 利用右侧空间展示时间或流程。-- 节点使用 neon glowing effect。+### 1. Floating Timeline+- Uses right-side space for time or process display.+- Nodes feature a neon glowing effect.-### 2. HUD 数据展示 (HUD Display)-- 模拟抬头显示器风格,使用细线框和高亮数字展示关键 KPI。+### 2. HUD Display+- Simulates a heads-up display style using thin wireframes and highlighted numbers for key KPIs.-### 3. 不对称对比 (Asymmetric Contrast)-- 利用页面非对称结构,创造动感的图文排版。+### 3. Asymmetric Contrast+- Leverages the page's asymmetric structure to create dynamic image-text layouts.----## 八、间距规范+## VIII. Spacing Guidelines-| 属性 | 值 | 说明 |-| ------------ | ----- | ------------------------ |-| **基础单位** | 8px | 科技感通常使用 8px 栅格 |-| **模块间距** | 48px | 极为宽敞的现代感 |-| **行距** | 1.6 | 增加行距提升可读性 |+| Property | Value | Description |+| -------------- | ----- | ------------------------ |+| **Base Unit** | 8px | Tech designs typically use an 8px grid |+| **Module Gap** | 48px | Extra spacious for a modern feel |+| **Line Height** | 1.6 | Increased line height for readability |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules-1. **混合模式**: 尽量避免 `mix-blend-mode`,使用透明度 (`opacity`) 替代。-2. **渐变**: 多用 `linearGradient` 有角度的渐变 (e.g., `x1="0%" y1="0%" x2="100%" y2="50%"`) 制造光影。-3. **描边**: 使用细的 `stroke-width="1"` 加上低透明度 `stroke-opacity="0.2"` 模拟玻璃边缘。+1. **Blend Modes**: Avoid `mix-blend-mode` wherever possible; use `opacity` as a substitute.+2. **Gradients**: Leverage angled `linearGradient` (e.g., `x1="0%" y1="0%" x2="100%" y2="50%"`) to create light and shadow effects.+3. **Strokes**: Use thin `stroke-width="1"` with low transparency `stroke-opacity="0.2"` to simulate glass edges.----## 十、占位符规范+## X. Placeholder Specification-| 占位符 | 描述 |-| ------------------ | ------------------ |-| `{{TITLE}}` | 演示文稿主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 汇报单位 |-| `{{PRESENTER}}` | 汇报人 |-| `{{DATE}}` | 日期 |-| `{{CHAPTER_NUM}}` | 章节编号 (01, 02) |-| `{{PAGE_TITLE}}` | 内容页标题 |-| `{{STAT_1}}` | 统计数据1 |+| Placeholder | Description |+| ------------------ | --------------------- |+| `{{TITLE}}` | Presentation main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Presenting organization |+| `{{PRESENTER}}` | Presenter |+| `{{DATE}}` | Date |+| `{{CHAPTER_NUM}}` | Chapter number (01, 02) |+| `{{PAGE_TITLE}}` | Content page title |+| `{{STAT_1}}` | Statistical data 1 |----## 十一、使用说明(推荐)+## XI. Usage Notes (Recommended)-1. **光影效果**: 所有的光影均由 SVG 渐变实现,不依赖外部图片。-2. **字体**: 为获得最佳科技感,数字建议强制使用 **Roboto** 或 **DIN** 字体。-3. **背景**: 深色背景在投影仪上效果极佳,但需注意环境光尽可能暗。+1. **Light & Shadow Effects**: All light and shadow effects are achieved via SVG gradients, with no dependency on external images.+2. **Fonts**: For optimal tech aesthetics, numbers are recommended to use **Roboto** or **DIN** fonts.+3. **Backgrounds**: Dark backgrounds look excellent on projectors, but ensure the ambient lighting is as dim as possible.diff --git "a/skills/ppt-master/templates/layouts/\346\213\233\345\225\206\351\223\266\350\241\214/design_spec.md" "b/skills/ppt-master/templates/layouts/\346\213\233\345\225\206\351\223\266\350\241\214/design_spec.md"index 3424be5b..2f4f92f9 100644--- "a/skills/ppt-master/templates/layouts/\346\213\233\345\225\206\351\223\266\350\241\214/design_spec.md"+++ "b/skills/ppt-master/templates/layouts/\346\213\233\345\225\206\351\223\266\350\241\214/design_spec.md"@@ -1,208 +1,208 @@-# 招商银行 - 设计规范 v2.0+# China Merchants Bank (招商银行) - Design Specification v2.0-> 适用于招商银行及金融机构的高端工作汇报、业务展示、年度报告、VIP客户服务等场景。+> Suitable for China Merchants Bank and financial institutions' high-end work reports, business showcases, annual reports, VIP client services, and similar scenarios.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------ |-| **模板名称** | 招商银行 |-| **适用场景** | 高端工作汇报、业务展示、年度报告、产品推介 |-| **设计调性** | 极简轻奢、精致、多层次、现代金融 |-| **主题模式** | 亮色主题(微纹理背景 + 招行红/金精细装饰) |+| Property | Description |+| -------------- | ---------------------------------------------------------- |+| **Template Name** | 招商银行 |+| **Use Cases** | High-end work reports, business showcases, annual reports, product promotion |+| **Design Tone** | Minimalist luxury, refined, multi-layered, modern finance |+| **Theme Mode** | Light theme (subtle textured background + CMB red/gold refined accents) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |+| Property | Value || -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **安全边距** | 40px (左右), 35px (上下) |-| **内容安全区** | x: 40-1240, y: 70-665 |-| **网格基准** | 40px |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Safe Margins** | 40px (left/right), 35px (top/bottom) |+| **Safe Area** | x: 40-1240, y: 70-665 |+| **Grid Base** | 40px |----## 三、配色方案+## III. Color Scheme-### 核心色系+### Core Colors-| 角色 | 色值 | 备注 |+| Role | Color Value | Notes || ---------------- | ----------- | -------------------------------- |-| **招行红 Red** | `#C41230` | 品牌主色,用于强调、标题条 |-| **辅助金 Gold** | `#C9A962` | 奢华质感色,用于双线边框、装饰 |-| **深红 DarkRed** | `#9A0E26` | 深邃背景色,提升画面层次 |-| **背景白** | `#FFFFFF` | 卡片及高亮区域背景 |-| **微纹理白** | `#FAFAFA` | 极淡背景色,避免纯白刺眼 |-| **暖灰装饰** | `#F8F6F3` | 底部装饰条、卡片背景 |+| **CMB Red** | `#C41230` | Brand primary, used for accents, title bars |+| **Auxiliary Gold** | `#C9A962` | Luxury accent for double-line borders, decorations |+| **Dark Red** | `#9A0E26` | Deep background color for added depth |+| **Background White** | `#FFFFFF` | Card and highlight area backgrounds |+| **Subtle Texture White** | `#FAFAFA` | Very light background to avoid harsh pure white |+| **Warm Gray Accent** | `#F8F6F3` | Bottom decorative bars, card backgrounds |-### 安全区定位点 (新版极简装饰)+### Safe Area Anchor Points (New Minimalist Decoration)```xml-<!-- 四角定位点(替代旧版卡片边框) -->+<!-- Four-corner anchor points (replacing legacy card borders) --><path d="M40 140 L50 140 M40 140 L40 150" stroke="#C9A962" stroke-width="1" stroke-opacity="0.5" /><path d="M1240 140 L1230 140 M1240 140 L1240 150" stroke="#C9A962" stroke-width="1" stroke-opacity="0.5" />```----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", Arial, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", Arial, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| -------- | ---------------- | ------ | ------- |-| H1 | 封面主标题 | 52px | Bold |-| H2 | 页面标题 | 24-28px| Bold |-| H3 | 章节标题 | 52px | Bold |-| H4 | 小节/卡片标题 | 20-22px| Bold |-| P | 正文内容 | 16-18px| Regular |-| Caption | 辅助说明 | 12-14px| Regular |-| Number | 章节编号 | 320px | Bold (Low Opacity) |+| Level | Usage | Size | Weight |+| -------- | ------------------ | ------- | ------- |+| H1 | Cover main title | 52px | Bold |+| H2 | Page title | 24-28px | Bold |+| H3 | Chapter title | 52px | Bold |+| H4 | Subsection / Card title | 20-22px | Bold |+| P | Body content | 16-18px | Regular |+| Caption | Auxiliary notes | 12-14px | Regular |+| Number | Chapter number | 320px | Bold (Low Opacity) |----## 五、页面结构+## V. Page Structure-### 通用布局+### Common Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **页眉** | y=0-75 | 红底金线,左上角圆环装饰 |-| **观点条** | y=95-120 | (内容页) 极简红线引导 + 文字 |-| **内容区** | y=140-650 | 开放式布局,无固定边框 |-| **页脚** | y=665+ | 页码、版权、机构名称 |+| Area | Position/Height | Description |+| ---------- | --------------- | -------------------------------------- |+| **Header** | y=0-75 | Red background with gold lines, top-left ring decoration |+| **Key Message Bar** | y=95-120 | (Content pages) Minimalist red line guide + text |+| **Content** | y=140-650 | Open layout with no fixed borders |+| **Footer** | y=665+ | Page number, copyright, institution name |-### 核心装饰设计 (Design DNA)+### Core Decorative Design (Design DNA)-1. **精致双线**: 1px 主线 + 3px 辅线的组合,模拟高端印刷工艺。-2. **多层同心圆**: 招行向日葵的抽象表达,增加视觉深度。-3. **微点阵纹理**: 极小圆点组成的阵列,增加画面的呼吸感。-4. **菱形分割**: 标题分割处使用菱形装饰,体现精致感。+1. **Refined Double Lines**: 1px main line + 3px auxiliary line combination, simulating high-end print craftsmanship.+2. **Multi-Layer Concentric Circles**: Abstract representation of CMB's sunflower logo, adding visual depth.+3. **Micro Dot-Matrix Texture**: Arrays of tiny dots for added visual breathing room.+4. **Diamond Dividers**: Diamond-shaped decorations at title division points for a refined touch.----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- **背景**: 白色主背景 + 底部暖灰装饰带。-- **顶部**: 红色横条 + 金色双线。-- **装饰**: 左上角多层圆环,右侧边缘垂直装饰线。-- **标题区**: 居中布局,带有圆角边框和菱形分割线。+- **Background**: White main background + bottom warm gray decorative band.+- **Top**: Red horizontal bar + gold double lines.+- **Decoration**: Multi-layer concentric rings at top-left, vertical decorative lines at right edge.+- **Title Area**: Centered layout with rounded border and diamond divider line.-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- **页眉**: 固定“目录 / CONTENTS”标题。-- **列表**: 左右双栏**清单式布局**(无背景卡片)。-- **设计**: 采用“大号红字编号 + 标题 + 金色下划线”组合,适应性强。-- **装饰**: 左侧带有纵向线条和装饰文字 Index。+- **Header**: Fixed "目录 / CONTENTS" title.+- **List**: Left-right dual-column **checklist layout** (no background cards).+- **Design**: Uses "large red number + title + gold underline" combination for strong adaptability.+- **Decoration**: Left side features vertical lines and decorative "Index" text.-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- **背景**: 全屏深红色背景 (`#9A0E26`)。-- **视觉中心**: 左侧金色竖条与标题组合。-- **右侧**: 复杂的金色横条阶梯效果 + 对角线纹理。-- **背景字**: 巨大的半透明章节数字。+- **Background**: Full-screen dark red background (`#9A0E26`).+- **Visual Center**: Left-side gold vertical bar with title combination.+- **Right Side**: Complex gold horizontal bar staircase effect + diagonal line texture.+- **Background Text**: Giant semi-transparent chapter numbers.-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- **布局**: **全开放式布局**,移除中心边框,最大化内容展示区。-- **核心观点**: 顶部以极简的左侧红线+文字呈现,弱化视觉干扰。-- **界定**: 仅在四角保留极淡的“安全区定位点”。-- **页脚**: 包含数据来源、页码及章节名称。+- **Layout**: **Fully open layout**, removing center borders to maximize content display area.+- **Key Message**: Top area presented with minimalist left-side red line + text, reducing visual distraction.+- **Boundary**: Only very faint "safe area anchor points" retained at four corners.+- **Footer**: Contains data source, page number, and chapter name.-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- **呼应**: 布局与封面页高度一致,形成首尾闭环。-- **联系信息**: 底部设有宽大的联系信息卡片。-- **装饰**: 左右对称的多层金色圆环。+- **Echo**: Layout closely mirrors the cover page, creating a cohesive bookend.+- **Contact Info**: Wide contact information card at the bottom.+- **Decoration**: Symmetrical multi-layer gold concentric rings on left and right.----## 七、布局模式(推荐)+## VII. Layout Patterns (Recommended)-### 1. 核心观点型 (Key Message Layout)-- 使用顶部的灰色观点条展示一句话核心结论。-- 下方配合单个大图表或大字强调。+### 1. Key Message Layout+- Use the top gray message bar to present a one-sentence key conclusion.+- Pair with a single large chart or emphasized text below.-### 2. 卡片阵列型 (Card Grid)-- 利用内容区的白色背景,放置 2x2 或 3x2 的数据卡片。-- 每个卡片建议使用 `#FDF2F4` (浅红) 或 `#F8F6F3` (暖灰) 背景。+### 2. Card Grid+- Place 2x2 or 3x2 data cards within the white content area.+- Recommended card backgrounds: `#FDF2F4` (light red) or `#F8F6F3` (warm gray).-### 3. 双栏对比型 (Split Column)-- 左侧展示现状/问题,右侧展示方案/成效。-- 中间可使用金色箭头作为逻辑连接。+### 3. Split Column Comparison+- Left side presents current state / problems; right side presents solutions / results.+- Gold arrows can serve as logical connectors in the middle.----## 八、间距规范+## VIII. Spacing Guidelines-| 属性 | 值 | 说明 |-| ------------ | ----- | ------------------------ |-| **基础单位** | 4px | 所有间距应为 4px 的倍数 |-| **模块间距** | 40px | 大模块之间的标准间距 |-| **卡片间距** | 24px | 卡片之间的间距 |-| **内部留白** | 20px | 卡片内部的 Padding |-| **文本行距** | 1.5 | 正文标准行距 |+| Property | Value | Description |+| -------------- | ----- | ------------------------ |+| **Base Unit** | 4px | All spacing should be multiples of 4px |+| **Module Gap** | 40px | Standard gap between major modules |+| **Card Gap** | 24px | Gap between cards |+| **Inner Padding** | 20px | Padding inside cards |+| **Line Height** | 1.5 | Standard body line height |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules-1. viewBox 固定为 `0 0 1280 720`-2. 背景必须包含全屏 `<rect>`-3. 文本换行使用 `<tspan>`-4. 透明度必须使用 `fill-opacity` / `stroke-opacity`-5. 箭头需使用 `<polygon>` 绘制,禁止 `marker`+1. viewBox fixed at `0 0 1280 720`+2. Background must include a full-screen `<rect>`+3. Text wrapping via `<tspan>`+4. Opacity must use `fill-opacity` / `stroke-opacity`+5. Arrows must use `<polygon>`, no `marker`-### 禁用元素 (黑名单)+### Forbidden Elements (Blacklist)-- `clipPath`, `mask` (裁剪/遮罩)-- `<style>`, `class` (样式表;`<defs>` 内 `id` 合法)-- `foreignObject` (外部对象)-- `textPath` (路径文本)-- `animate`, `animateTransform`, `set` (动画)+- `clipPath`, `mask` (clipping/masking)+- `<style>`, `class` (stylesheets; `id` within `<defs>` is allowed)+- `foreignObject` (foreign objects)+- `textPath` (text on path)+- `animate`, `animateTransform`, `set` (animations)-- `rgba()` 颜色格式 (必须用 hex + opacity)-- `<g opacity="...">` (组透明度,需单独设置)+- `rgba()` color format (must use hex + opacity)+- `<g opacity="...">` (group opacity — set individually on each element)----## 十、占位符规范--| 占位符 | 说明 |-| ------------------- | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 汇报人姓名 |-| `{{DATE}}` | 日期 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}` | 章节标题 |-| `{{CHAPTER_DESC}}` | 章节描述 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{KEY_MESSAGE}}` | 核心观点 |-| `{{CONTENT_AREA}}` | 内容区域标识 |-| `{{TOC_ITEM_N_TITLE}}`| 目录标题(N=1..n) |-| `{{TOC_ITEM_N_DESC}}` | 目录描述(N=1..n) |-| `{{THANK_YOU}}` | 结束语 |-| `{{CONTACT_INFO}}` | 联系方式 |+## X. Placeholder Specification++| Placeholder | Description |+| --------------------- | ------------------ |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Presenter name |+| `{{DATE}}` | Date |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}` | Chapter title |+| `{{CHAPTER_DESC}}` | Chapter description |+| `{{PAGE_TITLE}}` | Page title |+| `{{KEY_MESSAGE}}` | Key message |+| `{{CONTENT_AREA}}` | Content area identifier |+| `{{TOC_ITEM_N_TITLE}}`| TOC item title (N=1..n) |+| `{{TOC_ITEM_N_DESC}}` | TOC item description (N=1..n) |+| `{{THANK_YOU}}` | Closing message |+| `{{CONTACT_INFO}}` | Contact information |----## 十一、使用说明+## XI. Usage Notes-1. **Logo 适配**: 建议使用白色反白 Logo。-2. **字体安装**: 推荐安装“微软雅黑”或使用同等无衬线字体。-3. **扩展配色**: 如需更多配色,请保持红金比例不变。+1. **Logo Adaptation**: Recommend using white inverted Logo.+2. **Font Installation**: Recommend installing "Microsoft YaHei" or an equivalent sans-serif font.+3. **Extended Colors**: If additional colors are needed, maintain the red-gold ratio unchanged.diff --git "a/skills/ppt-master/templates/layouts/\347\247\221\346\212\200\350\223\235\345\225\206\345\212\241/design_spec.md" "b/skills/ppt-master/templates/layouts/\347\247\221\346\212\200\350\223\235\345\225\206\345\212\241/design_spec.md"index e6017dea..bb2c1fb0 100644--- "a/skills/ppt-master/templates/layouts/\347\247\221\346\212\200\350\223\235\345\225\206\345\212\241/design_spec.md"+++ "b/skills/ppt-master/templates/layouts/\347\247\221\346\212\200\350\223\235\345\225\206\345\212\241/design_spec.md"@@ -1,201 +1,201 @@-# 科技蓝商务 - 通用商务风格设计规范+# Tech Blue Business (科技蓝商务) - Universal Business Style Design Specification-> 适用于企业汇报、产品发布、方案提案、流程规范等商务场景,风格专业、科技、简洁。+> Suitable for corporate reports, product launches, proposals, process standards, and other business scenarios. Style: professional, tech-oriented, and clean.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------ |-| **模板名称** | 科技蓝商务 (tech_blue_business) |-| **适用场景** | 企业汇报、产品发布、方案提案、流程规范、培训材料 |-| **设计调性** | 科技、商务、专业、简洁 |-| **主题模式** | 混合主题(深蓝/科技蓝封面 + 浅色内容页) |+| Property | Description |+| ---------------- | ---------------------------------------------------------------- |+| **Template Name**| Tech Blue Business (科技蓝商务 / tech_blue_business) |+| **Use Cases** | Corporate reports, product launches, proposals, process standards, training materials |+| **Design Tone** | Tech, business, professional, clean |+| **Theme Mode** | Mixed theme (dark blue/tech blue cover + light content pages) |----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |-| -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **安全边距** | 60px (左右), 50px (上下) |-| **内容区域** | x: 60-1220, y: 140-640 |-| **标题区域** | y: 40-100 |-| **网格基准** | 40px |+| Property | Value |+| ------------------ | ----------------------------- |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Safe Margins** | 60px (left/right), 50px (top/bottom) |+| **Content Area** | x: 60-1220, y: 140-640 |+| **Title Area** | y: 40-100 |+| **Grid Baseline** | 40px |----## 三、配色方案+## III. Color Scheme-### 主色系+### Primary Colors-| 角色 | 色值 | 备注 |-| ---------------- | ----------- | -------------------------------- |-| **主色 Blue** | `#0078D7` | 品牌识别、标题装饰、核心元素 |-| **深色 Dark** | `#002E5D` | 深色背景、页脚、重要节点 |-| **辅助色 Cyan** | `#4CA1E7` | 渐变搭配、次级装饰 |-| **警示色 Red** | `#E60012` | 重点强调、警示信息 |+| Role | Value | Notes |+| ------------------ | ----------- | ---------------------------------------- |+| **Primary Blue** | `#0078D7` | Brand identity, title accents, key elements |+| **Dark Blue** | `#002E5D` | Dark backgrounds, footer, important nodes |+| **Accent Cyan** | `#4CA1E7` | Gradient pairing, secondary accents |+| **Alert Red** | `#E60012` | Key emphasis, warning information |-### 中性色+### Neutral Colors-| 角色 | 色值 | 用途 |-| -------------- | ----------- | ---------------------- |-| **背景白** | `#FFFFFF` | 页面主体背景 |-| **浅灰背景** | `#F5F5F7` | 每个页面的底色 |-| **边框灰** | `#A0C4E3` | 虚线框、模块分割线 |-| **正文黑** | `#333333` | 标题及正文标准色 |-| **说明灰** | `#666666` | 副标题、页码、注释 |+| Role | Value | Usage |+| ------------------ | ----------- | ------------------------------ |+| **Background White**| `#FFFFFF` | Main page background |+| **Light Gray BG** | `#F5F5F7` | Base color for each page |+| **Border Gray** | `#A0C4E3` | Dashed borders, module dividers |+| **Body Text Black**| `#333333` | Standard color for titles and body text |+| **Caption Gray** | `#666666` | Subtitles, page numbers, annotations |----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "PingFang SC", sans-serif`+**Font Stack**: `"Microsoft YaHei", "PingFang SC", sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 |-| -------- | ---------------- | ------ | ------- |-| H1 | 封面主标题 | 64px | Bold |-| H2 | 页面标题 | 36-40px| Bold |-| H3 | 小节/卡片标题 | 24-28px| Bold |-| P | 正文内容 | 20-24px| Regular |-| Caption | 辅助说明 | 14-16px| Regular |+| Level | Usage | Size | Weight |+| -------- | ------------------ | ------- | ------- |+| H1 | Cover main title | 64px | Bold |+| H2 | Page title | 36-40px | Bold |+| H3 | Section/card title | 24-28px | Bold |+| P | Body content | 20-24px | Regular |+| Caption | Supplementary text | 14-16px | Regular |----## 五、核心设计原则+## V. Core Design Principles-### 科技商务风格+### Tech Business Style-1. **波浪曲线**: 封面和过渡页底部使用多层波浪曲线(Wave),增加动感与层次。-2. **虚线容器**: 内容区域使用虚线边框 (`stroke-dasharray`),体现严谨的数据化特征。-3. **蓝白简洁**: 大面积留白配合科技蓝,营造专业、清爽的视觉感受。-4. **六边形纹理**: 封面和章节页使用六边形图案,体现科技感与创新。+1. **Wave Curves**: Multi-layered wave curves at the bottom of cover and transition pages add dynamism and depth.+2. **Dashed Containers**: Content areas use dashed borders (`stroke-dasharray`) to convey a data-driven, rigorous aesthetic.+3. **Blue-White Simplicity**: Generous white space paired with tech blue creates a professional, crisp visual feel.+4. **Hexagonal Patterns**: Cover and chapter pages use hexagonal patterns to evoke a sense of technology and innovation.-### 高级美化特性+### Advanced Styling Features-1. **渐变应用**: 蓝色到深蓝的线性渐变,用于背景和重要图形。-2. **透明度叠加**: 波浪使用不同透明度叠加,增加呼吸感。-3. **圆角处理**: 内容容器使用 `rx="10"` 圆角,中和科技的冰冷感,更具亲和力。-4. **装饰三角**: 标题前缀使用小三角形,引导视线。+1. **Gradient Application**: Blue-to-dark-blue linear gradients for backgrounds and important graphics.+2. **Opacity Layering**: Waves use varying opacity levels to create a breathing effect.+3. **Rounded Corners**: Content containers use `rx="10"` rounded corners to soften the tech coldness and add warmth.+4. **Decorative Triangles**: Small triangle prefixes before titles guide the reader's eye.----## 六、页面结构+## VI. Page Structure-### 通用布局+### General Layout-| 区域 | 位置/高度 | 内容说明 |-| ---------- | ------------- | -------------------------------------- |-| **顶部** | y=0-120 | 标题区、Logo及装饰线 |-| **内容区** | y=140-640 | 主要内容区域(虚线框容器) |-| **页脚** | y=680-720 | 页码及版权信息 |+| Area | Position/Height | Description |+| ------------ | --------------- | -------------------------------------- |+| **Top** | y=0-120 | Title area, logo, and decorative lines |+| **Content** | y=140-640 | Main content area (dashed containers) |+| **Footer** | y=680-720 | Page number and copyright info |-### 装饰设计+### Decorative Design-- **底部波浪**: 封面、结束页的核心视觉元素。-- **顶部装饰条**: 左上角蓝色色块标题前缀。-- **虚线框**: 规范内容排版的标准容器。+- **Bottom Waves**: Core visual element of cover and ending pages.+- **Top Accent Bar**: Blue color block as title prefix in the upper-left corner.+- **Dashed Frames**: Standard containers for structured content layout.----## 七、页面类型+## VII. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-- **布局**: 左右非对称布局或叠加布局。-- **背景**: 左侧/顶部大面积蓝色渐变,右侧图片容器。-- **装饰**: 底部双层波浪曲线,增加动感。-- **标题**: 左侧对齐,白色大字,带副标题背景装饰。-- **图片**: 右侧全屏裁切,展示医疗/科技场景。+- **Layout**: Asymmetric left-right or overlay layout.+- **Background**: Large blue gradient on the left/top; image container on the right.+- **Decoration**: Dual-layer wave curves at the bottom for dynamism.+- **Title**: Left-aligned, large white text with subtitle background accent.+- **Image**: Full-bleed right-side crop showcasing medical/tech scenes.-### 2. 目录页 (02_toc.svg)+### 2. Table of Contents (02_toc.svg)-- **布局**: 左右分栏。-- **左侧**: 深蓝/科技蓝侧边栏,包含“目录”大字。-- **右侧**: 清单式列表,使用圆点+线条引导。-- **装饰**: 简洁线条分割,保持呼吸感。+- **Layout**: Left-right split.+- **Left Side**: Dark blue/tech blue sidebar with large "Contents" text.+- **Right Side**: List-style entries with bullet points and line guides.+- **Decoration**: Clean line dividers maintaining visual breathing room.-### 3. 章节页 (02_chapter.svg)+### 3. Chapter Page (02_chapter.svg)-- **背景**: 全屏深蓝渐变 (`#0078D7` -> `#002E5D`)。-- **中心**: 居中对齐,大号数字编号 + 粗体标题。-- **装饰**: 极简几何圆环或线条装饰,聚焦主题。+- **Background**: Full-screen dark blue gradient (`#0078D7` -> `#002E5D`).+- **Center**: Center-aligned large chapter number + bold title.+- **Decoration**: Minimalist geometric rings or line accents focusing on the theme.-### 4. 内容页 (03_content.svg)+### 4. Content Page (03_content.svg)-- **顶部**: 极简标题栏,左上角蓝色矩形装饰。-- **背景**: 纯白底色。-- **内容**: 默认包含一个圆角虚线框容器 (`stroke-dasharray="8,8"`).-- **页脚**: 灰色小字页码与保密标识。+- **Top**: Minimalist title bar with blue rectangle accent in the upper-left.+- **Background**: Pure white.+- **Content**: Default includes a rounded dashed container (`stroke-dasharray="8,8"`).+- **Footer**: Small gray text for page number and confidentiality label.-### 5. 结束页 (04_ending.svg)+### 5. Ending Page (04_ending.svg)-- **背景**: 呼应章节页的深蓝渐变。-- **中心**: “感谢聆听”与 Q&A。-- **装饰**: 底部保留波浪曲线,首尾呼应。+- **Background**: Dark blue gradient echoing the chapter page.+- **Center**: "Thank You" message and Q&A.+- **Decoration**: Bottom wave curves for visual bookending.----## 八、常用组件+## VIII. Common Components-### 虚线内容容器+### Dashed Content Container```xml-<!-- 圆角虚线内容框 -->+<!-- Rounded dashed content frame --><rect x="60" y="140" width="1160" height="500" fill="none" stroke="#A0C4E3" stroke-width="2" stroke-dasharray="8,8" rx="10" />```-### 标题前缀装饰+### Title Prefix Decoration```xml-<!-- 蓝色矩形装饰 -->+<!-- Blue rectangle decoration --><rect x="40" y="40" width="10" height="40" fill="#0078D7" />```----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules-1. viewBox: `0 0 1280 720`-2. 背景使用 `<rect>` 元素-3. 文本换行使用 `<tspan>`(**严禁** `<foreignObject>`)-4. 透明度使用 `fill-opacity` / `stroke-opacity`-5. 禁止使用:`clipPath` (尽量避免, 除非用于图片裁切)、`mask`、`<style>`、`class`、`foreignObject`-6. 禁止使用:`textPath`、`animate*`、`script`-7. 渐变使用 `<defs>` 定义+1. viewBox: `0 0 1280 720`+2. Use `<rect>` elements for backgrounds+3. Use `<tspan>` for text wrapping (**`<foreignObject>` is strictly prohibited**)+4. Use `fill-opacity` / `stroke-opacity` for transparency+5. Prohibited: `clipPath` (avoid unless needed for image cropping), `mask`, `<style>`, `class`, `foreignObject`+6. Prohibited: `textPath`, `animate*`, `script`+7. Define gradients in `<defs>`----## 十、占位符规范--| 占位符 | 说明 |-| ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 演讲者/作者 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CONTENT_PLACEHOLDER}}` | 内容区提示文本 |-| `{{SECTION_NUMBER}}` | 章节编号 (01) |-| `{{SECTION_TITLE}}`| 章节标题 |-| `{{PAGE_NUMBER}}` | 页码 |-| `{{SECTION_1_TITLE}}` | 目录项 1 |+## X. Placeholder Specification++| Placeholder | Description |+| ----------------------------- | -------------------------- |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Speaker/Author |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Page title |+| `{{CONTENT_PLACEHOLDER}}` | Content area prompt text |+| `{{SECTION_NUMBER}}` | Section number (01) |+| `{{SECTION_TITLE}}` | Section title |+| `{{PAGE_NUMBER}}` | Page number |+| `{{SECTION_1_TITLE}}` | TOC item 1 |----## 十一、使用说明+## XI. Usage Notes-1. 本模板为通用科技蓝商务风格,适用于各类企业商务场景。-2. 内容页默认包含虚线框,可根据内容多少移除或调整大小。-3. 波浪元素和六边形纹理为装饰性 SVG 路径,如需修改建议保持原有风格。-4. 配色方案以蓝色系为主,可根据企业品牌色进行微调。+1. This template is a universal tech blue business style, suitable for various corporate business scenarios.+2. Content pages include dashed frames by default; these can be removed or resized based on content volume.+3. Wave elements and hexagonal patterns are decorative SVG paths; modifications should maintain the original style.+4. The color scheme is primarily blue-based and can be fine-tuned to match corporate brand colors.diff --git "a/skills/ppt-master/templates/layouts/\351\207\215\345\272\206\345\244\247\345\255\246/design_spec.md" "b/skills/ppt-master/templates/layouts/\351\207\215\345\272\206\345\244\247\345\255\246/design_spec.md"index 316ee1d6..3cfc03d8 100644--- "a/skills/ppt-master/templates/layouts/\351\207\215\345\272\206\345\244\247\345\255\246/design_spec.md"+++ "b/skills/ppt-master/templates/layouts/\351\207\215\345\272\206\345\244\247\345\255\246/design_spec.md"@@ -1,115 +1,115 @@-# 重庆大学模板 - 设计规范+# Chongqing University (重庆大学) Template - Design Specification-> 融合山城层叠意象与现代学术气质的独特设计+> A distinctive design blending the layered imagery of the Mountain City with modern academic elegance.----## 一、模板概述+## I. Template Overview-| 属性 | 描述 |-| -------------- | ------------------------------------------------------------ |-| **模板名称** | 重庆大学(Chongqing University Template) |-| **适用场景** | 学术答辩、科研汇报、教学展示、学术交流 |-| **设计调性** | 学术稳重 · 山城气韵 · 现代简约 |-| **设计灵感** | 重庆山城的层叠地貌 + 校园历史建筑的沉稳 + 现代学术的专业感 |+| Property | Description |+| ------------------ | -------------------------------------------------------------------- |+| **Template Name** | Chongqing University (重庆大学) |+| **Use Cases** | Academic defense, research reports, teaching presentations, scholarly exchange |+| **Design Tone** | Academically grounded · Mountain City charm · Modern minimalism |+| **Design Inspiration** | Chongqing's layered terrain + the gravitas of historic campus buildings + modern academic professionalism |-### 设计特色+### Design Features-1. **层叠几何**:使用斜切色块模拟山城层叠感,打破传统方正布局-2. **不对称美学**:左重右轻的视觉平衡,引导阅读焦点-3. **渐变色带**:从深到浅的过渡,象征从厚重历史到光明未来-4. **波浪底纹**:抽象的长江/嘉陵江水元素+1. **Layered Geometry**: Diagonal color blocks simulate the terraced landscape of the Mountain City, breaking away from traditional rectangular layouts+2. **Asymmetric Aesthetics**: Left-heavy visual balance guides reading focus+3. **Gradient Color Bands**: Deep-to-light transitions symbolize the journey from a rich history to a bright future+4. **Wave Patterns**: Abstract Yangtze River / Jialing River water elements----## 二、画布规范+## II. Canvas Specification-| 属性 | 值 |-| -------------- | ----------------------------- |-| **格式** | 标准 16:9 |-| **尺寸** | 1280 × 720 px |-| **viewBox** | `0 0 1280 720` |-| **页面边距** | 左右 60px,上下 40px |-| **内容安全区** | x: 60-1220, y: 100-660 |+| Property | Value |+| ------------------ | ----------------------------- |+| **Format** | Standard 16:9 |+| **Dimensions** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **Page Margins** | Left/right 60px, top/bottom 40px |+| **Content Safe Area** | x: 60-1220, y: 100-660 |----## 三、配色方案+## III. Color Scheme-### 主色系(从 Logo 提取)+### Primary Colors (Extracted from Logo)-| 角色 | 色值 | 备注 |-| -------------- | ----------- | ------------------------------------ |-| **重大蓝** | `#006BB7` | 校徽主色,页眉、标题、主要元素 |-| **深邃蓝** | `#004A82` | 章节页背景、强调区域 |-| **天际蓝** | `#3A9BD9` | 辅助色、渐变终点 |-| **浅云蓝** | `#E3F2FD` | 浅色背景、卡片底色 |-| **晨曦金** | `#D4A84B` | 装饰点缀、高亮强调(象征光明) |-| **背景白** | `#FAFCFF` | 略带蓝调的纯净白 |+| Role | Value | Notes |+| ------------------ | ----------- | -------------------------------------------- |+| **CQU Blue** | `#006BB7` | Emblem primary color; header, titles, main elements |+| **Deep Blue** | `#004A82` | Chapter page background, emphasis areas |+| **Sky Blue** | `#3A9BD9` | Accent color, gradient endpoint |+| **Cloud Blue** | `#E3F2FD` | Light background, card base color |+| **Dawn Gold** | `#D4A84B` | Decorative accents, highlights (symbolizing brightness) |+| **Background White**| `#FAFCFF` | Subtly blue-tinted pure white |-### 文字色系+### Text Colors-| 角色 | 色值 | 用途 |-| -------------- | ----------- | ---------------------- |-| **深墨文字** | `#1A2E44` | 主标题、正文标题 |-| **主文字** | `#333D4A` | 正文内容 |-| **辅助文字** | `#6B7B8C` | 说明文字、标注 |-| **白色文字** | `#FFFFFF` | 深色背景上的文字 |+| Role | Value | Usage |+| ------------------ | ----------- | ------------------------ |+| **Dark Ink Text** | `#1A2E44` | Main titles, heading text |+| **Primary Text** | `#333D4A` | Body content |+| **Secondary Text** | `#6B7B8C` | Captions, annotations |+| **White Text** | `#FFFFFF` | Text on dark backgrounds |-### 渐变方案+### Gradient Scheme```-主渐变:#004A82 → #006BB7 → #3A9BD9(深→浅,用于背景斜切)-金光渐变:#C49A3D → #D4A84B → #E8C675(装饰用)+Primary gradient: #004A82 → #006BB7 → #3A9BD9 (deep → light, used for background diagonal cuts)+Gold gradient: #C49A3D → #D4A84B → #E8C675 (decorative use)```----## 四、排版体系+## IV. Typography System-### 字体方案+### Font Stack-**字体栈**: `"Microsoft YaHei", "微软雅黑", "PingFang SC", Arial, sans-serif`+**Font Stack**: `"Microsoft YaHei", "微软雅黑", "PingFang SC", Arial, sans-serif`-### 字号层级+### Font Size Hierarchy-| 层级 | 用途 | 字号 | 字重 | 备注 |-| ---- | ---------------- | ---- | ------- | ------------ |-| H1 | 封面主标题 | 48px | Bold | 大气稳重 |-| H2 | 页面标题 | 26px | Bold | |-| H3 | 章节标题 | 44px | Bold | |-| H4 | 卡片标题 | 22px | Bold | |-| P | 正文内容 | 17px | Regular | |-| High | 强调数据 | 32px | Bold | |-| Sub | 注释/来源 | 13px | Regular | |-| XS | 页码/版权 | 11px | Regular | |+| Level | Usage | Size | Weight | Notes |+| ----- | ------------------ | ---- | ------- | ------------------ |+| H1 | Cover main title | 48px | Bold | Grand and dignified |+| H2 | Page title | 26px | Bold | |+| H3 | Chapter title | 44px | Bold | |+| H4 | Card title | 22px | Bold | |+| P | Body content | 17px | Regular | |+| High | Emphasized data | 32px | Bold | |+| Sub | Notes/sources | 13px | Regular | |+| XS | Page number/copyright | 11px | Regular | |----## 五、核心视觉元素+## V. Core Visual Elements-### 1. 斜切色块(山城层叠)+### 1. Diagonal Color Blocks (Mountain City Layers)-模板的标志性设计,使用斜向分割的色块模拟山城层叠感:+The template's signature design uses diagonally divided color blocks to simulate the layered terrain of the Mountain City:```-封面:左下角大面积深蓝斜切色块(约占 40%)-章节页:全屏深蓝 + 右上角浅色斜切装饰-内容页:顶部小斜切装饰带+Cover: Large deep-blue diagonal block in the lower-left corner (approx. 40% of area)+Chapter page: Full-screen deep blue + light diagonal accent in the upper-right+Content page: Small diagonal accent strip at the top```-### 2. 波浪底纹(两江意象)+### 2. Wave Patterns (Two Rivers Imagery)-抽象的曲线元素,象征长江与嘉陵江:+Abstract curves symbolizing the Yangtze and Jialing Rivers:```xml-<path d="M0,700 Q320,680 640,700 T1280,680 L1280,720 L0,720 Z"+<path d="M0,700 Q320,680 640,700 T1280,680 L1280,720 L0,720 Z"fill="#006BB7" fill-opacity="0.08"/>```-### 3. 光点装饰(城市灯火)+### 3. Light Dot Decorations (City Lights)-小圆点元素,代表山城夜景的灯火:+Small circle elements representing the nighttime lights of the Mountain City:```xml<circle cx="x" cy="y" r="3" fill="#D4A84B" fill-opacity="0.6"/>@@ -117,125 +117,125 @@----## 六、页面类型+## VI. Page Types-### 1. 封面页 (01_cover.svg)+### 1. Cover Page (01_cover.svg)-**布局结构**:-- 右上区域:Logo(使用 logo.png)-- 中心偏左:主标题 + 副标题-- 左下角:大面积斜切深蓝色块(从左下角向右上延伸)-- 底部:答辩人信息、日期-- 装饰:波浪底纹 + 金色光点+**Layout Structure**:+- Upper-right area: Logo (using logo.png)+- Center-left: Main title + subtitle+- Lower-left corner: Large diagonal deep-blue color block (extending from lower-left to upper-right)+- Bottom: Presenter info, date+- Decorations: Wave patterns + gold light dots-### 2. 章节页 (02_chapter.svg)+### 2. Chapter Page (02_chapter.svg)-**布局结构**:-- 全屏深邃蓝背景-- 右上角:斜切浅色区域(天际蓝渐变)-- 左侧:大号章节编号(半透明)-- 中间偏左:章节标题(白色)-- 底部:金色装饰线 + Logo(白色版本)+**Layout Structure**:+- Full-screen deep blue background+- Upper-right: Diagonal light area (sky blue gradient)+- Left: Large chapter number (semi-transparent)+- Center-left: Chapter title (white)+- Bottom: Gold decorative line + Logo (white version)-### 3. 内容页 (03_content.svg)+### 3. Content Page (03_content.svg)-**布局结构**:-- 顶部:斜切蓝色装饰带(高度约 80px,左高右低)-- 装饰带上:页面标题 + Logo-- 主体:白色内容区(灵活布局)-- 左侧:细长金色装饰线-- 底部:简洁页脚 + 波浪底纹+**Layout Structure**:+- Top: Diagonal blue accent strip (approx. 80px height, higher on left, lower on right)+- On the accent strip: Page title + Logo+- Body: White content area (flexible layout)+- Left: Thin gold decorative line+- Bottom: Clean footer + wave pattern-### 4. 结束页 (04_ending.svg)+### 4. Ending Page (04_ending.svg)-**布局结构**:-- 中心:大尺寸 Logo-- Logo 下方:感谢语-- 底部斜切蓝色区域:联系信息-- 装饰:波浪底纹 + 金色光点+**Layout Structure**:+- Center: Large-sized Logo+- Below logo: Thank-you message+- Bottom diagonal blue area: Contact information+- Decorations: Wave patterns + gold light dots-### 5. 目录页 (02_toc.svg)+### 5. Table of Contents (02_toc.svg)-**布局结构**:-- 顶部斜切装饰带 + 标题-- 左侧:大号数字编号(垂直排列,带金色装饰)-- 右侧:目录项文字-- 底部:波浪装饰+**Layout Structure**:+- Top diagonal accent strip + title+- Left: Large numeric indices (vertically arranged, with gold accents)+- Right: TOC item text+- Bottom: Wave decoration----## 七、Logo 使用规范+## VII. Logo Usage Guidelines-| 文件 | 适用场景 | 说明 |-|------|---------|------|-| `重庆大学logo.png` | 浅色/白色背景 | 蓝色版本 |-| `重庆大学logo2.png` | 深色/蓝色背景 | 白色版本 |+| File | Applicable Context | Notes |+|------|-------------------|-------|+| `重庆大学logo.png` | Light/white backgrounds | Blue version |+| `重庆大学logo2.png` | Dark/blue backgrounds | White version |-**Logo 尺寸建议**:-- 封面页:宽度 280-320px-- 内容页页眉:宽度 160-200px-- 结束页:宽度 320-400px+**Recommended Logo Sizes**:+- Cover page: Width 280-320px+- Content page header: Width 160-200px+- Ending page: Width 320-400px----## 八、间距规范+## VIII. Spacing Specification-| 元素 | 数值 |-| ------------ | ------ |-| 页面边距 | 60px |-| 内容块间距 | 28px |-| 卡片内边距 | 24px |-| 卡片圆角 | 12px |-| 斜切角度 | 约 8-12° |+| Element | Value |+| -------------------- | ---------- |+| Page margins | 60px |+| Content block spacing | 28px |+| Card inner padding | 24px |+| Card border radius | 12px |+| Diagonal cut angle | Approx. 8-12° |----## 九、SVG 技术约束+## IX. SVG Technical Constraints-### 必须遵守+### Mandatory Rules1. viewBox: `0 0 1280 720`-2. 渐变使用 `<linearGradient>` 定义在 `<defs>` 中-3. 透明度使用 `fill-opacity` / `stroke-opacity`-4. 文本换行使用 `<tspan>`-5. Logo 使用 Base64 内嵌或 `<image>` 引用+2. Define gradients using `<linearGradient>` inside `<defs>`+3. Use `fill-opacity` / `stroke-opacity` for transparency+4. Use `<tspan>` for text wrapping+5. Use Base64 inline or `<image>` reference for logos-### 禁止使用+### Prohibited Elements-- `clipPath`、`mask`、`<style>`、`class`-- `foreignObject`、`textPath`、`animate*`-- `rgba()` 颜色格式-- `<g opacity="...">`(组透明度)+- `clipPath`, `mask`, `<style>`, `class`+- `foreignObject`, `textPath`, `animate*`+- `rgba()` color format+- `<g opacity="...">` (group opacity)----## 十、占位符规范--| 占位符 | 说明 |-| ------------------ | ------------------ |-| `{{TITLE}}` | 主标题 |-| `{{SUBTITLE}}` | 副标题 |-| `{{AUTHOR}}` | 答辩人姓名 |-| `{{ADVISOR}}` | 指导老师 |-| `{{INSTITUTION}}` | 学院/机构 |-| `{{DATE}}` | 日期 |-| `{{PAGE_TITLE}}` | 页面标题 |-| `{{CHAPTER_NUM}}` | 章节编号 |-| `{{CHAPTER_TITLE}}`| 章节标题 |-| `{{CHAPTER_DESC}}` | 章节描述 |-| `{{KEY_MESSAGE}}` | 核心观点 |-| `{{CONTENT_AREA}}` | 内容区域 |-| `{{PAGE_NUM}}` | 页码 |-| `{{THANK_YOU}}` | 感谢语 |-| `{{CONTACT_INFO}}` | 联系方式 |+## X. Placeholder Specification++| Placeholder | Description |+| -------------------- | ---------------------- |+| `{{TITLE}}` | Main title |+| `{{SUBTITLE}}` | Subtitle |+| `{{AUTHOR}}` | Presenter name |+| `{{ADVISOR}}` | Thesis advisor |+| `{{INSTITUTION}}` | College/Institution |+| `{{DATE}}` | Date |+| `{{PAGE_TITLE}}` | Page title |+| `{{CHAPTER_NUM}}` | Chapter number |+| `{{CHAPTER_TITLE}}` | Chapter title |+| `{{CHAPTER_DESC}}` | Chapter description |+| `{{KEY_MESSAGE}}` | Key message |+| `{{CONTENT_AREA}}` | Content area |+| `{{PAGE_NUM}}` | Page number |+| `{{THANK_YOU}}` | Thank-you message |+| `{{CONTACT_INFO}}` | Contact information |----## 十一、设计检查清单+## XI. Design Checklist- [ ] viewBox = `0 0 1280 720`-- [ ] 斜切色块角度一致(8-12°)-- [ ] Logo 版本与背景匹配-- [ ] 配色符合规范-- [ ] 波浪装饰位置正确-- [ ] 文本可读(≥11px)+- [ ] Diagonal block angles are consistent (8-12°)+- [ ] Logo version matches background+- [ ] Colors conform to specification+- [ ] Wave decorations are correctly positioned+- [ ] Text is readable (>=11px)diff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.mdindex edb3a9b8..288068fa 100644--- a/skills/ppt-master/workflows/create-template.md+++ b/skills/ppt-master/workflows/create-template.md@@ -1,115 +1,115 @@----description: 根据已有项目文件或参考模板生成一份新的 PPT 布局模板+description: Generate a new PPT layout template based on existing project files or reference templates----# 创建新模板 Workflow+# Create New Template Workflow-> 📖 **调用角色**:[Template_Designer](../references/template-designer.md)+> **Role invoked**: [Template_Designer](../references/template-designer.md)-为**全局模板库**生成一套完整的 PPT 布局模板。+Generate a complete set of PPT layout templates for the **global template library**.-## 流程概览+## Process Overview```-收集信息 → 创建目录 → 调用 Template_Designer → 验证完整性+Gather Info -> Create Directory -> Invoke Template_Designer -> Validate Completeness```----## 步骤 1:收集模板信息+## Step 1: Gather Template Information-向用户确认以下信息:+Confirm the following with the user:-| 信息项 | 必填 | 说明 |-|--------|------|------|-| 新模板名称 | ✅ | 英文标识符,如 `my_company` |-| 模板中文名称 | ✅ | 用于文档描述 |-| 参考来源 | ⬜ | 现有项目或模板路径(可选) |-| 主题色 | ⬜ | 主导色 HEX 值(如有参考可自动提取) |-| 设计风格 | ⬜ | 简短描述适用场景和设计调性 |+| Item | Required | Description |+|------|----------|-------------|+| New template name | Yes | English identifier, e.g., `my_company` |+| Template display name | Yes | Human-readable name for documentation |+| Reference source | Optional | Existing project or template path |+| Theme color | Optional | Primary color HEX value (can be auto-extracted from reference) |+| Design style | Optional | Brief description of use cases and design tone |-**如有参考来源**,先分析其结构:+**If a reference source is provided**, analyze its structure first:```bash-ls -la "<参考来源路径>"+ls -la "<reference_source_path>"```----## 步骤 2:创建模板目录+## Step 2: Create Template Directory```bash-mkdir -p "skills/ppt-master/templates/layouts/<新模板名称>"+mkdir -p "skills/ppt-master/templates/layouts/<new_template_name>"```-> ⚠️ **输出位置**:全局模板输出到 `skills/ppt-master/templates/layouts/`,项目模板输出到 `projects/<项目>/templates/`+> **Output location**: Global templates go to `skills/ppt-master/templates/layouts/`; project templates go to `projects/<project>/templates/`----## 步骤 3:调用 Template_Designer 角色+## Step 3: Invoke Template_Designer Role-**切换到 Template_Designer 角色**,按照角色定义生成:+**Switch to the Template_Designer role** and generate per role definition:-1. **design_spec.md** — 设计规范文档-2. **4 个核心模板** — 封面、章节、内容、结束页-3. **目录页(可选)** — `02_toc.svg`+1. **design_spec.md** — Design specification document+2. **4 core templates** — Cover, chapter, content, ending pages+3. **TOC page (optional)** — `02_toc.svg`-> 📖 **角色详情**:参见 [template-designer.md](../references/template-designer.md)+> **Role details**: See [template-designer.md](../references/template-designer.md)----## 步骤 4:验证模板完整性+## Step 4: Validate Template Completeness```bash-ls -la "skills/ppt-master/templates/layouts/<新模板名称>"+ls -la "skills/ppt-master/templates/layouts/<new_template_name>"```-**检查清单**:+**Checklist**:-- [ ] `design_spec.md` 包含完整设计规范-- [ ] 4 个核心模板齐全-- [ ] SVG viewBox 正确(`0 0 1280 720`)-- [ ] 占位符格式一致(`{{PLACEHOLDER}}`)+- [ ] `design_spec.md` contains complete design specification+- [ ] All 4 core templates present+- [ ] SVG viewBox correct (`0 0 1280 720`)+- [ ] Placeholder format consistent (`{{PLACEHOLDER}}`)----## 步骤 5:输出确认+## Step 5: Output Confirmation```markdown-## ✅ 模板创建完成+## Template Creation Complete-**模板名称**: <新模板名称>(<中文名称>)-**模板路径**: `skills/ppt-master/templates/layouts/<新模板名称>/`+**Template Name**: <new_template_name> (<display_name>)+**Template Path**: `skills/ppt-master/templates/layouts/<new_template_name>/`-### 包含文件+### Files Included-| 文件 | 状态 |-|------|------|-| `design_spec.md` | ✅ 完成 |-| `01_cover.svg` | ✅ 完成 |-| `02_chapter.svg` | ✅ 完成 |-| `03_content.svg` | ✅ 完成 |-| `04_ending.svg` | ✅ 完成 |-| `02_toc.svg` | ⬜ 可选 |+| File | Status |+|------|--------|+| `design_spec.md` | Done |+| `01_cover.svg` | Done |+| `02_chapter.svg` | Done |+| `03_content.svg` | Done |+| `04_ending.svg` | Done |+| `02_toc.svg` | Optional |```----## 配色方案快速参考+## Color Scheme Quick Reference-| 风格 | 主导色 | 适用场景 |-|------|--------|----------|-| 科技蓝 | `#004098` | 认证、测评 |-| 麦肯锡 | `#005587` | 战略咨询 |-| 政府蓝 | `#003366` | 政府项目 |-| 商务灰 | `#2C3E50` | 通用商务 |+| Style | Primary Color | Use Cases |+|-------|---------------|-----------|+| Tech Blue | `#004098` | Certification, evaluation |+| McKinsey | `#005587` | Strategic consulting |+| Government Blue | `#003366` | Government projects |+| Business Gray | `#2C3E50` | General business |----## 注意事项+## Notes-1. **SVG 技术约束**:参见 [template-designer.md](../references/template-designer.md) 技术约束章节-2. **配色一致性**:所有 SVG 文件使用相同配色-3. **占位符规范**:使用 `{{}}` 格式+1. **SVG technical constraints**: See the technical constraints section in [template-designer.md](../references/template-designer.md)+2. **Color consistency**: All SVG files must use the same color scheme+3. **Placeholder convention**: Use `{{}}` format-> 📖 **详细规范**:参见 [template-designer.md](../references/template-designer.md)+> **Detailed specification**: See [template-designer.md](../references/template-designer.md)