From 9667e169c125794afffb5e1576855c7ccfd05c46 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 26 Apr 2025 02:11:36 +0200 Subject: Add rtt-show-snap tool. --- bin/rtt-show-snap | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bin/rtt-show-snap (limited to 'bin/rtt-show-snap') 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 -- cgit v1.2.3