Skip to main content

A CSS-first, native PPTX rendering engine for AI Agents.

Reason this release was yanked:

renew

Project description

Deck - PPT生成工具

项目简介

基于LLM的智能PPT生成工具,支持从Word文档生成专业的PowerPoint演示文稿。

快速开始

安装依赖

pip install -r requirements.txt

基本使用

python cli.py --framework framework_template.pptx --fill-prompt "你的需求描述"

目录结构

Deck/
├── README.md                    # 项目说明(本文件)
├── requirements.txt              # Python依赖
├── Demo文档.docx                 # 示例文档
│
├── docs/                        # 📚 文档目录
│   ├── DIRECTORY_ORGANIZATION.md # 目录整理说明
│   ├── DESIGN_SYSTEM.md         # 设计系统文档
│   ├── TEST_GUIDE.md            # 测试指南
│   └── ...                      # 其他文档
│
├── logs/                        # 📝 日志目录
│   └── *.log                    # 所有日志文件
│
├── outputs/                     # 📊 输出目录
│   └── ppt/                     # PPT文件
│
├── tests/                       # 🧪 测试目录
│   └── test_*.py               # 测试脚本
│
├── debug/                       # 🐛 调试目录
│   ├── debug_*.py              # 调试脚本
│   ├── *.html                  # HTML调试文件
│   └── *.png                   # 截图文件
│
├── config/                      # ⚙️ 配置目录
│   └── *.json                  # 配置文件
│
├── examples/                    # 📖 示例目录
│   ├── demo_*.py               # 演示脚本
│   └── example_*.json          # 示例JSON
│
└── [核心代码模块]                # 核心Python模块
    ├── ppt_filler.py           # PPT填充器
    ├── html_generator.py       # HTML生成器
    ├── human_centered_analyzer.py # 人类中心化分析器
    └── ...

核心功能

1. 人类中心化分析

  • 6层深度分析
  • 智能识别文档结构和内容

2. 内容生成

  • 内容润色(ContentPolisher)
  • 展示策划(PresentationPlanner)
  • 布局规划(LayoutPlanner)
  • 颜色配置(ColorConfigurator)

3. HTML生成

  • 基于Ant Design规范
  • 24栅格系统布局
  • 支持颜色配置

4. PPT转换

  • 浏览器渲染(Playwright)
  • 元素分析和提取
  • 坐标映射和PPT复刻

使用模式

HTML生成模式(推荐用于开发调试)

跳过PPT转换,仅生成HTML文件:

output_path = await filler.fill_from_prompt(
    prompt=user_prompt,
    output_path="output.pptx",
    use_enhanced_analysis=True,
    skip_ppt_conversion=True  # 跳过PPT转换
)

HTML文件将保存在 html_output/ 目录中。

完整PPT生成模式

生成完整的PPT文件:

output_path = await filler.fill_from_prompt(
    prompt=user_prompt,
    output_path="output.pptx",
    use_enhanced_analysis=True,
    skip_ppt_conversion=False  # 默认值
)

测试

运行完整流程测试:

python tests/test_docx_to_ppt_full_flow.py

文档

详细文档请查看 docs/ 目录:

  • docs/DIRECTORY_ORGANIZATION.md - 目录结构说明
  • docs/DESIGN_SYSTEM.md - 设计系统文档
  • docs/TEST_GUIDE.md - 测试指南
  • 更多文档...

开发

代码结构

  • 核心模块:保留在根目录,便于导入
  • 工具脚本:部分保留在根目录(如 create_framework_ppt.py
  • 测试脚本:位于 tests/ 目录
  • 调试脚本:位于 debug/ 目录

目录整理规则

详见 docs/DIRECTORY_ORGANIZATION.md

许可证

[待添加]

贡献

[待添加]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_deck-0.1.0.tar.gz (155.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_deck-0.1.0-py3-none-any.whl (159.2 kB view details)

Uploaded Python 3

File details

Details for the file langchain_deck-0.1.0.tar.gz.

File metadata

  • Download URL: langchain_deck-0.1.0.tar.gz
  • Upload date:
  • Size: 155.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for langchain_deck-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8dbca990fcb13509112c777e687db64c18838f69fc8b85043e271d4c5a6e630b
MD5 5debd18cc82a02d4d0094191483dbb3c
BLAKE2b-256 c13ddc1d4ea6e8976c34b109548776890f7637dbaf11c915653b3dd7ddb78029

See more details on using hashes here.

File details

Details for the file langchain_deck-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: langchain_deck-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 159.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for langchain_deck-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c1fc615c4de56d86ae658a2cdc3d44b86ed0b674ee90a21f55b1209aa728740
MD5 1dc330297eec33ac19de4b40712f7ef7
BLAKE2b-256 3ffd2b43e8f3bc7f2f61ae42b84556524ad903a3828a78134ee96249585f97d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page