summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/sqlite_dumb7
1 files changed, 7 insertions, 0 deletions
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