diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-04-26 02:11:36 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-04-26 13:44:31 +0200 |
commit | 9667e169c125794afffb5e1576855c7ccfd05c46 (patch) | |
tree | 919ac728c7347a0ecd7d755243e007b9a259fe8b | |
parent | 5a6f89fe9760ff2a688d29ac5ca3bb3f28c9216f (diff) | |
download | server-9667e169c125794afffb5e1576855c7ccfd05c46.tar.gz |
Add rtt-show-snap tool.
-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 |