diff --git a/automat/_visualize.py b/automat/_visualize.py index 05c020b..9468667 100644 --- a/automat/_visualize.py +++ b/automat/_visualize.py @@ -8,6 +8,46 @@ from ._discover import findMachines +FORMATS = frozenset([ # http://www.graphviz.org/doc/info/output.html + 'bmp', + 'canon', 'dot', 'gv', 'xdot', 'xdot1.2', 'xdot1.4', + 'cgimage', + 'cmap', + 'eps', + 'exr', + 'fig', + 'gd', 'gd2', + 'gif', + 'gtk', + 'ico', + 'imap', 'cmapx', + 'imap_np', 'cmapx_np', + 'ismap', + 'jp2', + 'jpg', 'jpeg', 'jpe', + 'pct', 'pict', + 'pdf', + 'pic', + 'plain', 'plain-ext', + 'png', + 'pov', + 'ps', + 'ps2', + 'psd', + 'sgi', + 'svg', 'svgz', + 'tga', + 'tif', 'tiff', + 'tk', + 'vml', 'vmlz', + 'vrml', + 'wbmp', + 'webp', + 'xlib', + 'x11', +]) + + def _gvquote(s): return '"{}"'.format(s.replace('"', r'\"')) @@ -143,7 +183,7 @@ def tool(_progname=sys.argv[0], default=".automat_visualize") argumentParser.add_argument('--image-type', '-t', help="The image format.", - choices=graphviz.files.FORMATS, + choices=FORMATS, default='png') argumentParser.add_argument('--view', '-v', help="View rendered graphs with"