lastwebnovel-app/scripts/copy_covers_v2.ps1
2026-04-11 22:55:16 +02:00

39 lines
1.0 KiB
PowerShell

Set-Location "c:\Users\a.dchar\Documents\privé\lab\lastwebnovel"
$novels = @(
"astral-pet-store",
"emperors-domination",
"i-became-the-male-leads-adopted-daughter",
"infinite-mage-remake",
"my-disciples-are-all-villains",
"nano-machine",
"omniscient-readers-viewpoint",
"reaper-of-the-drifting-moon",
"reincarnation-of-the-strongest-sword-god",
"remarried-empress",
"silent-witch",
"the-eternal-supreme",
"the-great-mage-returns-after-4000-years",
"the-player-hides-his-past",
"the-steward-demonic-emperor",
"turns-out-im-in-a-villain-clan"
)
foreach ($slug in $novels) {
$src = "content/novels/$slug/cover.png"
$destDir = "public/images/$slug"
if (!(Test-Path $destDir)) {
New-Item -ItemType Directory -Path $destDir -Force | Out-Null
}
if (Test-Path $src) {
Copy-Item -Path $src -Destination "$destDir/cover.png" -Force
Write-Host "Copied: $slug"
} else {
Write-Host "Not found: $src"
}
}
Write-Host "Done!"