mirror of
https://github.com/derrod/legendary.git
synced 2025-01-03 04:45:28 +00:00
[cli] Add install size and path to CSV/TSV output
Fixes #91 and closes #68
This commit is contained in:
parent
ade9080152
commit
e9e40a3782
|
@ -183,9 +183,11 @@ class LegendaryCLI:
|
|||
|
||||
if args.csv or args.tsv:
|
||||
writer = csv.writer(stdout, dialect='excel-tab' if args.tsv else 'excel')
|
||||
writer.writerow(['App name', 'App title', 'Installed version', 'Available version', 'Update available'])
|
||||
writer.writerow(['App name', 'App title', 'Installed version', 'Available version',
|
||||
'Update available', 'Install size', 'Install path'])
|
||||
writer.writerows((game.app_name, game.title, game.version, versions[game.app_name],
|
||||
versions[game.app_name] != game.version) for game in games)
|
||||
versions[game.app_name] != game.version, game.install_size, game.install_path)
|
||||
for game in games)
|
||||
return
|
||||
|
||||
print('\nInstalled games:')
|
||||
|
@ -774,7 +776,7 @@ class LegendaryCLI:
|
|||
def import_game(self, args):
|
||||
# make sure path is absolute
|
||||
args.app_path = os.path.abspath(args.app_path)
|
||||
|
||||
|
||||
if not os.path.exists(args.app_path):
|
||||
logger.error(f'Specified path "{args.app_path}" does not exist!')
|
||||
exit(1)
|
||||
|
|
Loading…
Reference in a new issue