- Add all command to display All games
Package Application with PyInstaller / build (push) Successful in 26s

- Remove printing all games immediately
This commit is contained in:
LunaChocken
2025-06-08 19:30:10 +01:00
parent 02731ad9ca
commit e3c35285f2
2 changed files with 15 additions and 7 deletions
+10 -5
View File
@@ -21,11 +21,11 @@ class SteamGamePathTool:
self.steam_library_locations = vd.find_extra_locations(self.steam_vdf)
games = vd.fetchall_vdfs(self.steam_vdf)
games = self.sort_games(games)
self.games = self.sort_games(games)
console = Console()
game_rend = [Panel(self.get_game_content(game), expand=True) for game in games]
console.print(Columns(game_rend))
# console = Console()
#
# console.print(Columns(game_rend))
for library in self.steam_library_locations:
print(f"[+] Found Steam library at: {library}")
@@ -40,9 +40,14 @@ class SteamGamePathTool:
break
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 | all | q/quit): ")
if game is None:
return
elif game == 'fetch_all_games':
console = Console()
game_rend = [Panel(self.get_game_content(game), expand=True) for game in self.games]
console.print(Columns(game_rend))
else:
console = Console()
console.print(Panel(self.get_game_content(game), expand=True))
+3
View File
@@ -6,6 +6,7 @@ def generate_completer(game_list):
g_list = [x['name'] for x in game_list] + [x['appid'] for x in game_list]
g_list.append("q")
g_list.append("quit")
g_list.append("all")
return FuzzyCompleter(WordCompleter(g_list))
class PromptHelper:
@@ -33,6 +34,8 @@ class PromptHelper:
try:
if response == "":
return None
elif response == "all":
return "fetch_all_games"
elif response == "q" or response == "quit":
print("Goodbye!")
sys.exit(0)