Использовать gvpr
просто, если разобраться с основами:
input.dot
digraph test {
node1 -> node2[label="test 1"]; /* will use the default edge definition from the above */
node2 -> node3 [label="test 2", edgetype="edge2"]; /* will use the second edge definition */
node2 -> node4 [label="test 3", edgetype="edge3"]; /* and so on... */
}
filter.gvpr
E {
color="red";
fontsize=11;
fontname="Arial narrow"
}
E[edgetype == "edge2"] {
color="green";
fontsize=11;
fontname="Arial narrow";
style="bold"
}
E[edgetype == "edge3"] {
color="blue";
fontsize=14;
fontname="Arial narrow"
}
С командой
gvpr -c -f filter.gvpr -o output.dot input.dot
создаст файл output.dot
:
digraph test {
node1 -> node2 [color=red,
fontname="Arial narrow",
fontsize=11,
label="test 1"];
node2 -> node3 [color=green,
edgetype=edge2,
fontname="Arial narrow",
fontsize=11,
label="test 2",
style=bold];
node2 -> node4 [color=blue,
edgetype=edge3,
fontname="Arial narrow",
fontsize=14,
label="test 3"];
}