feat: 完成前三卷与动漫真人双版本制作包

This commit is contained in:
2026-10-31 02:15:18 +08:00
parent f900237d96
commit 9b7ce1d4b5
954 changed files with 62898 additions and 1116 deletions
+25 -5
View File
@@ -1,4 +1,4 @@
param()
param()
$ErrorActionPreference = 'Stop'
$projectRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
@@ -14,6 +14,7 @@ $markdownFiles = Get-ChildItem -LiteralPath $projectRoot -Filter '*.md' -File -R
Where-Object { $_.FullName -notmatch '[\\/]\.git[\\/]' }
foreach ($file in $markdownFiles) {
$source = Get-Content -LiteralPath $file.FullName -Raw -Encoding UTF8
if ([string]::IsNullOrEmpty($source)) { continue }
foreach ($match in [regex]::Matches($source, '\[[^\]]*\]\(([^)]+)\)')) {
$target = $match.Groups[1].Value.Trim().Trim('<', '>')
if ($target -match '^(https?://|mailto:|codex:|#)' -or $target -match '[<>]') { continue }
@@ -138,7 +139,7 @@ if ($cumulative -ne 75) { $failures.Add("Expected 75 seconds, got $cumulative")
$bodyStart = $scriptText.IndexOf('INT. ')
$scriptChars = if ($bodyStart -ge 0) { [regex]::Replace($scriptText.Substring($bodyStart), '\s', '').Length } else { 0 }
$novelFiles = Get-ChildItem -LiteralPath (Join-Path $projectRoot '05_小说创作/03_正文/第一卷') -Filter '*.md' -File | Where-Object { $_.Name -match '^\d{2}_' }
$novelFiles = @(Get-ChildItem -LiteralPath (Join-Path $projectRoot '05_小说创作/03_正文') -Filter '*.md' -File -Recurse | Where-Object { $_.Name -match '^\d{2}_' })
$novelChars = ($novelFiles | ForEach-Object { [regex]::Replace((Get-Content -LiteralPath $_.FullName -Raw -Encoding UTF8), '\s', '').Length } | Measure-Object -Sum).Sum
$pngCount = @(Get-ChildItem -LiteralPath (Join-Path $projectRoot '06_AI动漫制作') -Filter '*.png' -File -Recurse).Count
@@ -285,9 +286,28 @@ if (($chapterIds -join ',') -ne ((1..24) -join ',')) { $failures.Add('Expected 2
$episodeText = Read-ProjectText '06_AI动漫制作/01_改编开发/02_分集大纲/第一季_12集分集大纲.md'
$episodeIds = @([regex]::Matches($episodeText, '(?m)^\| (\d+) \|') | ForEach-Object { [int]$_.Groups[1].Value })
if (($episodeIds -join ',') -ne ((1..12) -join ',')) { $failures.Add('Expected 12 ordered V03 episode rows') }
$expectedDrafts = @('00_序章_下班以后.md','01_留给你的那一碗.md','02_灰片留下的事.md','03_贤者之席.md')
if (($novelFiles.Name | Sort-Object) -join ',' -ne (($expectedDrafts | Sort-Object) -join ',')) {
$failures.Add('Active novel opening must contain only the four V03 drafts')
# The writing now extends through chapter 68; allow subsequent chapters without
# freezing progress at today's count, while rejecting gaps and duplicate IDs.
$firstVolumeIds = @($novelFiles | Where-Object { $_.Directory.Name -eq '第一卷' } | ForEach-Object { [int]$_.Name.Substring(0, 2) } | Sort-Object)
if (($firstVolumeIds -join ',') -ne ((0..24) -join ',')) {
$failures.Add('Volume one must contain the prologue and chapters 1-24')
}
$draftIds = @($novelFiles | ForEach-Object { [int]$_.Name.Substring(0, 2) } | Sort-Object)
if ($draftIds.Count -lt 69 -or ($draftIds -join ',') -ne ((0..($draftIds.Count - 1)) -join ',')) {
$failures.Add('Novel draft IDs must be unique, continuous from 00 and reach at least chapter 68')
}
$secondVolumeIds = @($novelFiles | Where-Object { $_.Directory.Name -eq '第二卷' } | ForEach-Object { [int]$_.Name.Substring(0, 2) } | Sort-Object)
if (($secondVolumeIds -join ',') -ne ((25..48) -join ',')) {
$failures.Add('Volume two must contain chapters 25-48')
}
$thirdVolumeIds = @($novelFiles | Where-Object { $_.Directory.Name -eq '第三卷' } | ForEach-Object { [int]$_.Name.Substring(0, 2) } | Sort-Object)
if (($thirdVolumeIds -join ',') -ne ((49..68) -join ',')) {
$failures.Add('Volume three must contain chapters 49-68')
}
$thirdOutline = Read-ProjectText '05_小说创作/02_章节大纲/第三卷_章节大纲.md'
$thirdOutlineIds = @([regex]::Matches($thirdOutline, '(?m)^\| (\d+) \|') | ForEach-Object { [int]$_.Groups[1].Value })
if (($thirdOutlineIds -join ',') -ne ($thirdVolumeIds -join ',')) {
$failures.Add('Volume three chapter outline and prose IDs differ')
}
foreach ($legacy in @(
'06_AI动漫制作/03_分镜与镜头/01_镜头表/S01E01_SC12_75秒试片镜头表.md',