From e5875bb6b73f91db5a9982e2816de649e9bc4ef6 Mon Sep 17 00:00:00 2001 From: zlg Date: Sat, 6 Oct 2018 22:26:21 -0700 Subject: Remove ID field from DB The sqlite database already uses a game's title and system as the primary keys. Row IDs are redundant. --- src/vgstash_cli.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/vgstash_cli.py') diff --git a/src/vgstash_cli.py b/src/vgstash_cli.py index 5aada8c..39d2454 100644 --- a/src/vgstash_cli.py +++ b/src/vgstash_cli.py @@ -38,10 +38,9 @@ def row_format(row, width, header): # system name (8) # ownership (3) # progress (9) - twidth = int(width) - 36 + twidth = int(width) - 29 if header == True: - click.echo("{:^4s} | {:<{w}s} | {:<8s} | {:^3s} | {:<9s}".format( - "ID", + click.echo("{:<{w}s} | {:<8s} | {:^3s} | {:<9s}".format( "Title", "System", "Own", @@ -50,7 +49,6 @@ def row_format(row, width, header): ) click.echo("-" * int(width)) - gidstr = "{: >4d}".format(row['rowid']) titlestr = "{: <{w}s}".format(row['title'][:twidth], w=twidth) systemstr = "{: ^8s}".format(row['system'][:8]) # unowned, physical, digital, both @@ -64,7 +62,7 @@ def row_format(row, width, header): 4: 'C' } progstr = "{: <7s}".format((" " * row['progress'] * 2) + progltr[row['progress']]) - print(" | ".join((gidstr, titlestr, systemstr, ownstr, progstr))) + print(" | ".join((titlestr, systemstr, ownstr, progstr))) @cli.command('add') -- cgit v1.2.3-54-g00ecf