From ef6892fd6a3c95d7076b0e707f20f38430d8948b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 30 Apr 2025 10:47:54 +0200 Subject: Improve rtt-show commands. rtt show GAME [ JSON-PATH ] rtt show-snap GAME [ SNAP [ JSON-PATH ] ] For example: rtt show 123 active rtt show 123 undo rtt show 123 hand[0] --- bin/rtt-show-snap | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/rtt-show-snap') diff --git a/bin/rtt-show-snap b/bin/rtt-show-snap index af744a7..8116d48 100755 --- a/bin/rtt-show-snap +++ b/bin/rtt-show-snap @@ -5,6 +5,9 @@ then elif [ $# -eq 2 ] then sqlite3 -column db "select state from game_snap where game_id=$1 and snap_id=$2" +elif [ $# -eq 3 ] +then + sqlite3 -column db "select state -> '$.$3' from game_snap where game_id=$1 and snap_id=$2" else - echo "usage: rtt-show-snap GAME" + echo "usage: rtt-show-snap GAME [ SNAP [ JSON-PATH ] ]" fi -- cgit v1.2.3