mirror of
https://github.com/aclist/dztui.git
synced 2026-11-10 12:00:38 +01:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03fa707305 | ||
|
|
2479cbd41b |
No files matched your search
+6
-6
@@ -31,10 +31,10 @@ from dzgui.const.constants import (
|
|||||||
VDF_PATH,
|
VDF_PATH,
|
||||||
)
|
)
|
||||||
from dzgui.const.endpoints import (
|
from dzgui.const.endpoints import (
|
||||||
STEAM_APP_DETAILS,
|
APP_DETAILS,
|
||||||
|
SUB_ENDPOINT,
|
||||||
STEAM_PUBLISHED_FILES,
|
STEAM_PUBLISHED_FILES,
|
||||||
STEAM_SUB,
|
UNSUB_ENDPOINT,
|
||||||
STEAM_UNSUB,
|
|
||||||
)
|
)
|
||||||
from dzgui.strings import wizard
|
from dzgui.strings import wizard
|
||||||
from dzgui.strings.errors import api_validation_error, workshop_endpoint_error
|
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:
|
def subscribe(key: str, mod: int) -> None:
|
||||||
update_workshop(key, mod, STEAM_SUB)
|
update_workshop(key, mod, SUB_ENDPOINT)
|
||||||
|
|
||||||
|
|
||||||
def unsubscribe(key: str, mod: int) -> None:
|
def unsubscribe(key: str, mod: int) -> None:
|
||||||
update_workshop(key, mod, STEAM_UNSUB)
|
update_workshop(key, mod, UNSUB_ENDPOINT)
|
||||||
|
|
||||||
|
|
||||||
def validate_mod(client: str, mod: str) -> None:
|
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:
|
def get_app_name(appid: int) -> str | None:
|
||||||
payload = {"appids": [appid]}
|
payload = {"appids": [appid]}
|
||||||
res = requests.get(STEAM_APP_DETAILS, params=payload)
|
res = requests.get(APP_DETAILS, params=payload)
|
||||||
if res.status_code != 200:
|
if res.status_code != 200:
|
||||||
return None
|
return None
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ STEAM_PUBLISHED_FILES = (
|
|||||||
"https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1"
|
"https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1"
|
||||||
)
|
)
|
||||||
STEAM_SERVERS = "https://api.steampowered.com/IGameServersService/GetServerList/v1"
|
STEAM_SERVERS = "https://api.steampowered.com/IGameServersService/GetServerList/v1"
|
||||||
STEAM_SUB = "https://api.steampowered.com/IPublishedFileService/Subscribe/v1"
|
SUB_ENDPOINT = "https://api.steampowered.com/IPublishedFileService/Subscribe/v1"
|
||||||
STEAM_UNSUB = "https://api.steampowered.com/IPublishedFileService/Unsubscribe/v1"
|
UNSUB_ENDPOINT = "https://api.steampowered.com/IPublishedFileService/Unsubscribe/v1"
|
||||||
STEAM_APP_DETAILS = "https://store.steampowered.com/api/appdetails?"
|
APP_DETAILS = "https://store.steampowered.com/api/appdetails?"
|
||||||
|
|
||||||
GITHUB = "https://github.com/aclist"
|
GITHUB = "https://github.com/aclist"
|
||||||
GITHUB_RELEASES = "https://api.github.com/repos/aclist/dztui/releases/latest"
|
GITHUB_RELEASES = "https://api.github.com/repos/aclist/dztui/releases/latest"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from pathlib import Path
|
from shared import get_git_root
|
||||||
|
|
||||||
BOILERPLATE = """
|
BOILERPLATE = """
|
||||||
This file includes the combined licenses to the following components:
|
This file includes the combined licenses to the following components:
|
||||||
@@ -40,7 +40,7 @@ class CombinedLicense:
|
|||||||
|
|
||||||
def concat_license() -> str:
|
def concat_license() -> str:
|
||||||
combined = CombinedLicense()
|
combined = CombinedLicense()
|
||||||
root = Path(__file__).resolve().parents[1]
|
root = get_git_root()
|
||||||
licenses = root.joinpath("docs/licenses")
|
licenses = root.joinpath("docs/licenses")
|
||||||
|
|
||||||
main_license = root.joinpath(LICENSE_FILE)
|
main_license = root.joinpath(LICENSE_FILE)
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
par = Path(__file__).parent.parent
|
from shared import get_git_root
|
||||||
clog = par / "CHANGELOG.md"
|
|
||||||
target = par / "dzgui/data/CHANGELOG.md"
|
root = get_git_root()
|
||||||
|
clog = root.joinpath("CHANGELOG.md")
|
||||||
|
target = root.joinpath("dzgui/data/CHANGELOG.md")
|
||||||
|
|
||||||
shutil.copy(clog, target)
|
shutil.copy(clog, target)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import tomllib
|
import tomllib
|
||||||
from pathlib import Path
|
from shared import get_git_root
|
||||||
|
|
||||||
root = Path(__file__).resolve().parents[1]
|
|
||||||
|
|
||||||
|
|
||||||
def get_entrypoint() -> None:
|
def get_entrypoint() -> None:
|
||||||
|
root = get_git_root()
|
||||||
p = root.joinpath("pyproject.toml")
|
p = root.joinpath("pyproject.toml")
|
||||||
with open(p, "rb") as f:
|
with open(p, "rb") as f:
|
||||||
t = tomllib.load(f)
|
t = tomllib.load(f)
|
||||||
|
|||||||
+3
-2
@@ -3,14 +3,15 @@ import requests
|
|||||||
import subprocess
|
import subprocess
|
||||||
import tarfile
|
import tarfile
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
|
|
||||||
|
from shared import get_git_root
|
||||||
|
|
||||||
BUILD = "3.13.9"
|
BUILD = "3.13.9"
|
||||||
DATE = "20251014"
|
DATE = "20251014"
|
||||||
CPYTHON_BUILD = f"cpython-{BUILD}"
|
CPYTHON_BUILD = f"cpython-{BUILD}"
|
||||||
|
|
||||||
root = Path(__file__).resolve().parents[1]
|
root = get_git_root()
|
||||||
build_dir = root.joinpath("build")
|
build_dir = root.joinpath("build")
|
||||||
cpython_dir = build_dir.joinpath(CPYTHON_BUILD)
|
cpython_dir = build_dir.joinpath(CPYTHON_BUILD)
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -9,6 +9,7 @@ from pathlib import Path
|
|||||||
from concat_licenses import concat_license
|
from concat_licenses import concat_license
|
||||||
from parse_toml import get_entrypoint
|
from parse_toml import get_entrypoint
|
||||||
from prebuild import get_pyapp, rebuild_cpython
|
from prebuild import get_pyapp, rebuild_cpython
|
||||||
|
from shared import get_git_root
|
||||||
|
|
||||||
|
|
||||||
def update_uname(info: tarfile.TarInfo) -> tarfile.TarInfo:
|
def update_uname(info: tarfile.TarInfo) -> tarfile.TarInfo:
|
||||||
@@ -17,7 +18,7 @@ def update_uname(info: tarfile.TarInfo) -> tarfile.TarInfo:
|
|||||||
return info
|
return info
|
||||||
|
|
||||||
|
|
||||||
root = Path(__file__).resolve().parents[1]
|
root = get_git_root()
|
||||||
dist_dir = root.joinpath("dist")
|
dist_dir = root.joinpath("dist")
|
||||||
build_dir = root.joinpath("build")
|
build_dir = root.joinpath("build")
|
||||||
|
|
||||||
|
|||||||
+1
-10
@@ -1,16 +1,7 @@
|
|||||||
import subprocess
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from dzgui.app_init import build_gui
|
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:
|
def get_image_path() -> Path:
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
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())
|
||||||
Reference in new issue
Block a user