1
0
mirror of https://github.com/ru-de/faq.git synced 2024-09-20 03:51:28 +00:00

fix dictionary download

This commit is contained in:
Oleg Kainov 2023-08-22 14:00:49 +02:00 committed by GitHub
parent 34847eea73
commit f779c29436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,10 +6,7 @@ PWD_DIR=`pwd`
DIR=`dirname $0`
apt-get -yqq update && apt-get install -y curl wget unzip binutils hunspell hunspell-ru hunspell-en-us hunspell-de-de jq
curl -s https://extensions.libreoffice.org/en/extensions/show/russian-spellcheck-dictionary > .dict_page
echo -n "https://extensions.libreoffice.org" > .current_release
strings .dict_page | grep -ozP '<li class="releaseRow">(\n|.)*?</li>' | grep -zoP -m 1 'href=".*?">Download' | head -1 | sed 's/href="//' | sed 's/">Download//' >> .current_release
cat .current_release | wget -q -i - -O /tmp/dictionary.otx
wget https://extensions.libreoffice.org/assets/downloads/48/dict_ru_ru-aot-0.4.5.oxt -O /tmp/dictionary.otx
unzip /tmp/dictionary.otx -d /tmp
cp /tmp/*.dic /usr/share/hunspell
cp /tmp/*.aff /usr/share/hunspell
@ -43,4 +40,4 @@ go get -u github.com/ewgRa/ci-utils/cmd/github_comments_send
cd $DIR/go
go build -o /tmp/check_spell check_spell/main.go
go build -o /tmp/check_links check_links/main.go
cd $PWD_DIR
cd $PWD_DIR