Subversion Repositories wimsdev

Rev

Rev 6462 | Rev 6465 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6463 bpr 1
!!##class
2
basedir=bases/class
33 reyssat 3
!if $srch!=$empty
4
 suffix_dictionary=
6462 bpr 5
 dictionary=$basedir/$search_lang
33 reyssat 6
 translator_unknown=
7
 sout=!exec translator $srch
8
 sout=!items2words $sout
9
 sout=!words2lines $sout
10
 sout=!translate ? to $ $ in $sout
11
 sout=!sort lines $sout
12
 sout=!nonempty lines $sout
13
 scnt=!linecnt $sout
14
!else
15
 scnt=0
16
!endif
17
 
18
# Limit of shown items
19
gotlim=50
20
!distribute item 0,0,, into weight,gotcnt,gotm,gotw,lastmod
21
 
22
!for i=1 to $scnt
23
 l_=!line $i of $sout
24
 t_=!wordcnt $l_
6463 bpr 25
 !advance gotcnt
33 reyssat 26
 !if $t_=2
27
  !distribute word $l_ into m_,w_
28
  !if $m_=$lastmod or $gotcnt>$gotlim
29
   weight=$[$weight+$w_]
30
  !else
31
   !if $lastmod!=$empty
32
    gotm=$gotm $lastmod
33
    gotw=$gotw $weight
34
    !advance gotcnt
35
   !endif
36
   lastmod=$m_
37
   weight=$w_
38
  !endif
6463 bpr 39
  !else
40
   gotm=$gotm $l_
33 reyssat 41
 !endif
42
!next i
43
!if $lastmod!=$empty
44
 gotm=$gotm $lastmod
45
 gotw=$gotw $weight
46
 !advance gotcnt
47
!endif
48
 
49
translator_switch=leaveline
6463 bpr 50
dictionary=$basedir/title
33 reyssat 51
gott=!exec translator $gotm
6463 bpr 52
dictionary=$basedir/description
33 reyssat 53
gotd=!exec translator $gotm
54
!if $gotcnt>0 and / notin $gotm
6463 bpr 55
 dictionary=$basedir/addr
33 reyssat 56
 gotm=!exec translator $gotm
57
!endif
58