Skip to content

Commit

Permalink
Merge ef0a714 into 3ffbac9
Browse files Browse the repository at this point in the history
  • Loading branch information
markrwilliams committed Nov 19, 2016
2 parents 3ffbac9 + ef0a714 commit d6ec8ab
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion automat/_visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'\"'))

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit d6ec8ab

Please sign in to comment.