Private
Public Access
1
0

new: dev: initialize the GTK client #11

This commit is contained in:
2026-04-28 08:28:51 +02:00
parent 199bb7e525
commit 6484133199
29 changed files with 2788 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
"""
This file is part of the SplendidBear Websites' projects.
Copyright (c) 2026 @ www.splendidbear.org
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
"""
import os
from pathlib import Path
from dotenv import load_dotenv
# Load .env from the gtk-client/ directory (parent of this package)
_env_path = Path(__file__).parent.parent / ".env"
load_dotenv(dotenv_path=_env_path)
BASE_URL: str = os.environ.get("MINESEEKER_BASE_URL", "").rstrip("/")
MERCURE_URL: str = os.environ.get("MINESEEKER_MERCURE_URL", "").rstrip("/")
if not BASE_URL:
raise EnvironmentError(
"MINESEEKER_BASE_URL is not set. "
"Copy gtk-client/.env.example to gtk-client/.env and fill in the values."
)
if not MERCURE_URL:
# Fall back to <BASE_URL>/.well-known/mercure if not explicitly set
MERCURE_URL = f"{BASE_URL}/.well-known/mercure"