Files
harheimertc/scripts/import-spielplan.js
Torsten Schulz (local) 459da00820
All checks were successful
Code Analysis and Production Deploy / analyze (push) Successful in 2m47s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Successful in 2m2s
fix(import): publish season spielplan json after import
2026-05-20 18:12:32 +02:00

19 lines
984 B
JavaScript

#!/usr/bin/env node
import { importSpielplan } from '../server/utils/spielplan-import.js'
import { importLeagueTables } from '../server/utils/spielklassen-tables-import.js'
import { publishImportedSpielplan } from '../server/utils/spielplan-publish.js'
const result = await importSpielplan()
const published = await publishImportedSpielplan({ inputPath: result.jsonFile })
const tables = await importLeagueTables()
console.log(`Spielplan gespeichert: ${result.jsonFile}`)
console.log(`Roh-HTML gespeichert: ${result.htmlFile}`)
console.log(`Spiele: ${result.matchCount}`)
console.log(`Zeitraum: ${result.source.season.dateStart} bis ${result.source.season.dateEnd}`)
console.log(`Spielplan publiziert: ${published.internalSeasonPath}`)
console.log(`Spielplan publiziert (public): ${published.publicSeasonPath}`)
console.log(`Tabellen gespeichert: ${tables.outputFile}`)
console.log(`Tabellen importiert: ${tables.importedCount}/${tables.teamCount} (Fehler: ${tables.errorCount})`)