Phase 5 publish LibreBible catalog page

This commit is contained in:
2026-07-11 22:37:38 -05:00
parent 9b560be0ec
commit edbce26cd3
8 changed files with 880 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
param(
[string] $LibreBibleDataRoot = (Resolve-Path "$PSScriptRoot\..\..\..\libre-bible-data").Path,
[string] $SiteRoot = (Resolve-Path "$PSScriptRoot\..").Path
)
$sourceCatalogRoot = Join-Path $LibreBibleDataRoot "packages\json"
$targetCatalogRoot = Join-Path $SiteRoot "librebible\catalog"
if (-not (Test-Path (Join-Path $sourceCatalogRoot "catalog.json"))) {
throw "LibreBible catalog not found at $sourceCatalogRoot"
}
New-Item -ItemType Directory -Force -Path $targetCatalogRoot | Out-Null
Copy-Item -LiteralPath (Join-Path $sourceCatalogRoot "catalog.json") -Destination (Join-Path $targetCatalogRoot "catalog.json") -Force
Get-ChildItem -LiteralPath $sourceCatalogRoot -Directory | ForEach-Object {
$resourceCatalog = Join-Path $_.FullName "catalog.json"
if (Test-Path $resourceCatalog) {
$targetResourceDir = Join-Path $targetCatalogRoot $_.Name
New-Item -ItemType Directory -Force -Path $targetResourceDir | Out-Null
Copy-Item -LiteralPath $resourceCatalog -Destination (Join-Path $targetResourceDir "catalog.json") -Force
}
}
Write-Host "Synced LibreBible catalog metadata to $targetCatalogRoot"