summaryrefslogtreecommitdiff
path: root/bin/rtt-show
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rtt-show')
-rwxr-xr-xbin/rtt-show10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/rtt-show b/bin/rtt-show
new file mode 100755
index 0000000..b643a8c
--- /dev/null
+++ b/bin/rtt-show
@@ -0,0 +1,10 @@
+#!/bin/bash
+if [ "$#" = 1 ]
+then
+ sqlite3 db "select json_remove(json_remove(state, '$.undo'), '$.log') from game_state where game_id = $1"
+elif [ "$#" = 2 ]
+then
+ sqlite3 db "select state -> '$.$2' from game_state where game_id = $1"
+else
+ echo "usage: rtt-show GAME [ JSON-PATH ]"
+fi