Add changelog viewer to runtime info

This commit is contained in:
Dymas
2026-05-26 20:06:03 +02:00
parent c757a58f69
commit 541cbe83bb
8 changed files with 111 additions and 4 deletions
+8
View File
@@ -25,6 +25,7 @@ PROJECT_ROOT = Path(__file__).resolve().parent
ANI_CLI = os.environ.get("ANI_CLI_BIN") or shutil.which("ani-cli") or "ani-cli"
APP_NAME = "ani-cli-web"
VERSION_FILE = PROJECT_ROOT / "VERSION"
CHANGELOG_FILE = PROJECT_ROOT / "CHANGELOG.md"
ALLANIME_BASE = "allanime.day"
ALLANIME_API = f"https://api.{ALLANIME_BASE}"
ALLANIME_REFERER = "https://allmanga.to"
@@ -87,6 +88,13 @@ def load_app_version(default="0.0.0"):
return version or default
def load_project_text_file(path, default=""):
try:
return Path(path).read_text(encoding="utf-8")
except OSError:
return default
VERSION = load_app_version()