summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeLibertineGamer <zlg@zlg.space>2016-05-23 03:34:58 -0700
committerZe Libertine Gamer <zlg@zlg.space>2016-05-23 03:34:58 -0700
commitfc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e (patch)
tree91a88519a0cbb5774f2e691ac1d8b84e589497f3
parentFix example command (diff)
downloadvgstash-fc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e.tar.gz
vgstash-fc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e.tar.bz2
vgstash-fc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e.tar.xz
vgstash-fc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e.zip
Add duplicate game reporting script
It'll serve as an example of how vgstash can be extended with minimal effort.
-rwxr-xr-xscripts/dupe-finder.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/dupe-finder.sh b/scripts/dupe-finder.sh
new file mode 100755
index 0000000..9ffae6d
--- /dev/null
+++ b/scripts/dupe-finder.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# dupe-finder.sh: Output duplicate games in your database
+
+# We're setting the envvar here to enforce the -w argument to uniq
+result=$(VGSTASH_TABLE_WIDTH=80 vgstash list | uniq -D -f 2 -w 58)
+if [[ -z $result ]]; then
+ exit
+else
+ VGSTASH_TABLE_WIDTH=80 vgstash list | head -n 2
+ echo "$result"
+fi
lass='nohover-highlight'> 2025-01-23schema1-to-2.py: Add shebang because I'm a doofuszlg1-0/+2 2023-09-22scripts: Add schema v1->v2 migration scriptzlg2-9/+85 This script adds three columns to the schema, supporting the "Purchased", "Beaten", and "Completed" note headers. They are now converted to a UNIX timestamp and stored in a separate column so queries made against that metadata are easier. The library itself still needs to support all the new columns.