Skip to content

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

feat(docs): 更新角色操作指南并优化工具脚本

hugohe3522e7b46ac1d
diff --git a/roles/Image_Generator.md b/roles/Image_Generator.md
index e969b2ca..927368ba 100644
--- a/roles/Image_Generator.md
+++ b/roles/Image_Generator.md
@@ -371,11 +371,18 @@ subtle and elegant, suitable for presentation slide corners
**方式一:使用 Nano Banana 命令行工具** ⭐ 推荐
- 使用本项目工具 `tools/nano_banana_gen.py` 直接生成高分辨率图片
-- 首次使用需配置:复制 `tools/nano_banana_config.example.json` 为 `tools/nano_banana_config.json`,填入 API Key
+- **首选调用方式**:始终优先使用 `tools/nano_banana_gen.py`
+- **配置方式**:仅使用环境变量(不使用 JSON 配置)
+- 必需环境变量:`GEMINI_API_KEY`
+- 可选环境变量:`GEMINI_BASE_URL`
- 命令格式:
```bash
python tools/nano_banana_gen.py "你的提示词" --aspect_ratio 16:9 --image_size 4K --output 项目/images --filename cover_bg
```
+- **生成节奏控制(强制)**:
+- 每次只执行一个生成命令,等待图片返回并确认文件落盘后,再执行下一条
+- 建议每张间隔 2-5 秒,避免并发或过快提交导致失败
+- 如出现失败/无输出,先停止队列,检查环境变量与输出目录,再继续
- **完整参数列表**:
| 参数 | 简写 | 说明 | 默认值 |
diff --git a/roles/Strategist.md b/roles/Strategist.md
index 46b81827..66bd6245 100644
--- a/roles/Strategist.md
+++ b/roles/Strategist.md
@@ -82,6 +82,7 @@
> 1. **查阅图标索引**:使用 `view_file` 读取 `templates/icons/icons_index.json`
> 2. **验证图标名称**:确认推荐的图标名称在 `categories` 或文件系统中确实存在
> 3. **禁止凭空捏造**:不得使用索引中不存在的图标名称(如 `industry/factory`、`arrows/arrow-up-circle` 等带路径格式的名称均为无效格式)
+> 4. **输出清单**:在《设计规范》中列出最终图标清单(名称必须来自 `icons_index.json`),Executor **只能**使用该清单内图标
>
> **正确格式**:图标名称为**单一名称**(如 `factory`、`arrow-trend-up`),不含路径前缀。
>
diff --git a/tools/svg_to_pptx.py b/tools/svg_to_pptx.py
index fa6094bf..423722e2 100644
--- a/tools/svg_to_pptx.py
+++ b/tools/svg_to_pptx.py
@@ -332,21 +332,31 @@ def markdown_to_plain_text(md_content: str) -> str:
Returns:
纯文本内容
"""
+ def strip_inline_bold(text: str) -> str:
+ # Remove Markdown bold markers while keeping content
+ text = re.sub(r'\*\*(.+?)\*\*', r'\1', text)
+ text = re.sub(r'__(.+?)__', r'\1', text)
+ return text
+
lines = []
for line in md_content.split('\n'):
# 跳过标题行(# 开头)
if line.startswith('#'):
# 提取标题文本
text = re.sub(r'^#+\s*', '', line).strip()
+ text = strip_inline_bold(text)
if text:
lines.append(text)
lines.append('') # 空行
# 处理列表项(- 开头)
elif line.strip().startswith('- '):
- lines.append('• ' + line.strip()[2:])
+ item_text = line.strip()[2:]
+ item_text = strip_inline_bold(item_text)
+ lines.append('• ' + item_text)
# 普通行
elif line.strip():
- lines.append(line.strip())
+ text = strip_inline_bold(line.strip())
+ lines.append(text)
else:
lines.append('')