Subversion Repositories wimsdev

Rev

Rev 6462 | Rev 6465 | 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.  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_
  25.  !advance gotcnt
  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
  39.   !else
  40.    gotm=$gotm $l_
  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
  50. dictionary=$basedir/title
  51. gott=!exec translator $gotm
  52. dictionary=$basedir/description
  53. gotd=!exec translator $gotm
  54. !if $gotcnt>0 and / notin $gotm
  55.  dictionary=$basedir/addr
  56.  gotm=!exec translator $gotm
  57. !endif
  58.  
  59.