- Add all command to display All games
Package Application with PyInstaller / build (push) Successful in 26s
Package Application with PyInstaller / build (push) Successful in 26s
- Remove printing all games immediately
This commit is contained in:
@@ -21,11 +21,11 @@ class SteamGamePathTool:
|
|||||||
self.steam_library_locations = vd.find_extra_locations(self.steam_vdf)
|
self.steam_library_locations = vd.find_extra_locations(self.steam_vdf)
|
||||||
|
|
||||||
games = vd.fetchall_vdfs(self.steam_vdf)
|
games = vd.fetchall_vdfs(self.steam_vdf)
|
||||||
games = self.sort_games(games)
|
self.games = self.sort_games(games)
|
||||||
|
|
||||||
console = Console()
|
# console = Console()
|
||||||
game_rend = [Panel(self.get_game_content(game), expand=True) for game in games]
|
#
|
||||||
console.print(Columns(game_rend))
|
# console.print(Columns(game_rend))
|
||||||
|
|
||||||
for library in self.steam_library_locations:
|
for library in self.steam_library_locations:
|
||||||
print(f"[+] Found Steam library at: {library}")
|
print(f"[+] Found Steam library at: {library}")
|
||||||
@@ -40,11 +40,16 @@ class SteamGamePathTool:
|
|||||||
break
|
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 | all | q/quit): ")
|
||||||
if game is None:
|
if game is None:
|
||||||
return
|
return
|
||||||
console = Console()
|
elif game == 'fetch_all_games':
|
||||||
console.print(Panel(self.get_game_content(game), expand=True))
|
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))
|
||||||
|
|
||||||
|
|
||||||
def sort_games(self, games):
|
def sort_games(self, games):
|
||||||
|
|||||||
@@ -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 = [x['name'] for x in game_list] + [x['appid'] for x in game_list]
|
||||||
g_list.append("q")
|
g_list.append("q")
|
||||||
g_list.append("quit")
|
g_list.append("quit")
|
||||||
|
g_list.append("all")
|
||||||
return FuzzyCompleter(WordCompleter(g_list))
|
return FuzzyCompleter(WordCompleter(g_list))
|
||||||
|
|
||||||
class PromptHelper:
|
class PromptHelper:
|
||||||
@@ -33,6 +34,8 @@ class PromptHelper:
|
|||||||
try:
|
try:
|
||||||
if response == "":
|
if response == "":
|
||||||
return None
|
return None
|
||||||
|
elif response == "all":
|
||||||
|
return "fetch_all_games"
|
||||||
elif response == "q" or response == "quit":
|
elif response == "q" or response == "quit":
|
||||||
print("Goodbye!")
|
print("Goodbye!")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user