# genppt **Repository Path**: side-project_1/genppt ## Basic Information - **Project Name**: genppt - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-10 - **Last Updated**: 2026-05-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 论文答辩 PPT 生成器 稳定工作流:`.docx -> 论文解析/图片提取 -> 大纲 JSON -> PptxGenJS 蓝色答辩模板 -> PPT`。 当前默认使用 **Node.js** 完成论文解析、图片提取和大纲生成,再用 PptxGenJS 渲染 PPT。Python 版本代码保留在仓库中,但默认工作流和网站服务都不再调用它。 ## 目录结构 ```text genppt/ README.md package.json package-lock.json requirements.txt scripts/ analyze_paper.js analyze_paper.py run_job.js generate_presentation.js render_presentation.js examples/ sample-thesis.docx outputs/ sample-thesis/ defense-presentation.pptx analysis.json outline.json images/ ``` ## 安装依赖 ```bash npm install ``` 如果需要运行备用 Python 解析器,再安装 Python 依赖: ```bash python3 -m pip install -r requirements.txt ``` ## MiniMax 配置 不配置 token 时使用本地规则生成大纲;配置后优先使用 MiniMax 优化内容、选图和讲稿。 ```bash export MINIMAX_API_KEY="你的 Token Plan API Key" export MINIMAX_BASE_URL="https://api.minimaxi.com/v1" export MINIMAX_MODEL="MiniMax-M2.7" ``` ## 生成 PPT 默认读取 `examples/sample-thesis.docx`,输出到 `outputs/sample-thesis/`: ```bash npm run generate ``` 指定任意论文,默认输出到 `outputs/<论文文件名>/`: ```bash npm run generate -- path/to/thesis.docx ``` 指定输出目录: ```bash npm run generate -- path/to/thesis.docx --out outputs/case-001 ``` 指定页数和模型模式: ```bash npm run generate -- path/to/thesis.docx --slides 18 --llm auto npm run generate -- path/to/thesis.docx --slides 18 --llm local ``` 输出目录结构: ```text outputs/case-001/ defense-presentation.pptx analysis.json outline.json images/ ``` ## 网站工作流 Next.js 前端提供上传、进度、预览编辑和下载四步体验。后端使用异步任务目录保存状态和产物: ```text outputs/web-jobs// status.json upload.docx analysis.json outline.json defense-presentation.pptx images/ ``` 任务状态会从 `uploaded`、`analyzing`、`outlining`、`checking` 推进到 `ready_to_edit`。用户确认大纲后再进入 `rendering` 和 `done`。 ## 文件职责 - `scripts/generate_presentation.js`:命令行统一入口,串联 Node 解析和 PptxGenJS 渲染。 - `scripts/analyze_paper.js`:默认解析 `.docx`、提取图片、识别图注、图片分类、生成大纲。 - `scripts/analyze_paper.py`:旧版 Python 解析器,仅保留代码,不在默认链路中使用。 - `scripts/run_job.js`:网站后端异步任务执行器,负责更新任务状态。 - `scripts/render_presentation.js`:读取 JSON 和图片,生成最终可编辑 PPT。 - `examples/`:示例论文。 - `outputs/`:所有生成结果,按论文或案例分目录保存。 ## 适用范围 优先适配中国大陆计算机类本科毕业论文,尤其是: - 微信小程序 - Web 管理系统 - 学生管理系统 - 预约管理系统 - 商城/外卖/图书馆等常见业务系统 - Spring Boot / Vue / MySQL / 小程序等技术栈