Rev 3873 | Rev 5762 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
10 | reyssat | 1 | #! /bin/sh |
2 | |||
3 | cd `dirname $0` |
||
1502 | bpr | 4 | lang=$1 |
5 | if [ -n "$lang" ] ; then file="commands.$lang" ; else file="commands" ; lang="en"; fi; |
||
10 | reyssat | 6 | |
7 | echo "<p> |
||
1502 | bpr | 8 | !! This file is automatically generated! Do not edit by hand." |
9 | |||
2775 | bpr | 10 | if [ "$lang" = en ] ; then echo " |
10 | reyssat | 11 | Each command takes one line.<p> |
12 | In the following table, <tt>[color]</tt> |
||
13 | may be either a color name, or 3 integers between 0 and 255, separated by commas, |
||
14 | for the values of red,green,blue. |
||
3873 | bpr | 15 | " |
16 | drawing="Drawing commands" |
||
17 | synonym="Synonymes" |
||
18 | fi ; |
||
10 | reyssat | 19 | |
2775 | bpr | 20 | if [ "$lang" = fr ] ; then echo " |
1502 | bpr | 21 | Chaque commande prend une ligne.<p> |
22 | Dans la table suivante <tt>[color]</tt> |
||
23 | peut 阾re un nom de couleur ou 3 entiers 0 entre 255, s閜ar閟 par des virgules, |
||
3873 | bpr | 24 | correspondant aux valeurs de rouge, vert, bleu. |
25 | " |
||
26 | drawing="Commandes" |
||
27 | synonym="Synonymes" |
||
28 | fi ; |
||
1502 | bpr | 29 | |
2775 | bpr | 30 | if [ "$lang" = cn ] ; then echo " |
2071 | zjchen | 31 | 每条命令占一行.<p> |
32 | 在下表中, <tt>[色彩]</tt> |
||
33 | 可以是色彩名, 或3个用逗号分隔的0到255的整数, 分别代表红绿蓝三种颜色. |
||
3873 | bpr | 34 | " |
35 | drawing="作图命令" |
||
36 | synonym="同义词" |
||
37 | fi |
||
38 | echo "<p>\$table_header |
||
39 | <caption>$drawing</caption> |
||
40 | \$table_hdtr<th colspan="5">\$wims_name_name - \$wims_name_Syntax</th> |
||
41 | \$table_hdtr<th colspan="2">$synonym</th> |
||
42 | <th colspan="3">\$wims_name_Meaning</th></tr> |
||
43 | " |
||
10 | reyssat | 44 | awk 'BEGIN {a=10} |
45 | substr($0,1,1)==":" {a=0} |
||
46 | {a++} |
||
3873 | bpr | 47 | a==1 {print "$table_tr<td colspan=\"5\" nowrap><tt>"substr($0,2)"</tt></td></tr>"} |
48 | a==2 {print "$table_tr<td colspan=\"2\"><tt>"$0" </tt></td>"} |
||
3874 | bpr | 49 | a==3 {print "<td colspan=\"3\">"$0"</td></tr>"} |
1502 | bpr | 50 | ' $file |
10 | reyssat | 51 | |
52 | echo "\$table_end<p>" |