diff --git a/03_卡木(木)/木果_项目模板/PPT制作/SKILL.md b/03_卡木(木)/木果_项目模板/PPT制作/SKILL.md index b0640e5e..e6fd16ae 100644 --- a/03_卡木(木)/木果_项目模板/PPT制作/SKILL.md +++ b/03_卡木(木)/木果_项目模板/PPT制作/SKILL.md @@ -1,43 +1,73 @@ --- name: PPT制作 -description: 用 python-pptx 创建、编辑、分析演示文稿。触发词:做PPT、制作PPT、生成演示文稿、编辑PPT、修改PPT、汇报PPT、商业计划书PPT。 +description: 用 python-pptx 创建、编辑、分析演示文稿。含美观设计规范、v0式生成流程、GitHub 项目参考。触发词:做PPT、制作PPT、生成演示文稿、编辑PPT、修改PPT、汇报PPT、绘本PPT。 group: 木 -triggers: PPT、做PPT、制作PPT、演示文稿、汇报PPT +triggers: PPT、做PPT、制作PPT、演示文稿、汇报PPT、绘本PPT owner: 木果 -version: "1.0" +version: "2.0" updated: "2026-02-23" --- # PPT制作 > **归属**:木果(项目模板) -> **能力来源**:agentskills pptx(python-pptx),高星级技能,卡若AI 继承后可直接生成 .pptx 文件。 +> **能力来源**:python-pptx(3.1k★)、agentskills pptx(594★),融合 v0 式「规格→生成→套规范→验收」流程。 --- ## 能做什么(Capabilities) -- 创建新 PPT(标题页、内容页、要点页) -- 添加图片、表格、图表 +- 创建新 PPT(标题页、内容页、绘本风、汇报风) +- 添加图片(带边框、带说明)、表格、图表 - 编辑已有 PPT(修改文字、布局、备注) -- 输出到:`/Users/karuo/Documents/卡若Ai的文件夹/报告/` +- 按美观规范套用:配色、留白、图片边框 +- 输出到:`/Users/karuo/Documents/卡若Ai的文件夹/报告/` 或用户指定目录 --- ## 怎么用(Usage) -触发词:**做PPT、制作PPT、生成PPT、演示文稿、汇报PPT、商业计划书PPT** +触发词:**做PPT、制作PPT、生成PPT、演示文稿、汇报PPT、绘本PPT** -用户说需求后,收集:主题、页数/结构、关键内容,再按步骤执行。 +用户说需求后,收集:主题、受众、页数/结构、风格(商用/绘本)、有无参考模板,再按流程执行。 + +--- + +## 执行流程(v0 式:规格 → 生成 → 套规范 → 验收) + +借鉴卡若AI「全栈开发」与「Vercel与v0部署流水线」的生成逻辑: + +| 步骤 | 动作 | 说明 | +|:---|:---|:---| +| 1 | **规格澄清** | 主题、受众、页数、风格(商用白底 / 绘本黄底)、参考 PPT | +| 2 | **设计大纲** | 标题页 + 目录/正文页结构;每页关键内容、图片分配 | +| 3 | **执行生成** | 用 python-pptx 生成 .pptx(见下方核心代码) | +| 4 | **套美观规范** | 按《PPT美观设计规范》检查:背景色、字体、图片边框、每图配说明、留白 | +| 5 | **验收** | 用《验收检查清单》自检;风格与参考一致(如有) | + +**必读**:`参考资料/PPT美观设计规范.md`(配色 token、字体、图片边框、验收清单) --- ## 执行步骤(Steps) -1. **澄清需求**:主题、受众、页数、有无模板或参考 -2. **设计大纲**:标题页 + 目录 + 正文页结构 -3. **执行生成**:用下方 python-pptx 代码生成 .pptx -4. **输出**:保存到 `卡若Ai的文件夹/报告/`,并告知路径 +1. **澄清需求**:主题、受众、页数、风格、有无模板或参考 +2. **设计大纲**:标题页 + 正文页结构,每页文字与图片规划 +3. **执行生成**:用 python-pptx 代码生成 .pptx +4. **套美观规范**:背景色、标题/正文字体、图片边框 + 说明、留白 +5. **输出**:保存到指定目录,告知路径 + +--- + +## 美观度核心(必须执行) + +生成后必须套用以下规范(详见《PPT美观设计规范》): + +- **背景**:商用用白/浅灰;绘本用暖黄 `#FFFAE6` +- **图片**:2~3pt 边框,每张图配说明文字(如「📷 这张图:…」) +- **留白**:四周 ≥0.5 英寸,版心外有呼吸感 +- **字体**:标题 26~30pt Bold,正文 18~22pt,单页 ≤7 行 +- **风格延续**:封面与内页配色、字体统一 --- @@ -50,72 +80,62 @@ from pptx import Presentation from pptx.util import Inches, Pt prs = Presentation() +prs.slide_width = Inches(13.333) +prs.slide_height = Inches(7.5) -# 标题页 -title_slide_layout = prs.slide_layouts[0] -slide = prs.slides.add_slide(title_slide_layout) -slide.shapes.title.text = "标题" -slide.placeholders[1].text = "副标题" - -# 内容页(要点) -bullet_slide_layout = prs.slide_layouts[1] -slide = prs.slides.add_slide(bullet_slide_layout) -slide.shapes.title.text = "要点标题" -tf = slide.shapes.placeholders[1].text_frame -tf.text = "第一点" -p = tf.add_paragraph() -p.text = "第二点" -p.level = 1 +# 标题页(空白布局 + 自定义) +blank = prs.slide_layouts[6] +slide = prs.slides.add_slide(blank) +tb = slide.shapes.add_textbox(Inches(0.5), Inches(2), Inches(12.3), Inches(1.2)) +tb.text_frame.paragraphs[0].text = "标题" +tb.text_frame.paragraphs[0].font.size = Pt(44) +tb.text_frame.paragraphs[0].font.bold = True prs.save('output.pptx') ``` -### 添加图片 +### 添加图片(带边框) ```python -blank_layout = prs.slide_layouts[6] -slide = prs.slides.add_slide(blank_layout) -slide.shapes.add_picture('image.png', Inches(1), Inches(1), width=Inches(5)) +from pptx.dml.color import RGBColor + +pic = slide.shapes.add_picture('image.png', Inches(1), Inches(1), width=Inches(5)) +pic.line.color.rgb = RGBColor(180, 140, 100) +pic.line.width = Pt(3) ``` -### 添加表格 +### 设置背景色 ```python -rows, cols = 3, 4 -table = slide.shapes.add_table(rows, cols, Inches(1), Inches(2), Inches(6), Inches(1.5)).table -table.cell(0, 0).text = "表头" -table.cell(1, 0).text = "数据" +background = slide.background +background.fill.solid() +background.fill.fore_color.rgb = RGBColor(255, 250, 230) ``` -### 编辑已有 PPT - -```python -prs = Presentation('existing.pptx') -slide = prs.slides[0] -slide.shapes.title.text = "新标题" -prs.save('modified.pptx') -``` - ---- - -## 最佳实践 - -- 用 Inches() 或 Pt() 控制尺寸 -- 正文文字精简,多用视觉元素 -- 使用 slide_layouts 保持风格统一 -- 生成过程多次 save 防丢失 - --- ## 相关文件 | 文件 | 说明 | |:---|:---| +| `参考资料/PPT美观设计规范.md` | 配色、字体、图片、留白、验收清单(必读) | +| `脚本/天恩乖乖绘本.py` | 绘本风 PPT 示例(黄底、边框、图片说明) | | 输出目录 | `/Users/karuo/Documents/卡若Ai的文件夹/报告/` | --- +## 外部参考(GitHub 与学习资源) + +| 来源 | 链接 | 说明 | +|:---|:---|:---| +| python-pptx | https://github.com/scanny/python-pptx | 3.1k★ 官方库,创建/读取/更新 .pptx | +| python-pptx 文档 | https://python-pptx.readthedocs.io/ | Quickstart、API、用例 | +| agentskills pptx | https://agentskills.me/skill/pptx | 594★,Coding 示例 | +| PPTAgent | https://github.com/icip-cas/PPTAgent | 1.3k★,超越文生 PPT | + +--- + ## 依赖 - Python 3.9+ -- `python-pptx`:`pip install python-pptx` +- `python-pptx`:`pip install python-pptx`(建议在 venv 中安装) diff --git a/03_卡木(木)/木果_项目模板/PPT制作/参考资料/PPT美观设计规范.md b/03_卡木(木)/木果_项目模板/PPT制作/参考资料/PPT美观设计规范.md new file mode 100644 index 00000000..bda9decf --- /dev/null +++ b/03_卡木(木)/木果_项目模板/PPT制作/参考资料/PPT美观设计规范.md @@ -0,0 +1,130 @@ +# PPT 美观设计规范 · 卡若AI + +> **定位**:PPT 生成 = python-pptx 能力 + **本美观规范**;生成初版后套用设计 token,提升可读性与专业感。 +> **参考**:v0 前端工作流(规格→生成→套规范→验收)、GitHub python-pptx、agentskills pptx、小学绘本 PPT 设计最佳实践。 + +--- + +## 一、设计原则(KISS + 风格延续) + +| 原则 | 说明 | +|:---|:---| +| **KISS** | 简洁即美,单页信息量适中,避免堆砌 | +| **风格延续** | 封面与内页视觉统一(配色、字体、留白) | +| **留白** | 四周 ≥0.5 英寸,版心外留呼吸感 | +| **图素优先** | 高质量图片胜过千言,每图配简短说明 | + +--- + +## 二、配色规范(Token) + +### 通用商用/汇报 + +| 用途 | RGB | 说明 | +|:---|:---|:---| +| 背景 | `#FFFFFF` 或 `#F8F9FA` | 白/浅灰 | +| 标题 | `#1A1A2E` ~ `#2C3E50` | 深色 | +| 正文 | `#333333` ~ `#555555` | 中灰 | +| 强调 | `#3498DB` ~ `#2E86AB` | 蓝系 | +| 图片边框 | `#BDC3C7` ~ `#95A5A6` | 浅灰 2~3pt | + +### 小学绘本/童趣风 + +| 用途 | RGB | 说明 | +|:---|:---|:---| +| 背景 | `#FFFAE6` ~ `#FFF8DC` | 暖黄/奶油 | +| 标题 | `#8B5A2B` ~ `#A0522D` | 棕色 | +| 正文 | `#3C2D1E` ~ `#4A3728` | 深棕 | +| 图片边框 | `#B48C64` ~ `#C9A66B` | 暖棕 3pt | +| 强调 | `#DAa520` ~ `#DAA520` | 金黄 | + +### python-pptx 代码 + +```python +from pptx.dml.color import RGBColor +BG_YELLOW = RGBColor(255, 250, 230) +TITLE_BROWN = RGBColor(139, 90, 43) +TEXT_DARK = RGBColor(60, 45, 30) +BORDER = RGBColor(180, 140, 100) +pic.line.color.rgb = BORDER +pic.line.width = Pt(3) +``` + +--- + +## 三、字体与间距 + +| 元素 | 字号 | 字重 | 行距 | +|:---|:---|:---|:---| +| 封面主标题 | 40~48pt | Bold | 1.2 | +| 封面副标题 | 22~26pt | Regular | 1.0 | +| 页内标题 | 26~30pt | Bold | 1.1 | +| 正文 | 18~22pt | Regular | 1.4~1.6 | +| 图片说明 | 11~13pt | Regular | 1.0 | + +### 段落间距 + +- 标题与正文:`space_after = Pt(6~8)` +- 正文段落间:`space_after = Pt(6~10)` + +--- + +## 四、图片规范 + +| 规范 | 说明 | +|:---|:---| +| 边框 | 2~3pt,颜色与主题一致 | +| 说明 | 每张图下方或侧边配 1 行说明(「📷 这张图:…」) | +| 留白 | 图与文字间距 ≥0.3 英寸 | +| 比例 | 保持原图比例,width 或 height 二选一控制 | + +### python-pptx 加边框 + +```python +pic = slide.shapes.add_picture(img_path, left, top, width=width) +pic.line.color.rgb = RGBColor(180, 140, 100) +pic.line.width = Pt(3) +``` + +--- + +## 五、版式布局 + +### 左文右图(常用) + +- 文字区:0.5~6.5 英寸宽 +- 图片区:6.6~12.8 英寸宽 +- 标题区:0.4 英寸高 + +### 上下分割 + +- 标题 0.4 英寸 +- 内容区 1.2 英寸起 +- 底部留白 ≥0.5 英寸 + +--- + +## 六、验收检查清单 + +- [ ] 背景色统一,符合主题(商用白/绘本黄) +- [ ] 标题与正文字号、颜色符合规范 +- [ ] 所有图片有边框 +- [ ] 每张图有说明文字 +- [ ] 四周留白 ≥0.5 英寸 +- [ ] 单页文字 ≤7 行(不含标题) +- [ ] 风格与参考 PPT 一致(如有) + +--- + +## 七、外部参考 + +| 来源 | 链接 | 说明 | +|:---|:---|:---| +| python-pptx | https://github.com/scanny/python-pptx | 3.1k★ 官方库 | +| python-pptx 文档 | https://python-pptx.readthedocs.io/ | Quickstart、API | +| agentskills pptx | https://agentskills.me/skill/pptx | 594★,python-pptx 示例 | +| PPTAgent | https://github.com/icip-cas/PPTAgent | 1.3k★,超越文生 PPT | + +--- + +*总结:生成初版后按本规范做一次「配色+边框+留白+图片说明」检查,与 v0 前端「出稿→套毛玻璃→验收」逻辑一致。* diff --git a/运营中枢/工作台/gitea_push_log.md b/运营中枢/工作台/gitea_push_log.md index acd631aa..cde2843e 100644 --- a/运营中枢/工作台/gitea_push_log.md +++ b/运营中枢/工作台/gitea_push_log.md @@ -106,3 +106,4 @@ | 2026-02-23 10:25:20 | 🔄 卡若AI 同步 2026-02-23 10:25 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 8 个 | | 2026-02-23 14:51:49 | 🔄 卡若AI 同步 2026-02-23 14:51 | 更新:卡木、总索引与入口、运营中枢工作台 | 排除 >20MB: 8 个 | | 2026-02-23 14:56:38 | 🔄 卡若AI 同步 2026-02-23 14:56 | 更新:卡木、运营中枢工作台 | 排除 >20MB: 8 个 | +| 2026-02-23 15:05:27 | 🔄 卡若AI 同步 2026-02-23 15:05 | 更新:卡木、运营中枢工作台 | 排除 >20MB: 8 个 | diff --git a/运营中枢/工作台/代码管理.md b/运营中枢/工作台/代码管理.md index 7cc81796..bdf55f25 100644 --- a/运营中枢/工作台/代码管理.md +++ b/运营中枢/工作台/代码管理.md @@ -109,3 +109,4 @@ | 2026-02-23 10:25:20 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-23 10:25 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 8 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) | | 2026-02-23 14:51:49 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-23 14:51 | 更新:卡木、总索引与入口、运营中枢工作台 | 排除 >20MB: 8 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) | | 2026-02-23 14:56:38 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-23 14:56 | 更新:卡木、运营中枢工作台 | 排除 >20MB: 8 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) | +| 2026-02-23 15:05:27 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-23 15:05 | 更新:卡木、运营中枢工作台 | 排除 >20MB: 8 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |