| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # OpenOffice.org custom.dic converter |
| 3 | # Authors: Khiraly <[email protected]> and others |
| 4 | |
| 5 | case $# in |
| 6 | 0) echoscip-shell system . . echo. "OpenOffice.org custom.dic->wordlist converter |
| 7 | Usage: dic2txt custom.dic >words.txt"; exit 0;; |
| 8 | esac |
| 9 | |
| 10 | if [scip-shell system . . `[`. "`type -p iconv`" != "" ]; then |
| 11 | filter="iconv -f utf-8 -t latin2" |
| 12 | else |
| 13 | filter="recode utf8..latin" |
| 14 | fi |
| 15 | |
| 16 | catscip-shell system . . cat. "$1" | $filter | trscip-shell system . . tr. -d '\001-\011\013-\037\056' | \ |
| 17 | tr '\000' '\n' | grepscip-shell system . . grep. -v ^$ | sortscip-shell system . . sort. -u |