mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 03:52:15 +02:00
613f6597c8
On my desktop, running `./tools/storage/set_scopde_storage.sh` led to > Alienware% ./tools/storage/set_scoped_storage.sh > First argument missing. > \nPossible arguments: > limited\t\tEquivalent to a fresh install. /AnkiDroid/ is inaccessible > full\t\tEquivalent to an upgrade from targetSdkVersion 29 to 30. /AnkiDroid/ is accessible\n Adding `-e` ensures the characters are printed as expected.
30 lines
878 B
Bash
Executable File
30 lines
878 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Shows the completion rate of the translation for each language.
|
|
#
|
|
wget -O tmp-translations-page.html https://crowdin.net/project/ankidroid --no-check-certificate
|
|
cat tmp-translations-page.html |
|
|
egrep 'project-language-name|[approved|translated]: \d+%'|
|
|
sed -e "s/<strong.*unselectable\">//g"|
|
|
sed -e "s/<\/strong>//g" |
|
|
sed -e "s/\w*<\/div>//g" |
|
|
sed -e "s/[[:space:]]*//g"|
|
|
tr "\n" " " |
|
|
tr '%' '\n' |
|
|
sed -e "s/^ //g" |
|
|
sed -e "s/\:/\: /g" |
|
|
grep -v "^\s+$" |
|
|
sed -e "s/$/%/g" |
|
|
grep -v " 0" > tmp-list.txt
|
|
|
|
echo "By country:"
|
|
cat tmp-list.txt | sort
|
|
|
|
echo -e "\nBy rate approved (implies 100% translated):"
|
|
cat tmp-list.txt | grep approved | sed -e "s/\(.*\) \([0-9]*\)%/\2% \1/g" | sort -nr
|
|
|
|
echo -e "\nBy rate translated:"
|
|
cat tmp-list.txt | grep translated | sed -e "s/\(.*\) \([0-9]*\)%/\2% \1/g" | sort -nr
|
|
|
|
rm -f tmp-translations-page.html tmp-list.txt
|