Graphviz: Allow specifying layout engine on cmdline

It's better for demonstration purposes.
master
LEdoian 1 year ago
parent e95ca088a5
commit be03b7fb51

@ -37,7 +37,7 @@ def visualize_graphviz(diff):
graph.write('}\n')
# Show:
gv = subprocess.Popen(['dot', '-Tgtk', '-Kfdp'], text=True, stdin=subprocess.PIPE)
gv = subprocess.Popen(['dot', '-Tgtk', '-K'+(sys.argv[2] if len(sys.argv)>=3 else 'fdp')], text=True, stdin=subprocess.PIPE)
gv.communicate(graph.getvalue())
gv.wait()

Loading…
Cancel
Save