Rev 2286 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | |
2 | !if $edtype=file |
||
3 | fcheck=!exec ftype $wims_home/$wims_sesdir/user-deposit |
||
4 | fcheck=!word 1 of $fcheck |
||
5 | !if $fcheck=$empty |
||
6 | error=deposit_fail |
||
7 | job=edit |
||
8 | !exit |
||
9 | !endif |
||
10 | !if $fcheck notwordof text html latex |
||
11 | error=deposit_binary |
||
12 | job=edit |
||
13 | !exit |
||
14 | !endif |
||
15 | !if $fcheck=latex |
||
16 | srclen=!mexec scripts/flen.sh $wims_home/$wims_sesdir/user-deposit |
||
17 | !if $srclen>$max_texlen |
||
18 | error=file_too_long |
||
19 | !exit |
||
20 | !endif |
||
21 | l2htest=!sh which latex2html |
||
22 | !if $l2htest=$empty or not found isin $l2htest |
||
23 | error=no_latex2html |
||
24 | !exit |
||
25 | !endif |
||
26 | # The definition of TMPDIR will make latex2html fail! |
||
27 | !sh cd $wims_home/$wims_sesdir\ |
||
14335 | bpr | 28 | unset TMPDIR\ |
29 | cp user-deposit test.tex\ |
||
30 | latex2html -tmp /tmp -split 0 -nonavigation -noimages -noinfo -noaddress test.tex >latex2html.out 2>latex2html.err\ |
||
31 | sed 's/\é\;/\é\;/g;s/\è\;/\è\;/g;s/\à\;/\à\;/g;' <test/test.html >user-deposit\ |
||
32 | rm -r test |
||
23 | reyssat | 33 | fcheck=html |
34 | !endif |
||
35 | !if $fcheck=html |
||
36 | !exec html2msg $wims_home/$wims_sesdir/user-deposit |
||
37 | !endif |
||
38 | edtype= |
||
39 | !else |
||
40 | addtype=replace |
||
41 | !endif |
||
42 | |||
43 | !if $addtype=append |
||
44 | src=$wims_home/$Docdir/$doc/src/$block |
||
45 | dest=$wims_home/$wims_sesdir/doc.src |
||
46 | !mexec scripts/copy.sh |
||
47 | method=append |
||
48 | !else |
||
49 | method=copy |
||
50 | !endif |
||
51 | |||
52 | src=$wims_home/$wims_sesdir/user-deposit |
||
53 | dest=$wims_home/$wims_sesdir/doc.src |
||
54 | srclen=!mexec scripts/$method.sh |
||
55 | |||
56 | !if $addtype=prepend |
||
57 | src=$wims_home/$Docdir/$doc/src/$block |
||
58 | dest=$wims_home/$wims_sesdir/doc.src |
||
59 | srclen=!mexec scripts/append.sh |
||
60 | !endif |
||
61 | |||
62 | !if $srclen>$max_blocklen |
||
63 | error=src_too_long |
||
64 | job=edit |
||
65 | !exit |
||
66 | !endif |
||
67 | |||
68 | !writefile wimshome/$wims_sesdir/doc.def |
||
69 | !sh $wims_home/bin/msg2wims $wims_home/$wims_sesdir/doc.src $wims_home/$wims_sesdir/doc.def |
||
70 |