File: makelist.proc

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (48 lines) | stat: -rw-r--r-- 1,219 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

listfile=wimshome/public_html/scripts/model/$lang/list
!reset list_exists
!read $listfile
!if $list_exists=yes
  !exit
!endif

src=!sh cd $wims_home/public_html/scripts/model/$lang/src; ls *.oef | sed 's/.oef$$//'
src=!words2items $src

!writefile $listfile
!! allow to order types. The types not written here are automatically added at the end
!set types=first,datalist,question,select,gapfill,classify,order,game,imaudio,chemistry
!for f in $src
  def=!record 0 of model/$lang/src/$f.oef
  type=!getopt type in $def
  !if $type!=$empty and text/css notin $type
    !if $type notitemof $types
      types=!append item $type to $types
      type_$type=
    !endif
    type_$type=!append item $f to $(type_$type)
    desc=!record 1 of model/$lang/src/$f.oef
    desc=!line 1 of $desc
    tit=
    !for i=2 to 8
      r=!record $i of model/$lang/src/$f.oef
      r=!trim $r
      c=!char 1 of $r
      !if \ = $c and +++\title isin +++$r
        tit=!embraced extract $r
        !break
      !endif
    !next i
    !appendfile $listfile tit_$f=$tit\
desc_$f=$desc
  !endif
!next f

!appendfile $listfile list_exists=yes\
types=$types

!for t in $types
  !appendfile $listfile type_$t=$(type_$t)
!next t

!read $listfile