Rundenbasierte PGN-URLs (aktuell Runde 2)

This commit is contained in:
2026-05-24 15:39:47 +02:00
parent ab4486cc98
commit 82e37fb9bf

View File

@@ -17,11 +17,12 @@ import json
import re
from datetime import datetime
PGN_URL = os.environ.get("PGN_URL", "https://www.deutsche-schachjugend.de/2026/odjm-d/partien/gesamt-utf8.pgn")
CURRENT_ROUND = int(os.environ.get("CURRENT_ROUND", 2))
PGN_URL = f"https://www.deutsche-schachjugend.de/2026/odjm-d/partien/{CURRENT_ROUND}.pgn"
STANDINGS_URL = "https://www.deutsche-schachjugend.de/2026/odjm-d/tabelle/"
PORT = int(os.environ.get("PORT", 8111))
CACHE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "cache")
CACHE_FILE = os.path.join(CACHE_DIR, "gesamt-utf8.pgn")
CACHE_FILE = os.path.join(CACHE_DIR, f"runde-{CURRENT_ROUND}.pgn")
STANDINGS_CACHE_FILE = os.path.join(CACHE_DIR, "standings.json")
CACHE_TTL = int(os.environ.get("CACHE_TTL", 31)) # Sekunden