Disable release builder. Doesnt work
Package Application with PyInstaller / build (push) Successful in 31s
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:
@@ -1,7 +1,9 @@
|
|||||||
|
# DISABLED
|
||||||
|
|
||||||
name: release
|
name: release
|
||||||
|
|
||||||
on:
|
# on:
|
||||||
workflow_dispatch:
|
# workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@@ -16,7 +18,7 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.11.0'
|
python-version: "3.11.0"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: >
|
run: >
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
@@ -30,4 +32,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
files: |-
|
files: |-
|
||||||
dist/**
|
dist/**
|
||||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
api_key: "${{secrets.RELEASE_TOKEN}}"
|
||||||
|
|||||||
@@ -33,8 +33,11 @@ class SteamGamePathTool:
|
|||||||
self.prompter = PromptHelper(games)
|
self.prompter = PromptHelper(games)
|
||||||
while True:
|
while True:
|
||||||
self.prompt_user()
|
self.prompt_user()
|
||||||
input("Press Enter to continue...")
|
try:
|
||||||
|
input("Press Enter to continue...")
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("\nExiting...")
|
||||||
|
break
|
||||||
|
|
||||||
def prompt_user(self):
|
def prompt_user(self):
|
||||||
game = self.prompter.prompt_game(text="Input (game name | appid | q/quit): ")
|
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 ID: [yellow]{game['appid']}
|
||||||
[white]Game Size: [red]{int(game['SizeOnDisk'])/(1024*1024)/1024:.2f} GB[/red]
|
[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 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']:
|
if game['compatdata_path']:
|
||||||
string += f"\n\t[white]Compatdata dir: [blue][link=file://{game['compatdata_path'].replace(' ', '%20')}]dir[/link][/blue]"
|
string += f"\n\t[white]Compatdata dir: [blue][link=file://{game['compatdata_path'].replace(' ', '%20')}]dir[/link][/blue]"
|
||||||
return string
|
return string
|
||||||
|
|||||||
+17
-9
@@ -25,13 +25,21 @@ class PromptHelper:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def prompt_game(self, text, default="None"):
|
def prompt_game(self, text, default="None"):
|
||||||
response = pt.prompt(text, completer=self.completer, complete_while_typing=True)
|
try:
|
||||||
if response == "":
|
response = pt.prompt(text, completer=self.completer, complete_while_typing=True)
|
||||||
return None
|
except KeyboardInterrupt:
|
||||||
elif response == "q" or response == "quit":
|
print("\nCtrl+C received. Exiting.")
|
||||||
print("Goodbye!")
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
elif response[0].isalpha():
|
try:
|
||||||
return self.find_game_str(response)
|
if response == "":
|
||||||
else:
|
return None
|
||||||
return self.find_game_num(response)
|
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
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ def fetchall_vdfs(steam_vdf_json: dict):
|
|||||||
parsed_game['root_steam_folder'] = path
|
parsed_game['root_steam_folder'] = path
|
||||||
parsed_game['true_path'] = os.path.join(steamapps, "common", parsed_game['installdir'])
|
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['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)
|
games.append(parsed_game)
|
||||||
# print("Game name:", parsed_game['name'], "ID:", gameID, "Path:", parsed_game['true_path'])
|
# print("Game name:", parsed_game['name'], "ID:", gameID, "Path:", parsed_game['true_path'])
|
||||||
return games
|
return games
|
||||||
|
|||||||
Reference in New Issue
Block a user