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:
|
if args.csv or args.tsv:
|
||||||
writer = csv.writer(stdout, dialect='excel-tab' if args.tsv else 'excel')
|
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],
|
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
|
return
|
||||||
|
|
||||||
print('\nInstalled games:')
|
print('\nInstalled games:')
|
||||||
|
@ -774,7 +776,7 @@ class LegendaryCLI:
|
||||||
def import_game(self, args):
|
def import_game(self, args):
|
||||||
# make sure path is absolute
|
# make sure path is absolute
|
||||||
args.app_path = os.path.abspath(args.app_path)
|
args.app_path = os.path.abspath(args.app_path)
|
||||||
|
|
||||||
if not os.path.exists(args.app_path):
|
if not os.path.exists(args.app_path):
|
||||||
logger.error(f'Specified path "{args.app_path}" does not exist!')
|
logger.error(f'Specified path "{args.app_path}" does not exist!')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
Loading…
Reference in a new issue