Centralize token.txt to project root

- Updated 35 scripts to read token.txt from project root
  using Path(__file__).resolve().parent.parent / "token.txt"
- Removed 6 duplicate token.txt files from subdirectories
- Single token.txt in project root serves all scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 18:27:38 +01:00
parent 5992a01cdd
commit d783882cf6
42 changed files with 37 additions and 48 deletions

View File

@@ -50,11 +50,7 @@ timestamp = datetime.now().strftime("%Y-%m-%d %H-%M-%S")
xlsx_path = EXPORT_DIR / f"{timestamp} Agenda + Požadavky.xlsx"
# ==================== LOAD TOKEN ====================
TOKEN_PATH = Path("token.txt")
if not TOKEN_PATH.exists():
TOKEN_PATH = Path(__file__).parent / "token.txt"
if not TOKEN_PATH.exists():
raise SystemExit(f"❌ token.txt not found")
TOKEN_PATH = Path(__file__).resolve().parent.parent / "token.txt"
gateway_token = TOKEN_PATH.read_text(encoding="utf-8").strip()
headers = {