]> gitweb.fperrin.net Git - gen-quickdic.git/blobdiff - Makefile
Convert the OPTED dictionary for use on Tolino devices
[gen-quickdic.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..3fc8c53
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+OPTED_SOURCEDIR = OPTED/v003
+
+OPTED_FILES = $(addprefix $(OPTED_SOURCEDIR)/wb1913_,$(addsuffix .html,$(shell bash -c 'echo {a..z} new')))
+
+essai:
+       @echo $(FILES)
+
+all: OPTED.v006-from-tab_separated.quickdic
+
+# optedv003.hqx:
+#      wget 'http://www.mso.anu.edu.au/~ralph/OPTED/optedv003.hqx'
+
+$(OPTED_FILES): optedv003.hqx
+       hexbin -d $<
+       unar OPTED.sit.data
+       find OPTED -type f | xargs sed -i 's/\r/\n/g'
+       cd OPTED && patch -p1 < ../OPTED.patch
+
+OPTED.tab_separated: $(OPTED_FILES)
+       ./OPTED_to_tab_separated
+
+OPTED.v007-from-tab_separated.quickdic: OPTED.tab_separated
+       cd ../DictionaryPC && ./run.sh --dictInfo="Webster's Unabridged Dictionary, from the OPTED project" --input1=$(CURDIR)/$< --input1Charset=UTF8 --input1Format=tab_separated --input1Name="Webster-OPTED" --lang1=EN --lang1Stoplist=data/inputs/stoplists/en.txt --dictOut=$(CURDIR)/$@  --print=$(CURDIR)/$@.txt
+
+OPTED.v006-from-tab_separated.quickdic: OPTED.v007-from-tab_separated.quickdic
+       rm -f $@
+       cd ../DictionaryPC && ./convert_to_v6.sh $(CURDIR)/$< $(CURDIR)/$@
+
+OPTED.chemnitz: OPTED/v003/wb1913_a.html
+       ./OPTED_to_chemnitz
+
+OPTED.v007-from-chemnitz.quickdic: OPTED.chemnitz
+       cd ../DictionaryPC && ./run.sh --dictInfo="Webster's Unabridged Dictionary, from the OPTED project" --input1=$(CURDIR)/$< --input1Charset=UTF8 --input1Format=chemnitz --input1Name="Webster-OPTED" --lang1=EN --lang1Stoplist=data/inputs/stoplists/en.txt --dictOut=$(CURDIR)/$@  --print=$(CURDIR)/$@.txt
+
+OPTED.v006-from-chemnitz.quickdic: OPTED.v007-from-chemnitz.quickdic
+       rm -f $@
+       cd ../DictionaryPC && ./convert_to_v6.sh $(CURDIR)/$< $(CURDIR)/$@
+
+clean:
+       rm -f OPTED.*.quickdic OPTED.tab_separated OPTED.chemnitz
+       rm -fr OPTED/