Skip to content

Commit

Permalink
Improve script upgrading dictionaries
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Aug 26, 2022
1 parent 74b8756 commit 68ece17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/dist
/venv
/docs/_build
/pyphen/dictionaries/libreoffice-dictionaries
14 changes: 5 additions & 9 deletions pyphen/dictionaries/update.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 68ece17

Please sign in to comment.