Files
yaoyaoai/scripts/cover/README.md
fengchuanhn@gmail.com 7f57dfa9ed 11
2026-05-21 00:19:11 +08:00

26 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 封面生成 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/**/*` 一并打包)。