Compare commits

..
Author SHA1 Message Date
aclist 49298d9943 change: normalize endpoint names 2026-11-09 23:51:19 +09:00
10 changed files with 31 additions and 37 deletions

No files matched your search

-2
View File
@@ -37,8 +37,6 @@ Users wishing to review the licenses to these components can inspect the `LICENS
Steam and the Steam logo are trademarks and/or registered trademarks of Valve Corporation in the U.S. and/or other countries.
DayZ is a trademark and brand of Bohemia Interactive a.s.
## Disclaimer
DZGUI is beta-quality software and is provided as-is.
+6 -6
View File
@@ -31,10 +31,10 @@ from dzgui.const.constants import (
VDF_PATH,
)
from dzgui.const.endpoints import (
APP_DETAILS,
SUB_ENDPOINT,
STEAM_APP_DETAILS,
STEAM_PUBLISHED_FILES,
UNSUB_ENDPOINT,
STEAM_SUB,
STEAM_UNSUB,
)
from dzgui.strings import wizard
from dzgui.strings.errors import api_validation_error, workshop_endpoint_error
@@ -310,11 +310,11 @@ def update_workshop(key: str, mod: int, endpoint: str) -> None:
def subscribe(key: str, mod: int) -> None:
update_workshop(key, mod, SUB_ENDPOINT)
update_workshop(key, mod, STEAM_SUB)
def unsubscribe(key: str, mod: int) -> None:
update_workshop(key, mod, UNSUB_ENDPOINT)
update_workshop(key, mod, STEAM_UNSUB)
def validate_mod(client: str, mod: str) -> None:
@@ -512,7 +512,7 @@ def get_app_path(folders_path: Path, appid: int) -> Path:
def get_app_name(appid: int) -> str | None:
payload = {"appids": [appid]}
res = requests.get(APP_DETAILS, params=payload)
res = requests.get(STEAM_APP_DETAILS, params=payload)
if res.status_code != 200:
return None
try:
+3 -3
View File
@@ -3,9 +3,9 @@ STEAM_PUBLISHED_FILES = (
"https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1"
)
STEAM_SERVERS = "https://api.steampowered.com/IGameServersService/GetServerList/v1"
SUB_ENDPOINT = "https://api.steampowered.com/IPublishedFileService/Subscribe/v1"
UNSUB_ENDPOINT = "https://api.steampowered.com/IPublishedFileService/Unsubscribe/v1"
APP_DETAILS = "https://store.steampowered.com/api/appdetails?"
STEAM_SUB = "https://api.steampowered.com/IPublishedFileService/Subscribe/v1"
STEAM_UNSUB = "https://api.steampowered.com/IPublishedFileService/Unsubscribe/v1"
STEAM_APP_DETAILS = "https://store.steampowered.com/api/appdetails?"
GITHUB = "https://github.com/aclist"
GITHUB_RELEASES = "https://api.github.com/repos/aclist/dztui/releases/latest"
+2 -2
View File
@@ -1,4 +1,4 @@
from shared import get_git_root
from pathlib import Path
BOILERPLATE = """
This file includes the combined licenses to the following components:
@@ -40,7 +40,7 @@ class CombinedLicense:
def concat_license() -> str:
combined = CombinedLicense()
root = get_git_root()
root = Path(__file__).resolve().parents[1]
licenses = root.joinpath("docs/licenses")
main_license = root.joinpath(LICENSE_FILE)
+4 -5
View File
@@ -1,11 +1,10 @@
import shutil
import subprocess
from pathlib import Path
from shared import get_git_root
root = get_git_root()
clog = root.joinpath("CHANGELOG.md")
target = root.joinpath("dzgui/data/CHANGELOG.md")
par = Path(__file__).parent.parent
clog = par / "CHANGELOG.md"
target = par / "dzgui/data/CHANGELOG.md"
shutil.copy(clog, target)
+3 -2
View File
@@ -1,9 +1,10 @@
import tomllib
from shared import get_git_root
from pathlib import Path
root = Path(__file__).resolve().parents[1]
def get_entrypoint() -> None:
root = get_git_root()
p = root.joinpath("pyproject.toml")
with open(p, "rb") as f:
t = tomllib.load(f)
+2 -3
View File
@@ -3,15 +3,14 @@ import requests
import subprocess
import tarfile
from pathlib import Path
from urllib.parse import unquote
from shared import get_git_root
BUILD = "3.13.9"
DATE = "20251014"
CPYTHON_BUILD = f"cpython-{BUILD}"
root = get_git_root()
root = Path(__file__).resolve().parents[1]
build_dir = root.joinpath("build")
cpython_dir = build_dir.joinpath(CPYTHON_BUILD)
+1 -2
View File
@@ -9,7 +9,6 @@ from pathlib import Path
from concat_licenses import concat_license
from parse_toml import get_entrypoint
from prebuild import get_pyapp, rebuild_cpython
from shared import get_git_root
def update_uname(info: tarfile.TarInfo) -> tarfile.TarInfo:
@@ -18,7 +17,7 @@ def update_uname(info: tarfile.TarInfo) -> tarfile.TarInfo:
return info
root = get_git_root()
root = Path(__file__).resolve().parents[1]
dist_dir = root.joinpath("dist")
build_dir = root.joinpath("build")
+10 -1
View File
@@ -1,7 +1,16 @@
import subprocess
from pathlib import Path
from dzgui.app_init import build_gui
from shared import get_git_root
def get_git_root() -> Path:
proc = subprocess.run(
["git", "rev-parse", "--show-toplevel"], capture_output=True, text=True
)
if proc.returncode != 0:
raise OSError("Failed to parse git root")
return Path(proc.stdout.rstrip())
def get_image_path() -> Path:
-11
View File
@@ -1,11 +0,0 @@
import subprocess
from pathlib import Path
def get_git_root() -> Path:
proc = subprocess.run(
["git", "rev-parse", "--show-toplevel"], capture_output=True, text=True
)
if proc.returncode != 0:
raise OSError("Failed to parse git root")
return Path(proc.stdout.rstrip())