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:
@@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
完整流水线 - 从 PPT 解析到最终视频输出
|
||||
配置统一在 config.py 中管理。
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
# 导入统一配置
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
import config
|
||||
|
||||
env = os.environ.copy()
|
||||
env["PATH"] = os.path.dirname(config.PYTHON) + ";" + env.get("PATH", "")
|
||||
|
||||
cmd = [
|
||||
config.PYTHON,
|
||||
os.path.join(config.CLI_DIR, "src", "cli.py"),
|
||||
"--video", config.VIDEO,
|
||||
"--ppt", config.PPT,
|
||||
"--output", config.OUTPUT,
|
||||
"--api-key", config.API_KEY,
|
||||
"--api-host", config.API_HOST,
|
||||
"--max-total-duration", str(config.MAX_TOTAL_DURATION),
|
||||
"--verbose",
|
||||
]
|
||||
|
||||
print(f"Running pipeline...")
|
||||
print(f" Video: {config.VIDEO}")
|
||||
print(f" PPT: {config.PPT}")
|
||||
print(f" Output: {config.OUTPUT}")
|
||||
print()
|
||||
|
||||
proc = subprocess.Popen(cmd, cwd=config.CLI_DIR, env=env)
|
||||
proc.wait()
|
||||
Reference in New Issue
Block a user