feat(import): add daily click-tt league table import by season
Some checks failed
Code Analysis and Production Deploy / analyze (push) Failing after 2m39s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Has been skipped

This commit is contained in:
Torsten Schulz (local)
2026-05-20 17:28:07 +02:00
parent 3658589d94
commit 21b39d4e5c
3 changed files with 241 additions and 2 deletions

View File

@@ -1,10 +1,14 @@
#!/usr/bin/env node
import { importSpielplan } from '../server/utils/spielplan-import.js'
import { importLeagueTables } from '../server/utils/spielklassen-tables-import.js'
const result = await importSpielplan()
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(`Tabellen gespeichert: ${tables.outputFile}`)
console.log(`Tabellen importiert: ${tables.importedCount}/${tables.teamCount} (Fehler: ${tables.errorCount})`)