如何使用gvpr
将包含DOT语言的多个图形的文件拆分为多个DOT文件?
输入(1个文件):
# single.dot
digraph one {
a -> b;
}
digraph two {
c -> d;
}
输出(每个文件1个图表):
# one.dot
digraph one {
a -> b;
}
# two.dot
digraph two {
c -> d;
}
答案 0 :(得分:4)
BEG_G {
fname = sprintf("%s.dot",$G.name);
writeG($G, fname);
}