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 = {
|
||||
|
||||
Reference in New Issue
Block a user