Disable release builder. Doesnt work
Package Application with PyInstaller / build (push) Successful in 31s

Add ctrl+C better support using try except statements
Add workshop paths
This commit is contained in:
LunaChocken
2025-06-07 23:52:05 +01:00
parent 727ac44418
commit 02731ad9ca
4 changed files with 34 additions and 18 deletions
+6 -4
View File
@@ -1,7 +1,9 @@
# DISABLED
name: release
on:
workflow_dispatch:
# on:
# workflow_dispatch:
jobs:
release:
@@ -16,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11.0'
python-version: "3.11.0"
- name: Install dependencies
run: >
python -m pip install --upgrade pip
@@ -30,4 +32,4 @@ jobs:
with:
files: |-
dist/**
api_key: '${{secrets.RELEASE_TOKEN}}'
api_key: "${{secrets.RELEASE_TOKEN}}"
+8 -3
View File
@@ -33,8 +33,11 @@ class SteamGamePathTool:
self.prompter = PromptHelper(games)
while True:
self.prompt_user()
input("Press Enter to continue...")
try:
input("Press Enter to continue...")
except KeyboardInterrupt:
print("\nExiting...")
break
def prompt_user(self):
game = self.prompter.prompt_game(text="Input (game name | appid | q/quit): ")
@@ -60,7 +63,9 @@ class SteamGamePathTool:
[white]Game ID: [yellow]{game['appid']}
[white]Game Size: [red]{int(game['SizeOnDisk'])/(1024*1024)/1024:.2f} GB[/red]
[white]Game acf: [green][link=file://{game['acf_path'].replace(' ', '%20')}]file[/link][/green]
[white]Game Path: [green][link=file://{game['true_path'].replace(' ', '%20')}]dir[/link][/green]"""
[white]Game Path: [blue][link=file://{game['true_path'].replace(' ', '%20')}]dir[/link][/blue]"""
if game['workshop_path']:
string += f"\n\t[white]Workshop Path: [blue][link=file://{game['workshop_path'].replace(' ', '%20')}]dir[/link][/blue]"
if game['compatdata_path']:
string += f"\n\t[white]Compatdata dir: [blue][link=file://{game['compatdata_path'].replace(' ', '%20')}]dir[/link][/blue]"
return string
+17 -9
View File
@@ -25,13 +25,21 @@ class PromptHelper:
return None
def prompt_game(self, text, default="None"):
response = pt.prompt(text, completer=self.completer, complete_while_typing=True)
if response == "":
return None
elif response == "q" or response == "quit":
print("Goodbye!")
try:
response = pt.prompt(text, completer=self.completer, complete_while_typing=True)
except KeyboardInterrupt:
print("\nCtrl+C received. Exiting.")
sys.exit(0)
elif response[0].isalpha():
return self.find_game_str(response)
else:
return self.find_game_num(response)
try:
if response == "":
return None
elif response == "q" or response == "quit":
print("Goodbye!")
sys.exit(0)
elif response[0].isalpha():
return self.find_game_str(response)
else:
return self.find_game_num(response)
except ValueError:
print("Invalid input")
return None
+3 -2
View File
@@ -27,8 +27,8 @@ def fetch_steam_path() -> str:
"""
Determines the Steam installation path by checking common locations.
Returns the path to the Steam 'steamapps' directory.
Prefers the path used by the apt installation if it exists.
Returns the path to the Steam 'steamapps' directory.
Prefers the path used by the apt installation if it exists.
Otherwise, returns the path used by the Flatpak installation.
:return: Path to the Steam 'steamapps' directory
@@ -100,6 +100,7 @@ def fetchall_vdfs(steam_vdf_json: dict):
parsed_game['root_steam_folder'] = path
parsed_game['true_path'] = os.path.join(steamapps, "common", parsed_game['installdir'])
parsed_game['compatdata_path'] = os.path.join(steamapps, "compatdata", str(gameID)) if os.path.exists(os.path.join(steamapps, "compatdata", str(gameID))) else None
parsed_game['workshop_path'] = os.path.join(steamapps, "workshop", "content", str(gameID)) if os.path.exists(os.path.join(steamapps, "workshop", "content", str(gameID))) else ""
games.append(parsed_game)
# print("Game name:", parsed_game['name'], "ID:", gameID, "Path:", parsed_game['true_path'])
return games