Subversion Repositories wimsdev

Rev

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

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