moved website outside of panel folder
This commit is contained in:
parent
92ac778956
commit
08f07dca97
10328 changed files with 90 additions and 501 deletions
46
Website/update_metadata_complete.ps1
Normal file
46
Website/update_metadata_complete.ps1
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Update all metadata.json files to add "complete" field
|
||||
# Minecraft is marked as complete, all others are marked as incomplete (TODO)
|
||||
|
||||
$docsPath = "c:\Users\FrankHarris\Desktop\Projects\Xampp\htdocs\GSP\modules\billing\docs"
|
||||
|
||||
# Games that are complete
|
||||
$completeGames = @('minecraft')
|
||||
|
||||
# Get all subdirectories
|
||||
$folders = Get-ChildItem -Path $docsPath -Directory
|
||||
|
||||
$updated = 0
|
||||
$skipped = 0
|
||||
|
||||
foreach ($folder in $folders) {
|
||||
$metadataPath = Join-Path $folder.FullName "metadata.json"
|
||||
|
||||
if (Test-Path $metadataPath) {
|
||||
# Read the metadata file
|
||||
$json = Get-Content $metadataPath -Raw | ConvertFrom-Json
|
||||
|
||||
# Check if "complete" field already exists
|
||||
if ($null -eq $json.complete) {
|
||||
# Determine if this game is complete
|
||||
$isComplete = $completeGames -contains $folder.Name
|
||||
|
||||
# Add the complete field
|
||||
$json | Add-Member -MemberType NoteProperty -Name "complete" -Value $isComplete
|
||||
|
||||
# Write back to file with proper formatting
|
||||
$json | ConvertTo-Json -Depth 10 | Set-Content $metadataPath -Encoding UTF8
|
||||
|
||||
Write-Host "Updated: $($folder.Name) - complete: $isComplete" -ForegroundColor Green
|
||||
$updated++
|
||||
} else {
|
||||
Write-Host "Skipped: $($folder.Name) - already has complete field" -ForegroundColor Yellow
|
||||
$skipped++
|
||||
}
|
||||
} else {
|
||||
Write-Host "No metadata.json in: $($folder.Name)" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "`nSummary:" -ForegroundColor Cyan
|
||||
Write-Host " Updated: $updated" -ForegroundColor Green
|
||||
Write-Host " Skipped: $skipped" -ForegroundColor Yellow
|
||||
Loading…
Add table
Add a link
Reference in a new issue