From 481c69be02c95fbf20567d8de617315484e2d692 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 18 Apr 2019 23:20:46 +0300 Subject: major changes (unfortunately not done systematically) * keep the openrussian-sql.zip to avoid bitrot (sudden breakage when building the project against a recent DB) * allow lookups against inflections. A special table `bare_inflections` was added to the DB in order to speed this up. * authentic autocompletions taking every parameter into account, using a magic `-C` parameter * language selection via locale or -L * translation lookup * allow multiple search terms on the command line without escaping * all SQL strings are properly escaped now to avoid (accidental) code insertion * luautf8 is mandatory now and used much more, which is safer than handling Unicode strings with the builtin functions * ignore "disable" database entries * added option -V (verbatim) * more protections against empty fields * print "DERIVED FROM", "AUDIO", "USAGE" and various word relation sections * print word ranking and level (A1-C2...) --- Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8743043..a6b777f 100644 --- a/Makefile +++ b/Makefile @@ -13,16 +13,20 @@ openrussian : openrussian.lua chmod a+x $@ # Marking the ZIP intermediate makes sure it is automatically deleted after -# generating the SQLITE database while we don't always re-download it. +# generating the SQLite database while we don't always re-download it. # Effectively, it will behave like a temporary file. -.INTERMEDIATE: openrussian-sql.zip +# NOTE: This is disabled for the time being since the database schema changes +# from time to time, so a rebuild could easily break the script. +# Instead, we add the file to Git, so every clone is guaranteed to contain +# a database matching the openrussian.lua script. +#.INTERMEDIATE: openrussian-sql.zip openrussian-sql.zip: wget -O $@ 'https://en.openrussian.org/downloads/openrussian-sql.zip' -# NOTE: VACUUMing the database saves a few megabytes -openrussian-sqlite3.db : openrussian-sql.zip mysql2sqlite +openrussian-sqlite3.db : openrussian-sql.zip mysql2sqlite postprocess.sql + $(RM) $@ unzip -p $< openrussian.sql | ./mysql2sqlite - | sqlite3 $@ - sqlite3 $@ VACUUM + sqlite3 $@ -batch