Subversion Repositories wimsdev

Rev

Rev 10430 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
 
2
!bound copyrightr within gnu,opl,private default gnu
3
!if class != $doctype
12490 bpr 4
  !bound docopenr within yes, no default no
23 reyssat 5
!else
12490 bpr 6
  !if $wims_user!=supervisor
7
    !goto end
8
  !endif
9
  !bound docopenr within 0,1,2 default 0
23 reyssat 10
!endif
11
titr=!detag $titr
12
titr=!translate internal !$$ to $      $ in $titr
13
titr=!singlespace $titr
14
titr=!char 1 to $titlim of $titr
15
titr=!trim $titr
16
authorr=!translate internal !$$ to $      $ in $authorr
17
authorr=!singlespace $authorr
18
authorr=!char 1 to $titlim of $authorr
19
authorr=!trim $authorr
20
emailr=!translate internal !$$ to $      $ in $emailr
4955 bpr 21
!!emailr=!word 1 of $emailr
22
emailr=!replace internal ; by , in $emailr
23 reyssat 23
emailr=!char 1 to $titlim of $emailr
10430 bpr 24
!if $emailr!=$empty
4955 bpr 25
  etest0=!replace internal ; by , in $emailr
26
  etest0_cnt=!itemcnt $etest_0
27
  !for et_ =1 to $etest0
12490 bpr 28
    emailr0=!item $et_ of $etest0
29
    etest=!translate @ to , in $emailr0
30
    etes2=!translate @ to $ $ in $emailr0
31
    ecnt=!itemcnt $etest
32
    ecnt2=!wordcnt $etes2
4955 bpr 33
    !distribute items $etest into e1,e2
34
    !if $ecnt!=2 or $ecnt2!=2 or . notin $e2
35
      error=bad_email
36
      !exit
37
    !endif
12490 bpr 38
  !next
4955 bpr 39
!endif
1499 bpr 40
descr=!translate internal $	\
41
$ to $ 		   $ in $descr
42
descr=!trim $descr
23 reyssat 43
dl=!words2items $dlangr
44
dlangr=
45
!for l in $dl
12490 bpr 46
  l=!lower $l
47
  l=!text select abcdefghijklmnopqrstuvwxyz in $l
48
  n=!charcnt $l
49
  !ifval $n=2 or $l=all
50
    dlangr=$dlangr $l
51
  !endif
23 reyssat 52
!next l
53
dlangr=!trim $dlangr
54
!default dlangr=all
10430 bpr 55
headerr=!translate internal $	 \
56
$ to $ 		$ in $headerr
23 reyssat 57
 
58
!if $titr=$empty
12490 bpr 59
  error=no_tit
60
  !exit
23 reyssat 61
!endif
62
 
63
!if $authorr=$empty
12490 bpr 64
  error=no_author
65
  !exit
23 reyssat 66
!endif
67
 
68
!if class != $doctype
12490 bpr 69
  otest=!lower $titr $authorr
70
  otest=!singlespace $otest
71
  otest=!deaccent $otest
72
  otest=!text select $ $namechars in $otest
73
  translator_unknown=
74
  dictionary=bases/sys/abuse.$module_language
75
  otest=!exec translator $otest
76
  !if abuse isin $otest
77
    error=abuse
78
    !exit
79
  !endif
23 reyssat 80
!endif
81
 
82
!mexec scripts/mkdocdir.sh
83
 
84
!writefile $docdir/$doc/.def tit=$titr\
85
author=$authorr\
86
email=$emailr\
87
copyright=$copyrightr\
88
docopen=$docopenr\
6676 bpr 89
doctoc=$doctocr\
23 reyssat 90
dlang=$dlangr\
1499 bpr 91
header=$headerr\
92
desc=$descr
23 reyssat 93
 
94
!read adm/docindex.proc
95
!read $docdir/$doc/.def
96
 
97
:end
98
block=main
99
!read $docdir/$doc/main.def
100
job=read