Rev 4301 | Rev 5753 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4301 | Rev 4302 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | #line 2: graphviz/number_of_image |
4 | #line 2: graphviz/number_of_image |
5 | #line 3: size in pixels width,height |
5 | #line 3: size in pixels width,height |
6 | #line 4 and following: plain output (for the coordinates) |
6 | #line 4 and following: plain output (for the coordinates) |
7 | 7 | ||
8 | if [ "$wims_exec_parm" = "" ] || [ "$s2_dir" = "" ] || [ ! -d "$s2_dir" ]; then |
8 | if [ "$wims_exec_parm" = "" ] || [ "$s2_dir" = "" ] || [ ! -d "$s2_dir" ]; then |
9 |
|
9 | exit |
10 | fi |
10 | fi |
11 | 11 | ||
12 | tstamp=`date '+%s'` |
12 | tstamp=`date '+%s'` |
13 | 13 | ||
14 | if [ "$wims_exec_parm" = "about" ]; then |
14 | if [ "$wims_exec_parm" = "about" ]; then |
15 | dd=`./bin/ |
15 | dd=`./bin/ch..root dot -V 2>&1| head -1` ; |
16 | echo "<a href=\"http://www.graphviz.org\">Graphviz</a> ($dd)" ; |
16 | echo "<a href=\"http://www.graphviz.org\">Graphviz</a> ($dd)" ; |
17 | exit; |
17 | exit; |
18 | fi |
18 | fi |
19 | 19 | ||
20 | if [ -z "$w_graphviz_charset" ]; then w_graphviz_charset="iso-8859-1"; fi |
20 | if [ -z "$w_graphviz_charset" ]; then w_graphviz_charset="iso-8859-1"; fi |
21 | if [ -z "$w_graphviz_output" ]; then w_graphviz_output='png' ; fi |
21 | if [ -z "$w_graphviz_output" ]; then w_graphviz_output='png' ; fi |
Line 28... | Line 28... | ||
28 | do |
28 | do |
29 | num=`basename $file .$w_graphviz_output` |
29 | num=`basename $file .$w_graphviz_output` |
30 | if [ $i -le $num ]; then i=$(( $num+1 )) ; fi |
30 | if [ $i -le $num ]; then i=$(( $num+1 )) ; fi |
31 | done |
31 | done |
32 | 32 | ||
33 | - | ||
34 | # ancien : parm="-T$w_graphviz_output -O -Tplain -Gcharset=$w_graphviz_charset" |
- | |
35 | parm="-T$w_graphviz_output -o $tmp_dir/graphviz.$w_graphviz_output -Tplain -Gcharset=$w_graphviz_charset" |
33 | parm="-T$w_graphviz_output -o $tmp_dir/graphviz.$w_graphviz_output -Tplain -Gcharset=$w_graphviz_charset" |
36 | parm0="-Tplain -o $tmp_dir/graphviz.plain -Gcharset=$w_graphviz_charset" |
- | |
37 | cat <<@ >$tmp_dir/graphviz |
34 | cat <<@ >$tmp_dir/graphviz |
38 | $wims_exec_parm |
35 | $wims_exec_parm |
39 | @ |
36 | @ |
40 | 37 | ||
41 | ./bin/ |
38 | ./bin/ch..root $w_graphviz_format $parm $tmp_dir/graphviz > $tmp_dir/graphviz.plain |
42 | mv -f $tmp_dir/graphviz.$w_graphviz_output $s2_dir/graphviz/$i.$w_graphviz_output |
39 | mv -f $tmp_dir/graphviz.$w_graphviz_output $s2_dir/graphviz/$i.$w_graphviz_output |
43 | 40 | ||
44 |
|
41 | if [ -f "$s2_dir/graphviz/$i.$w_graphviz_output" ]; then |
45 |
|
42 | echo "wims.cgi?session=$w_session&+cmd=getins&+special_parm=graphviz/$i.$w_graphviz_output&+modif=$tstamp" |
46 | # |
- | |
47 | echo "$src" |
- | |
48 |
|
43 | ./bin/ch..root identify -format \%w,\%h $s2_dir/graphviz/$i.$w_graphviz_output |
49 | echo "$a" |
- | |
50 | cat $tmp_dir/graphviz.plain |
44 | cat $tmp_dir/graphviz.plain |
51 |
|
45 | fi |
52 | #a=identify -format \%w,\%h $s2_dir/$i.$w_graphviz_output |
- | |
53 | - | ||
54 | #\text{c=digraph bar {a->b}} |
- | |
55 | #\text{a=wims(exec graphviz \c)} |
- | |
56 | #\statement{<img src=\"$a\" $w_graphviz_image_attr alt=\"Graphviz traced image\">"} |
- | |
57 | 46 | ||
58 | #<img src=\"$src\" $w_graphviz_image_attr alt=\"Graphviz traced image\">" |
- | |
- | 47 | exit |