diff options
-rwxr-xr-x | bin/rtt-show-snap | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/rtt-show-snap b/bin/rtt-show-snap new file mode 100755 index 0000000..af744a7 --- /dev/null +++ b/bin/rtt-show-snap @@ -0,0 +1,10 @@ +#!/bin/bash +if [ $# -eq 1 ] +then + sqlite3 -column db "select snap_id, replay_id, state->>'$.active', coalesce(state->'$.state', state->'$.L.P', 'null') from game_snap where game_id=$1" +elif [ $# -eq 2 ] +then + sqlite3 -column db "select state from game_snap where game_id=$1 and snap_id=$2" +else + echo "usage: rtt-show-snap GAME" +fi |