Skip to content

v2.0.0 · 导出管线重做,新增切换与动画

Latest

Choose a tag to compare

@Akxan Akxan released this 18 Nov 14:23

这一版重做了 PPTX 导出管线,新增页间切换与卡片入场动画,并把仓库收敛为 SKILL.md 的 6 步单一流程。共 167 个文件变更,净减约 1 万行。

在线预览 26 个风格:https://akxan.github.io/ppt-agent-skill/

新增

  • 页间切换:fade / push / wipe / cover / split / zoom / dissolve,默认 fade。
  • 卡片入场动画:fade / wipe / rise / zoom,可选点击逐张出现或自动连播。需求调研第 7 题会询问是否需要,导出时用 svg2pptx.py --animate。
  • 浏览器里预览动效:html_packager.py --animate,没有 PowerPoint 也能看到卡片入场效果。
  • 严格模式(可选):scripts/validate.py 在每一步后校验大纲、策划稿、风格、设计稿与截图,说明见 references/strict-mode.md。
  • 字体映射:svg2pptx.py --fonts safe|design,默认映射到系统常见字体并按宽度微调字号,避免文字溢出。
  • 在线风格画廊:ppt-output/style-gallery/ 自动发布到 GitHub Pages。

修复

  • 暗色与径向渐变风格导出后背景丢失、出现白底白字。径向 / 多层渐变、滤镜、蒙版、旋转等无法矢量化的效果现在自动转成图层,其余内容保持可编辑。
  • svg2pptx.py 重写:完整的仿射变换、多边形与折线、弧线路径、环形进度、字距、斜体、竖排文字;卡片内的形状会打成组合。
  • 图表模板的渐变描边在 PPTX 中丢失。
  • 多个风格 mock 的布局问题,以及文档与实现不一致之处。

导出结果用真实 PowerPoint 渲染、对照浏览器截图逐一检查过 26 个风格。仍有少数 CSS 效果在可编辑 PPTX 中会丢失或退化(text-shadow、渐变文字、backdrop-filter、box-shadow),清单见 references/pipeline-compat.md;需要完全一致时用 html2png.py + png2pptx.py 生成像素级保真版。

破坏性变更

  • 移除子代理调度链:references/prompts/、references/playbooks/、references/cli-cheatsheet.md,以及 prompt_harness.py、subagent_logger.py、milestone_check.py、check_skill.py、smoke_skill.py、workflow_versions.py、contract_validator.py、planning_validator.py、visual_qa.py。这套流程此前未接通,校验功能由 scripts/validate.py 取代。
  • svg2pptx.py 去掉 --html-dir 参数;html2svg.py 去掉 pdf2svg 降级方案。
  • 枚举、图表注册表与兼容规则统一由 scripts/contracts.py 定义,其他脚本不再各自维护一份。
  • 删除了与现有文档重复的 design-specs.md、style-system.md 等文件,内容已并入 bento-grid.md 与 styles/index.md。

需要旧版的话:git checkout 01825de。

环境要求

  • Python ≥ 3.9:pip install python-pptx lxml Pillow
  • Node.js ≥ 18:puppeteer 在首次导出时自动安装(会下载 Chrome,约 600 MB)
  • 缺少以上依赖时仍可产出 HTML 预览,只是跳过 SVG 与 PPTX 导出

安装 / 升级

# 新安装
git clone --depth 1 https://github.com/Akxan/ppt-agent-skill ~/.claude/skills/ppt-agent-skill

# 已安装
cd ~/.claude/skills/ppt-agent-skill && git pull

English summary — v2.0.0 rebuilds the PPTX export pipeline and adds motion. Dark and radial-gradient styles no longer lose their backgrounds: effects that cannot be vectorized are baked into image layers while text and shapes stay editable. New: slide transitions (7 kinds), per-card entrance animations (4 kinds, on click or automatic), an animated browser preview, an optional strict-mode validator (scripts/validate.py), and a live gallery of all 26 styles. Breaking: the unused sub-agent orchestration chain (references/prompts/, references/playbooks/, and nine helper scripts) has been removed, along with svg2pptx.py --html-dir and the pdf2svg fallback. Requires Python ≥ 3.9 and Node.js ≥ 18. The previous version is at commit 01825de.

完整变更:01825de...v2.0.0