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:
@@ -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 = {
|
||||
|
||||
@@ -6,7 +6,7 @@ import json
|
||||
import requests
|
||||
from pathlib import Path
|
||||
|
||||
TOKEN_PATH = Path(__file__).parent / "token.txt"
|
||||
TOKEN_PATH = Path(__file__).resolve().parent.parent / "token.txt"
|
||||
GRAPHQL_URL = "https://api.medevio.cz/graphql"
|
||||
CLINIC_SLUG = "mudr-buzalkova"
|
||||
REQUEST_ID = "6b46b5a8-b080-4821-86b0-39adabeec86b"
|
||||
|
||||
@@ -37,9 +37,7 @@ DRY_RUN = False
|
||||
GRAPHQL_URL = "https://api.medevio.cz/graphql"
|
||||
CLINIC_SLUG = "mudr-buzalkova"
|
||||
|
||||
TOKEN_PATH = Path(__file__).parent / "token.txt"
|
||||
if not TOKEN_PATH.exists():
|
||||
raise SystemExit("❌ token.txt not found")
|
||||
TOKEN_PATH = Path(__file__).resolve().parent.parent / "token.txt"
|
||||
|
||||
gateway_token = TOKEN_PATH.read_text(encoding="utf-8").strip()
|
||||
headers = {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
nYvrvgflIKcDiQg8Hhpud+qG8iGZ8eH8su4nyT/Mgcm7XQp65ygY9s39+O01wIpk/7sKd6fBHkiKvsqH
|
||||
Reference in New Issue
Block a user