diff options
Diffstat (limited to '')
-rwxr-xr-x | src/vgstash/__init__.py | 6 | ||||
-rwxr-xr-x | src/vgstash_cli.py | 13 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/vgstash/__init__.py b/src/vgstash/__init__.py index 48ac055..d28e587 100755 --- a/src/vgstash/__init__.py +++ b/src/vgstash/__init__.py @@ -23,7 +23,8 @@ OWNERSHIP = { 'unowned': 0, 'physical': 1, 'digital': 2, - 'both': 3 + 'both': 3, + 'member': 4 } DEFAULT_CONFIG = { @@ -40,9 +41,10 @@ FILTERS = { 'digital': "SELECT * FROM games WHERE ownership = 2 ORDER BY system, title ASC", 'done': "SELECT * FROM games WHERE progress > 2 ORDER BY system, title ASC", 'incomplete': "SELECT * FROM games WHERE progress = 3 AND ownership > 0 ORDER BY system, title ASC", + 'members': "SELECT * FROM games WHERE ownership = 4 ORDER BY system, title ASC", 'new': "SELECT * FROM games WHERE progress = 1 ORDER BY system, title ASC", 'notes': "SELECT * FROM games WHERE notes NOT LIKE '' ORDER BY system, title ASC", - 'owned': "SELECT * FROM games WHERE ownership > 0 ORDER BY system, title ASC", + 'owned': "SELECT * FROM games WHERE ownership > 0 AND ownership < 4 ORDER BY system, title ASC", 'physical': "SELECT * FROM games WHERE ownership = 1 ORDER BY system, title ASC", 'playlog': "SELECT * FROM games WHERE ownership > 0 AND progress = 2 ORDER BY system, title ASC", 'unowned': "SELECT * FROM games WHERE ownership = 0 ORDER BY system, title ASC", diff --git a/src/vgstash_cli.py b/src/vgstash_cli.py index 1967458..7b9a9b4 100755 --- a/src/vgstash_cli.py +++ b/src/vgstash_cli.py @@ -58,7 +58,7 @@ def row_format(row, width, header): titlestr = "{: <{w}s}".format(row['title'][:twidth], w=twidth) systemstr = "{: ^8s}".format(row['system'][:8]) # unowned, physical, digital, both - ownltr = [' ', 'P', ' D', 'P D'] + ownltr = [' ', 'P', ' D', 'P D', ' M'] ownstr = "{: <3s}".format(ownltr[row['ownership']]) progltr = { 0: '', @@ -83,10 +83,11 @@ def add(title, system, ownership, progress, notes): try: db.add_game(game, update=False) own_clause = ( - "do not own", - "physically own", - "digitally own", - "digitally and physically own", + "do not own it", + "physically own it", + "digitally own it", + "digitally and physically own it", + "own it in a collection" ) progress_clause = ( "cannot beat", @@ -96,7 +97,7 @@ def add(title, system, ownership, progress, notes): "have completed", ) note_clause = "" if len(game.notes) == 0 else " It also has notes." - click.echo("Added {} for {}. You {} it and {} it.{}".format( + click.echo("Added {} for {}. You {} and {} it.{}".format( game.title, game.system, own_clause[game.ownership], |