story(vol08): 完成165至192章与森林救援阅读包

This commit is contained in:
2026-11-01 17:16:50 +08:00
parent 1e635c2ad8
commit 4ead03a2c2
57 changed files with 13923 additions and 36 deletions
+31 -1
View File
@@ -230,6 +230,8 @@ def build_novel_edition(chapters, destination, title, scope, edition_date):
parts.append('# 第六卷 紫发魔王')
elif path.name.startswith('137_'):
parts.append('# 第七卷 第一片新田')
elif path.name.startswith('165_'):
parts.append('# 第八卷 森林的病季')
parts.append(re.sub(r'^(#+) ', r'\1# ', source, flags=re.M).rstrip())
write(destination, '\n\n'.join(parts) + '\n')
return count
@@ -328,6 +330,30 @@ def build_seven_volume_editions(edition_date):
print(seventh_out)
def build_eight_volume_editions(edition_date):
"""汇集八卷当前范围,不重写旧阅读本和影像资料。"""
chapters = []
for volume in ('第一卷', '第二卷', '第三卷', '第四卷', '第五卷', '第六卷', '第七卷', '第八卷'):
paths = (NOVEL / '03_正文' / volume).glob('*.md')
chapters.extend(sorted((p for p in paths if re.match(r'^\d+_', p.name)),
key=lambda p: int(p.name.split('_', 1)[0])))
numbers = [int(p.name.split('_', 1)[0]) for p in chapters]
if numbers != list(range(193)):
raise ValueError('八卷应为序章00和正文01—192,无缺号或重复')
eighth = [p for p in chapters if 165 <= int(p.name.split('_', 1)[0]) <= 192]
combined = NOVEL / '前192章_阅读合订本.md'
eighth_out = NOVEL / '第八卷_森林的病季_阅读合订本.md'
full_count = build_novel_edition(chapters, combined,
'《寂静诸神:炉火》前八卷阅读合订本',
'独立序章+正文1—192章;第一、二、五、六卷各24章,第三、四卷各20章,第七、八卷各28章完整初稿', edition_date)
eighth_count = build_novel_edition(eighth, eighth_out,
'第八卷《森林的病季》阅读合订本',
'总第165—192章,共28章;876春—初夏,卢西安20岁、艾达19岁、伊瑟拉682岁', edition_date)
print(f'小说192章+序章;约{full_count:,}汉字;第八卷28章约{eighth_count:,}汉字(含标题)')
print(combined)
print(eighth_out)
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--date', required=True)
@@ -337,7 +363,9 @@ def main():
if args.novel_only:
if args.refresh_reading:
parser.error('--novel-only不能与--refresh-reading同时使用')
if (NOVEL / '03_正文/第七卷/164_下一季的座位.md').is_file():
if (NOVEL / '03_正文/第八卷/192_她自己要走的路.md').is_file():
build_eight_volume_editions(args.date)
elif (NOVEL / '03_正文/第七卷/164_下一季的座位.md').is_file():
build_seven_volume_editions(args.date)
elif (NOVEL / '03_正文/第六卷/136_春水进渠之前.md').is_file():
build_six_volume_editions(args.date)
@@ -439,6 +467,8 @@ def main():
build_six_volume_editions(args.date)
if (NOVEL / '03_正文/第七卷/164_下一季的座位.md').is_file():
build_seven_volume_editions(args.date)
if (NOVEL / '03_正文/第八卷/192_她自己要走的路.md').is_file():
build_eight_volume_editions(args.date)
print(f'EP02—12录制台词:{len(all_rows)};各集:{episode_counts}')
print('已核对11集Fountain与阅读稿台词逐条一致。')
print(full_out)