wadoku.mk
1 | WADOKU_TMP_DIR=dictionaries/wadoku-tmp |
2 | DICOS+=dicos/wadoku_ger.nani dicos/wadoku_pitch.nani |
3 | DOWNLOADS+=dictionaries/wadoku.xml |
4 | |
5 | dictionaries/wadoku.xml: |
6 | mkdir $(WADOKU_TMP_DIR) |
7 | wget https://www.wadoku.de/downloads/xml-export/ -O $(WADOKU_TMP_DIR)/index.html |
8 | file=$$(grep href $(WADOKU_TMP_DIR)/index.html | cut -f2 --delimiter='"' | \ |
9 | grep ^wadoku-xml | grep xz$$ | tail -1); \ |
10 | wget https://www.wadoku.de/downloads/xml-export/$$file -O \ |
11 | $(WADOKU_TMP_DIR)/wadoku.tar.xz |
12 | (cd $(WADOKU_TMP_DIR); tar xf wadoku.tar.xz) |
13 | cp $(WADOKU_TMP_DIR)/wadoku-xml*/wadoku.xml $@ |
14 | rm -rf $(WADOKU_TMP_DIR) |
15 | |
16 | dicos/wadoku_ger.nani: dictionaries/wadoku.xml tools/wadoku.scm dictionaries/frequency.tsv $(DICO_MODULES) |
17 | guile -L modules tools/wadoku.scm build $< $@ |
18 | |
19 | dicos/wadoku_pitch.nani: dictionaries/wadoku.xml tools/wadoku.scm |
20 | guile -L modules tools/wadoku.scm pitch $< $@ |
21 |