Subversion Repositories wimsdev

Rev

Rev 10 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 1502
Line 2... Line 2...
2
 
2
 
3
cd `dirname $0`
3
cd `dirname $0`
-
 
4
lang=$1
-
 
5
if [ -n "$lang" ] ; then file="commands.$lang" ; else file="commands" ; lang="en"; fi;
4
 
6
 
5
echo "<p>
7
echo "<p>
6
!! This file is automatically generated! Do not edit by hand.
8
!! This file is automatically generated! Do not edit by hand."
-
 
9
 
-
 
10
if [ "$lang" == en ] ;  then echo "
7
Each command takes one line.<p>
11
Each command takes one line.<p>
8
In the following table, <tt>[color]</tt>
12
In the following table, <tt>[color]</tt>
9
may be either a color name, or 3 integers between 0 and 255, separated by commas,
13
may be either a color name, or 3 integers between 0 and 255, separated by commas,
10
for the values of red,green,blue.
14
for the values of red,green,blue.
11
<p>\$table_header
15
<p>\$table_header
12
<caption>Drawing commands</caption>
16
<caption>Drawing commands</caption>
13
\$table_hdtr<th colspan=5>Name and syntax
17
\$table_hdtr<th colspan=5>Name and syntax
14
\$table_hdtr<th colspan=2>Synonymes
18
\$table_hdtr<th colspan=2>Synonymes
15
<th colspan=3>Meaning</th></tr><tr><td><td colspan=5>
19
<th colspan=3>Meaning</th></tr><tr><td><td colspan=5>
-
 
20
"  ; fi
16
"
21
 
-
 
22
if [ "$lang" == fr ] ; then echo "
-
 
23
Chaque commande prend une ligne.<p>
-
 
24
Dans la table suivante <tt>[color]</tt>
-
 
25
peut être un nom de couleur ou 3 entiers 0 entre 255, séparés par des virgules,
-
 
26
correspondant aux valeurs de  rouge, vert ,bleu.
-
 
27
<p>\$table_header
-
 
28
<caption>Commandes</caption>
-
 
29
\$table_hdtr<th colspan=5>Nom et syntaxe
-
 
30
\$table_hdtr<th colspan=2>Synonymes
-
 
31
<th colspan=3>Signification</th></tr><tr><td><td colspan=5>
-
 
32
" ; fi
-
 
33
 
17
 
34
 
18
awk 'BEGIN {a=10}
35
awk 'BEGIN {a=10}
19
        substr($0,1,1)==":" {a=0}
36
        substr($0,1,1)==":" {a=0}
20
        {a++}
37
        {a++}
21
        a==1 {print "$table_tr<td colspan=5 nowrap><tt>"substr($0,2)"</tt></td></tr>"}
38
        a==1 {print "$table_tr<td colspan=5 nowrap><tt>"substr($0,2)"</tt></td></tr>"}
22
        a==2 {print "$table_tr<td colspan=2><tt>"$0"&nbsp;</tt></td>"}
39
        a==2 {print "$table_tr<td colspan=2><tt>"$0"&nbsp;</tt></td>"}
23
        a==3 {print "<td colspan=3>"$0"</td></tr><tr><td colspan=5>"}
40
        a==3 {print "<td colspan=3>"$0"</td></tr><tr><td colspan=5>"}
24
        ' commands
41
        ' $file
25
 
42
 
26
echo "\$table_end<p>"
43
echo "\$table_end<p>"
27
 
-