{"id":49074234,"url":"https://github.com/nlj626/html-to-pptx","last_synced_at":"2026-04-20T09:06:00.907Z","repository":{"id":352205959,"uuid":"1214271386","full_name":"nlj626/html-to-pptx","owner":"nlj626","description":"将 html-ppt 生成的 HTML 演示文稿一键转换为 PPTX / Convert html-ppt HTML presentations to PPTX in one click","archived":false,"fork":false,"pushed_at":"2026-04-18T11:04:56.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-18T13:05:49.739Z","etag":null,"topics":["claude-code","claude-skill","html-ppt","html-to-pptx","pptx","pptxgenjs","presentation"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nlj626.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-18T10:47:56.000Z","updated_at":"2026-04-18T11:05:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nlj626/html-to-pptx","commit_stats":null,"previous_names":["nlj626/html-to-pptx"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nlj626/html-to-pptx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlj626%2Fhtml-to-pptx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlj626%2Fhtml-to-pptx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlj626%2Fhtml-to-pptx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlj626%2Fhtml-to-pptx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlj626","download_url":"https://codeload.github.com/nlj626/html-to-pptx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlj626%2Fhtml-to-pptx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32040366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","claude-skill","html-ppt","html-to-pptx","pptx","pptxgenjs","presentation"],"created_at":"2026-04-20T09:05:56.805Z","updated_at":"2026-04-20T09:06:00.899Z","avatar_url":"https://github.com/nlj626.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# html-to-pptx\n\n将 [html-ppt](https://github.com/lewislulu/html-ppt-skill) 生成的 HTML 演示文稿一键转换为 PPTX 文件。\n\n## 工作原理\n\n1. **headless Chrome 截图**：利用 Chrome 的 `#/N` 深度链接，逐页将 HTML 渲染为 PNG 图片\n2. **pptxgenjs 组装**：将 PNG 图片按顺序嵌入 PPTX，每张图片铺满整页\n\n因为是截图方式，PPTX 会 **100% 还原 HTML 的视觉效果**，包括字体、颜色、布局、渐变等。\n\n\u003e **注意**：输出的 PPTX 中每页是一张图片，不可编辑文字。适合需要分享给只接受 PPTX 格式的场景。\n\n## 安装\n\n### 前置依赖\n\n- **Google Chrome**（macOS 默认路径 `/Applications/Google Chrome.app`）\n- **Node.js** \u003e= 18\n- **pptxgenjs**：`npm install -g pptxgenjs`\n\n### 作为 Claude Code Skill 安装\n\n```bash\n# 方法 1：通过 skills CLI（推荐）\nnpx skills add nlj626/html-to-pptx\n\n# 方法 2：手动\nmkdir -p ~/.claude/skills\ngit clone https://github.com/nlj626/html-to-pptx ~/.claude/skills/html-to-pptx\n```\n\n安装后，在 Claude Code 中说\"导出 PPTX\"即可自动触发。\n\n## 使用方式\n\n### 命令行\n\n```bash\nbash scripts/html-to-pptx.sh \u003chtml-file\u003e [N|all] [--ratio 16:9|4:3|3:4|1:1] [--quality N|png]\n```\n\n| 参数 | 说明 | 默认值 |\n|------|------|--------|\n| `\u003chtml-file\u003e` | html-ppt 生成的 HTML 文件路径 | 必填 |\n| `N` | 指定转换的页数 | `all`（自动检测） |\n| `--ratio` | 幻灯片宽高比 | `16:9` |\n| `--quality` | JPEG 压缩质量（1-100），或 `png` 强制无损 | `92` |\n\n### 示例\n\n```bash\n# 自动检测页数，默认 16:9\nbash scripts/html-to-pptx.sh my-deck/index.html\n\n# 指定 8 页\nbash scripts/html-to-pptx.sh my-deck/index.html 8\n\n# 4:3 宽高比\nbash scripts/html-to-pptx.sh my-deck/index.html all --ratio 4:3\n\n# 更小的文件（JPEG 质量 80）\nbash scripts/html-to-pptx.sh my-deck/index.html all -- --quality 80\n\n# 无损 PNG 格式\nbash scripts/html-to-pptx.sh my-deck/index.html all -- --quality png\n```\n\n### 作为 Claude Code Skill 使用\n\n安装后，在对话中说：\n\n- \"导出 PPTX\"\n- \"把这个 HTML 转成 PPT\"\n\n## 与 html-ppt 的关系\n\n本项目是 [html-ppt](https://github.com/lewislulu/html-ppt-skill) 的配套工具，将 HTML 演示文稿转换为通用 PPTX 格式，方便分享给不支持 HTML 的场景。\n\nhtml-ppt 使用 MIT 协议，本项目同样使用 MIT 协议，完全兼容。\n\n## 项目结构\n\n```\nhtml-to-pptx/\n├── SKILL.md              # Claude Code Skill 描述文件\n├── LICENSE              # MIT 许可证\n├── README.md            # 本文件\n├── .gitignore\n└── scripts/\n    ├── html-to-pptx.sh    # 主入口：截图 + 组装\n    ├── html-to-pptx.cjs    # PPTX 组装（pptxgenjs）\n    └── render.sh          # headless Chrome 截图\n```\n\n## 依赖说明\n\n| 依赖 | 用途 | 安装 |\n|------|------|------|\n| Google Chrome | headless 截图 | 系统自带 |\n| Node.js \u003e= 18 | 运行 pptxgenjs | [nodejs.org](https://nodejs.org) |\n| pptxgenjs | PPTX 文件生成 | `npm install -g pptxgenjs` |\n\n## License\n\nMIT © 2026 picaro\n\n---\n\n# html-to-pptx\n\nA companion tool for [html-ppt](https://github.com/lewislulu/html-ppt-skill) that converts HTML presentations to PPTX in one click.\n\n## How It Works\n\n1. **Headless Chrome screenshots**: Renders each slide to PNG via Chrome's `#/N` deep links\n2. **pptxgenjs assembly**: Embeds PNG images into PPTX, each filling the entire slide\n\nSince it uses screenshots, the PPTX **perfectly preserves the HTML visual output**, including fonts, colors, layout, and gradients.\n\n\u003e **Note**: Each slide in the output PPTX is an image — text is not editable. Ideal for sharing with audiences that only accept PPTX format.\n\n## Installation\n\n### Prerequisites\n\n- **Google Chrome** (macOS default path: `/Applications/Google Chrome.app`)\n- **Node.js** \u003e= 18\n- **pptxgenjs**: `npm install -g pptxgenjs`\n\n### Install as Claude Code Skill\n\n```bash\n# Method 1: via skills CLI (recommended)\nnpx skills add nlj626/html-to-pptx\n\n# Method 2: manual\nmkdir -p ~/.claude/skills\ngit clone https://github.com/nlj626/html-to-pptx ~/.claude/skills/html-to-pptx\n```\n\nAfter installation, just say \"export to PPTX\" in Claude Code to trigger.\n\n## Usage\n\n### Command Line\n\n```bash\nbash scripts/html-to-pptx.sh \u003chtml-file\u003e [N|all] [--ratio 16:9|4:3|3:4|1:1] [--quality N|png]\n```\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `\u003chtml-file\u003e` | Path to the HTML file | Required |\n| `N` | Number of slides to convert | `all` (auto-detect) |\n| `--ratio` | Slide aspect ratio | `16:9` |\n| `--quality` | JPEG quality (1-100), or `png` for lossless | `92` |\n\n### Examples\n\n```bash\n# Auto-detect slides, default 16:9\nbash scripts/html-to-pptx.sh my-deck/index.html\n\n# Specify 8 slides\nbash scripts/html-to-pptx.sh my-deck/index.html 8\n\n# 4:3 aspect ratio\nbash scripts/html-to-pptx.sh my-deck/index.html all --ratio 4:3\n\n# Smaller file (JPEG quality 80)\nbash scripts/html-to-pptx.sh my-deck/index.html all -- --quality 80\n\n# Lossless PNG\nbash scripts/html-to-pptx.sh my-deck/index.html all -- --quality png\n```\n\n### Use as Claude Code Skill\n\nAfter installation, say any of these in your conversation:\n\n- \"export to PPTX\"\n- \"convert HTML to PPT\"\n\n## Relationship with html-ppt\n\nThis is a companion tool for [html-ppt](https://github.com/lewislulu/html-ppt-skill). It converts HTML presentations to the widely-supported PPTX format for sharing in scenarios where HTML is not accepted.\n\nBoth projects use the MIT License and are fully compatible.\n\n## Project Structure\n\n```\nhtml-to-pptx/\n├── SKILL.md              # Claude Code Skill descriptor\n├── LICENSE              # MIT License\n├── README.md            # This file\n├── .gitignore\n└── scripts/\n    ├── html-to-pptx.sh    # Main entry: screenshot + assemble\n    ├── html-to-pptx.cjs    # PPTX assembly (pptxgenjs)\n    └── render.sh          # Headless Chrome screenshot\n```\n\n## Dependencies\n\n| Dependency | Purpose | Install |\n|------------|---------|---------|\n| Google Chrome | Headless screenshots | System |\n| Node.js \u003e= 18 | Run pptxgenjs | [nodejs.org](https://nodejs.org) |\n| pptxgenjs | PPTX generation | `npm install -g pptxgenjs` |\n\n## License\n\nMIT © 2026 picaro\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlj626%2Fhtml-to-pptx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlj626%2Fhtml-to-pptx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlj626%2Fhtml-to-pptx/lists"}