Subversion Repositories wimsdev

Rev

Rev 6463 | Rev 6468 | 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.  
  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_
  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. gotm=!words2lines $gotm
  50. translator_switch=leaveline
  51. dictionary=$basedir/title
  52. gott=!exec translator $gotm
  53. dictionary=$basedir/description
  54. gotd=!exec translator $gotm
  55. !if $gotcnt>0 and / notin $gotm
  56.  dictionary=$basedir/addr
  57.  gotm=!exec translator $gotm
  58. !endif
  59.  
  60.  
  61.