This commit is contained in:
fengchuanhn@gmail.com
2026-05-21 00:19:11 +08:00
parent 1325ff92e5
commit 7f57dfa9ed
31 changed files with 10437 additions and 12 deletions

25
scripts/cover/README.md Normal file
View File

@@ -0,0 +1,25 @@
# 封面生成 Python 脚本
从 Electron `python-runtimebackup` 移植,供 Tauri 桌面端通过 Node `cover_generate.js` 调用。
## 目录
| 文件 | 用途 |
|------|------|
| `advanced_cover_generator.py` | 高级模板:虚化、抠图、描边、蒙版、多行标题等 |
| `cover_generator.py` | 中等复杂度:抽帧 + PIL 叠字 |
| `cover_preview_generator.py` | 多风格预览CLI 输出 JSON |
| `generate_cover_previews.py` | 批量生成模板预览图 |
| `generate_image_cover.py` | 静态图多风格封面 |
| `custom_template_cover_fix.py` | 自定义模板修复参考(补丁说明) |
| `modules/` | 人像分割、字体、封面模块 |
## 运行时
- Python`AICLIENT_PYTHON_PATH`(默认 `src-tauri/resources/resources-bundles/python-runtimebackup/python.exe`
- 脚本目录:`AICLIENT_COVER_SCRIPTS_DIR`(默认 `src-tauri/resources/cover-python/`
- FFmpeg需在 PATH 或 `AICLIENT_FFMPEG_PATH`
## 同步
开发时以本目录为源码;发布前请同步到 `aiclient/src-tauri/resources/cover-python/`(与 `resources/**/*` 一并打包)。