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
|
||||
|
||||
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}}"
|
||||
|
||||
@@ -33,8 +33,11 @@ class SteamGamePathTool:
|
||||
self.prompter = PromptHelper(games)
|
||||
while True:
|
||||
self.prompt_user()
|
||||
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
|
||||
|
||||
@@ -25,7 +25,12 @@ class PromptHelper:
|
||||
return None
|
||||
|
||||
def prompt_game(self, text, default="None"):
|
||||
try:
|
||||
response = pt.prompt(text, completer=self.completer, complete_while_typing=True)
|
||||
except KeyboardInterrupt:
|
||||
print("\nCtrl+C received. Exiting.")
|
||||
sys.exit(0)
|
||||
try:
|
||||
if response == "":
|
||||
return None
|
||||
elif response == "q" or response == "quit":
|
||||
@@ -35,3 +40,6 @@ class PromptHelper:
|
||||
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['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
|
||||
|
||||
Reference in New Issue
Block a user