mirror of
https://github.com/kuhyx/steam-backlog-enforcer.git
synced 2026-11-22 23:02:19 +01:00
The installer ships as the steam_installer package beside steam_backlog_enforcer, with its tests, docs and Proton lock. The enforcer's fast install now starts the installer from this checkout. Both appinfo.vdf readers share one key-value decoder (steam_installer.appinfo_kv), and the duplicated test fixtures and helpers are folded into conftest and _cli_helpers so the whole-tree duplicate-code check is clean. check_requirements_sync treats sibling packages as first-party. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWZCxnNWLtpVwFLVk9w
71 lines
2.1 KiB
Python
71 lines
2.1 KiB
Python
"""Command-line argument definitions for the installer."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
|
|
from kuhy_credit import credit_line
|
|
|
|
from steam_installer import depotdl, map_installed
|
|
|
|
|
|
def build_parser() -> argparse.ArgumentParser:
|
|
"""Build the installer's argument parser."""
|
|
parser = argparse.ArgumentParser(
|
|
description="Download an owned Steam game fast, then make Steam recognize it.",
|
|
# kuhy's shared credit line (kuhy_credit, kuhyx/utils).
|
|
epilog=credit_line(),
|
|
)
|
|
parser.add_argument(
|
|
"target",
|
|
nargs="?",
|
|
default=None,
|
|
metavar="TARGET",
|
|
help=(
|
|
"AppID (284160), a Steam URL "
|
|
"(https://steamcommunity.com/app/284160/guides/), or a game name "
|
|
"(BeamNG.drive, or just BeamNG)"
|
|
),
|
|
)
|
|
parser.add_argument(
|
|
"--appid", type=int, default=None, help="Steam AppID (skips detection)"
|
|
)
|
|
parser.add_argument(
|
|
"--username",
|
|
default=None,
|
|
help="Steam account username (default: $STEAM_USERNAME, then the saved one)",
|
|
)
|
|
parser.add_argument(
|
|
"--language", default=None, help="Language depot to fetch (default: prompts)"
|
|
)
|
|
parser.add_argument(
|
|
"--max-downloads", type=int, default=depotdl.DEFAULT_MAX_DOWNLOADS
|
|
)
|
|
parser.add_argument(
|
|
"--yes",
|
|
action="store_true",
|
|
help=(
|
|
"Assume yes for every prompt. Ambiguous names still fail rather than guess."
|
|
),
|
|
)
|
|
parser.add_argument(
|
|
"--dry-run",
|
|
action="store_true",
|
|
help="Resolve the target and report what would happen. Changes nothing.",
|
|
)
|
|
parser.add_argument(
|
|
"--repair-ghosts",
|
|
action="store_true",
|
|
help=(
|
|
"Scan every library for the fake 'installed' manifests anonymous "
|
|
"steamcmd leaves behind, and clear them away."
|
|
),
|
|
)
|
|
map_installed.add_arguments(parser)
|
|
parser.add_argument(
|
|
"--verbose",
|
|
action="store_true",
|
|
help="Show on the console everything that goes to the run log.",
|
|
)
|
|
return parser
|