diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2019-02-02 18:20:10 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2019-02-02 18:20:10 +0300 |
commit | 56e9becdd43373c34769336077569ba5a8bafd05 (patch) | |
tree | 47574672bc3d397aad52a3a891ee354a7448949f /update-sqlite3 | |
download | openrussian-cli-56e9becdd43373c34769336077569ba5a8bafd05.tar.gz |
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
Diffstat (limited to 'update-sqlite3')
-rwxr-xr-x | update-sqlite3 | 15 |
1 files changed, 15 insertions, 0 deletions
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 |