diff --git a/.gitignore b/.gitignore index 9676998..e7129dc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /dist /venv /docs/_build +/pyphen/dictionaries/libreoffice-dictionaries diff --git a/pyphen/dictionaries/update.sh b/pyphen/dictionaries/update.sh index a164e8c..3c68394 100644 --- a/pyphen/dictionaries/update.sh +++ b/pyphen/dictionaries/update.sh @@ -1,10 +1,6 @@ -host='https://cgit.freedesktop.org/' - -for folder in `curl -s $host/libreoffice/dictionaries/tree/ | grep 'ls-dir' | cut -d "'" -f 6`; do - for file in `curl -s $host$folder | grep 'ls-blob' | grep 'hyph_.*\.dic' | cut -d "'" -f 6`; do - wget -N `echo $host$file | sed 's/tree/plain/'` & - done -done - +git clone git://anongit.freedesktop.org/libreoffice/dictionaries libreoffice-dictionaries +cd libreoffice-dictionaries +git pull +cd .. +find libreoffice-dictionaries -name "hyph_*\.dic" | xargs -I '{}' cp '{}' . rename -- -Latn _Latn *-Latn.dic -rename _ANY "" *_ANY.dic