blob: da86bafaf11e68bd3db7fcb50c8d2d0e7fabb85f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
|