aboutsummaryrefslogtreecommitdiff
path: root/dicts/slovnik-cizich-slov.sh
blob: bc6bd9a9c277ba2c6ab0700b302f54a503f79d25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh -e
# Slovník cizích slov, see https://slovnik-cizich-slov.abz.cz/web.php/o-slovniku
# TODO: Skipping the optional pronunciation field, tabfile can't handle it yet,
# but could be made to accept a lowercase sametypesequence
curl -Lo- https://slovnik-cizich-slov.abz.cz/export.php | \
iconv -f latin2 -t UTF-8 | perl -CSD -F\\\| -le '
	print "$_\t" . $F[2] =~ s/\\/\\\\/gr =~ s/; /\\n/gr for split(", ", $F[0])
' | sort -u | tabfile slovnik-cizich-slov \
	--book-name="Slovník cizích slov" \
	--website=https://slovnik-cizich-slov.abz.cz \
	--date="$(date +%F)" \
	--collation=cs_CZ