Subversion Repositories wimsdev

Rev

Rev 6463 | Rev 6468 | 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
6465 bpr 14
 
33 reyssat 15
!else
16
 scnt=0
17
!endif
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
 
6465 bpr 49
gotm=!words2lines $gotm
33 reyssat 50
translator_switch=leaveline
6463 bpr 51
dictionary=$basedir/title
33 reyssat 52
gott=!exec translator $gotm
6463 bpr 53
dictionary=$basedir/description
33 reyssat 54
gotd=!exec translator $gotm
55
!if $gotcnt>0 and / notin $gotm
6463 bpr 56
 dictionary=$basedir/addr
33 reyssat 57
 gotm=!exec translator $gotm
58
!endif
59
 
6465 bpr 60