diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-04-30 10:47:54 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-04-30 17:50:37 +0200 |
commit | ef6892fd6a3c95d7076b0e707f20f38430d8948b (patch) | |
tree | 11c8aaa3978ea7a4f91b2f7b8d1913e4384680a6 /bin/rtt-show-snap | |
parent | b22ca94f482ce9374c92d4fd58d83f9f174a5cb9 (diff) | |
download | server-ef6892fd6a3c95d7076b0e707f20f38430d8948b.tar.gz |
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]
Diffstat (limited to 'bin/rtt-show-snap')
-rwxr-xr-x | bin/rtt-show-snap | 5 |
1 files changed, 4 insertions, 1 deletions
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 |