From 56e9becdd43373c34769336077569ba5a8bafd05 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 2 Feb 2019 18:20:10 +0300 Subject: initial commit * matches have to be direct, which is not always practical * there is no reverse search (from English search terms) * missing Makefile * missing Bash completions --- update-sqlite3 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 update-sqlite3 (limited to 'update-sqlite3') diff --git a/update-sqlite3 b/update-sqlite3 new file mode 100755 index 0000000..da86baf --- /dev/null +++ b/update-sqlite3 @@ -0,0 +1,15 @@ +#!/bin/sh +# Downloads latest OpenRussian MySQL database dump and convert +# it to Sqlite3. +# +# NOTE: unzip cannot read from stdin yet. bsdtar could in principle, +# but does not allow extracting to stdout. + +TMPFILE=`mktemp` + +wget -O $TMPFILE https://en.openrussian.org/downloads/openrussian-sql.zip +unzip -p $TMPFILE openrussian.sql | \ +~/working-copies/mysql2sqlite/mysql2sqlite - | \ +sqlite3 openrussian-sqlite3.db + +rm $TMPFILE -- cgit v1.2.3