Rev 539 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
539 | bpr | 1 | #! /bin/sh |
2 | |||
3 | dicsort_separator=':' |
||
4 | w_dictionary=dic/syno |
||
5 | w_suffix_dictionary=dic/suffix |
||
6 | w_translator_unknown=leave |
||
7 | export dicsort_separator w_dictionary w_suffix_dictionary w_translator_unknown |
||
8 | export wims_exec_parm |
||
9 | #dic/dicsort dic/syno |
||
10 | #mv dic/syno.sorted dic/syno |
||
11 | mkdir -p ind |
||
12 | |||
13 | cat >dic/cmd <<@ |
||
14 | 1d: |
||
15 | 2d: |
||
16 | 3d: |
||
17 | 4d: |
||
18 | @ |
||
19 | |||
20 | cnt=0 |
||
21 | for i in `find op -name '*.def'` |
||
22 | do |
||
23 | base=`echo $i | sed 's/\.def$//;s!^op/!!'` |
||
24 | index=`echo $base | tr / @` |
||
25 | if [ ! -f ind/$index ] || [ ind/$index -ot $i ]; then |
||
26 | get=`awk -F'=' '$1=="title" || $1=="synonyme" {print $2}; |
||
27 | $1=="!exit" {exit}' $i | |
||
28 | tr 'çéèêëúùûüáàâäãóòôöõíìïîñýÇÉÈÊËÚÙÛÜÁÀÂÃÄÓÒÔÖÕÍÌÏÎÑÝ' 'ceeeeuuuuaaaaaoooooiiiinyCEEEEUUUUAAAAAOOOOOIIIINY' | |
||
29 | tr "[A-Z]\-\012\'" '[a-z] , ' | sed 's/,/, /g' | tr -s '[:blank:]' ' '` |
||
30 | wims_exec_parm="$get" |
||
31 | got=`exec dic/translator | tr , '\012' | sed 's/^ //' | sort | uniq` |
||
32 | echo "$got" | awk '{print $0":'$base'"}' >ind/$index |
||
33 | fi |
||
34 | cat ind/$index >>dic/cmd |
||
35 | echo $base |
||
36 | cnt=$(($cnt+1)) |
||
37 | done |
||
38 | echo $cnt commands. |
||
39 | |||
40 | dic/dicsort dic/cmd |
||
41 | mv dic/cmd.sorted dic/cmd |
||
42 | rm -fR ind 2>/dev/null |
||
43 | |||
44 | |||
45 |