refactor: extract config.py, add burn_only, fix title_segments and font size

- Extract all path/API config to config.py (single source of truth)
- Add run.py / burn_only.py / run.bat / burn.bat entry points
- burn_only: skip transcription/subtitle gen, fast reburn existing SRTs
- Fix title_segments: use transcript keyword time for split point
- Fix subtitle: each overlapping title shows max title_duration (not full clip)
- Fix burn_only font size: default from 90 to 60
- Delete old run_lesson1.bat/py, temp debug scripts
- Update README, ARCHITECTURE, CHANGELOG, add USAGE.md
This commit is contained in:
hmo
2026-05-03 23:22:10 +08:00
parent cf5004cf6a
commit aad1548348
39 changed files with 826 additions and 556 deletions
+15 -14
View File
@@ -5,31 +5,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [版本号] - 日期
## [Unreleased]
### Added
- 新功能
- `docs/USAGE.md` - 使用指南(run.bat / burn.bat / 修改知识点流程)
- `config.py` - 统一配置文件,所有路径和 API 配置集中管理
- `run.py` / `burn_only.py` - 独立入口脚本
- `--resume-from-burn` CLI 参数 - 快速烧录模式,跳过所有转录/字幕生成步骤
### Changed
- 功能变更
- `run.bat` / `burn.bat` 替代原有的 `run_lesson1.bat`(不再需要改多处配置)
- `ppt_parser.py`: 重叠片段的 `title_segments` 用 transcript 关键词首次出现时间计算切分点
- `pipeline.py`: 新增 `_recalculate_title_segments_from_transcript()`,在转录完成后用实际 transcript 数据修正标题切换时间
- `subtitle.py`: 多标题片段中每个标题最多显示 `title_duration` 秒(原逻辑会一直显示到片段结束)
- `pipeline.py`: `step_burn``title_fontsize` 默认值从 90 改为 60
### Fixed
- 问题修复
### Deprecated
- 弃用功能
- `ppt_parser.py`: 不重叠的 clip 残留 `title_segments` 导致标题显示时长错误
- `subtitle.py`: 重叠片段第二个标题显示时长超过 `title_duration`
- `pipeline.py`: 快速烧录模式因 `video_params` 为空导致字号使用默认值 90 而非 60
### Removed
- 移除的功能
### Security
- 安全相关
- `run_lesson1.bat` / `run_lesson1.py` - 旧入口,已由 `config.py` + `run.bat` / `burn.bat` 替代
---
## 示例
### [1.0.0] - 2026-05-02
## [1.0.0] - 2026-05-02
### Added
- 初始版本发布