10 echo " $0 <conf-file>"
22 if [ ! -f "$finname" ]; then
29 // <graphviz center dpi=52>
32 // bgcolor="transparent";
39 for gen_id in $(seq 0 $((${#gens_prefix[@]} - 1))); do
40 echo "// GENERATION ${gens_prefix[$gen_id]}"
41 names_n="$(echo "${gens_names[$gen_id]}" | sed 's/|/\n/g' | wc -l)"
42 for name_id in $(seq 0 $((names_n - 1))); do
43 hue="$(echo "($name_id * 255 ) / $names_n" | bc -l)"
45 col100="$(./rgb_hsv.php -toxrgb 255 $hue 255.0 255.0)"
46 col33="$(./rgb_hsv.php -toxrgb 255 $hue 85.0 255.0)"
47 col17="$(./rgb_hsv.php -toxrgb 255 $hue 42.0 255.0)"
49 name="$(echo "${gens_names[$gen_id]}" | cut -d '|' -f $((name_id + 1)))"
50 if [ $names_n -gt 1 ]; then
51 name="${gens_prefix[$gen_id]}_${name}"
53 name="${gens_prefix[$gen_id]}"
55 echo "// [${name}][$col100][$col33][$col17]"
57 subgraph cluster_${name} {
60 fillcolor="#${col33}";
62 style="rounded,filled";
63 node [shape=record, color="#${col100}", style=filled, fillcolor="#${col17}"];
64 ${name} [label="<1>aaa aaa|<2>bbb bbb|<3>ccc ccc|<4>ddd ddd|<5>eee eee"];
67 tai="${tai}${NL}subgraph cluster_${name} { label=\"new name\";${NL} ${name} [label=\"<1>aaa|<2>bbb|<3>ccc|<4>ddd|<5>eee\"];}${NL}"
71 for gen_id in $(seq 0 $((${#gens_prefix[@]} - 1))); do
72 echo "// GENERATION ${gens_prefix[$gen_id]}"
73 names_n="$(echo "${gens_names[$gen_id]}" | sed 's/|/\n/g' | wc -l)"
74 for name_id in $(seq 0 $((names_n - 1))); do
75 hue="$(echo "($name_id * 255 ) / $names_n" | bc -l)"
76 col100="$(./rgb_hsv.php -toxrgb 255 $hue 255.0 255.0)"
78 gnxt_id=$((gen_id + 1))
79 if [ "${gens_prefix[$gnxt_id]}" = "" ]; then
82 gnxt_names_n="$(echo "${gens_names[$gnxt_id]}" | sed 's/|/\n/g' | wc -l)"
84 start=$((name_id % gnxt_names_n))
85 startp1=$(( ( name_id + 1) % gnxt_names_n))
89 for gnxt_name_id in $start $startp1; do
92 name="$(echo "${gens_names[$gen_id]}" | cut -d '|' -f $((name_id + 1)))"
93 if [ $names_n -gt 1 ]; then
94 name="${gens_prefix[$gen_id]}_${name}"
96 name="${gens_prefix[$gen_id]}"
98 gnxt_name="$(echo "${gens_names[$gnxt_id]}" | cut -d '|' -f $((gnxt_name_id + 1)))"
99 if [ $gnxt_names_n -gt 1 ]; then
100 gnxt_name="${gens_prefix[$gnxt_id]}_${gnxt_name}"
102 gnxt_name="${gens_prefix[$gnxt_id]}"
104 echo "${name}:${ct} -> ${gnxt_name}:2 [lhead=\"cluster_${gnxt_name}\", color=\"${col}\"];"