init: html2pptx project scaffold + requirements doc
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# html2pptx
|
||||
|
||||
HTML to editable PPTX export engine.
|
||||
|
||||
将 HTML 演示文稿导出为**文字可编辑、布局可还原**的 PPTX 文件。
|
||||
|
||||
## 原理
|
||||
|
||||
```
|
||||
HTML 文件 → HTTP 服务 → Chrome headless 渲染 → DOM 遍历提取位置/样式 → pptxgenjs 生成 PPTX
|
||||
```
|
||||
|
||||
## 依赖
|
||||
|
||||
- Node.js 18+
|
||||
- Chrome / Chromium / Edge(用于渲染页面)
|
||||
|
||||
## 使用
|
||||
|
||||
```bash
|
||||
# 安装
|
||||
npm install
|
||||
|
||||
# 导出
|
||||
node bin/html2pptx input.html output.pptx
|
||||
```
|
||||
|
||||
## 核心依赖
|
||||
|
||||
| 包 | 用途 |
|
||||
|---|------|
|
||||
| playwright | 控制 Chrome headless 渲染页面 |
|
||||
| pptxgenjs | 生成 PPTX 文件 |
|
||||
| http-server | 本地静态文件服务(可选) |
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Reference in New Issue
Block a user