From 2cf0c9e8f96c38d86a22cd21955bc7e8444bc316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 22 Mar 2016 17:18:22 +0100 Subject: add tools/sqlite_dumb --- tools/sqlite_dumb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 tools/sqlite_dumb diff --git a/tools/sqlite_dumb b/tools/sqlite_dumb new file mode 100755 index 0000000..9e5c5a0 --- /dev/null +++ b/tools/sqlite_dumb @@ -0,0 +1,7 @@ +#! /bin/bash + +sqlite3 android/assets/data/rustanddust.sqlite 'select state from games order by ts desc limit 1' > state.json +sqlite3 android/assets/data/rustanddust.sqlite 'select orders from games order by ts desc limit 1' > orders.json +# echo "[" > turns.json +# sqlite3 android/assets/data/rustanddust.sqlite 'select payload from turns where game=(select _id from games order by ts desc limit 1) order by _id' | while read rec; do echo "$rec,"; done >> turns.json +# sed -i '$s/,$/]/' turns.json -- cgit v1.1-2-g2b99