自动同步: 2026-03-20 02:10

This commit is contained in:
2026-03-20 02:10:10 +08:00
parent d2a5e9a6ad
commit d9a5daca0a
67 changed files with 1526 additions and 220 deletions
+39
View File
@@ -444,3 +444,42 @@ class ArchiveOutput(StepOutput):
archive_file: str = Field(default="", description="Path to archived file")
skipped: bool = Field(default=False, description="Whether archiving was skipped")
platform: str = Field(default="", description="Platform name")
# =============================================================================
# SRT Schemas (Phase 12)
# =============================================================================
class SRTInput(StepInput):
"""SRT 步骤输入
用于 SRTProcessor 处理 B站字幕。
Attributes:
srt_file: SRT 字幕文件路径
metadata_file: 元数据 JSON 文件路径
output_file: 输出 Markdown 文件路径
content_type: 内容类型(默认 video)
"""
srt_file: str = Field(..., min_length=1, description="Path to SRT subtitle file")
metadata_file: str = Field(..., min_length=1, description="Path to metadata JSON file")
output_file: str = Field(..., min_length=1, description="Path to output Markdown file")
content_type: str = Field(default="video", description="Content type")
class SRTOutput(StepOutput):
"""SRT 步骤输出
继承 StepOutput 的基础字段,添加 SRT 处理特定字段。
Attributes:
output_file: 生成的 Markdown 文件路径
paragraphs: 生成的段落列表
tags: 提取的标签列表
corrected: 是否进行了 ASR 纠错
"""
output_file: str = Field(..., description="Path to generated Markdown file")
paragraphs: List[str] = Field(default_factory=list, description="Generated paragraphs")
tags: List[str] = Field(default_factory=list, description="Extracted tags")
corrected: bool = Field(default=False, description="Whether ASR correction was applied")