summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 17:10:16 +0200
committerGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 17:10:16 +0200
commit7f38e26fef3e7978bea36b7c5c0a23821bfb1105 (patch)
tree429f0bdd1eef638a31341e39110c568680329938
parentb224514c618ded69cba207c8383340403cf0dfa5 (diff)
downloadumlpy-7f38e26fef3e7978bea36b7c5c0a23821bfb1105.tar.gz
umlpy-7f38e26fef3e7978bea36b7c5c0a23821bfb1105.tar.bz2
Add output file option
-rw-r--r--grapher.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/grapher.py b/grapher.py
index e06db11..cb58fd8 100644
--- a/grapher.py
+++ b/grapher.py
@@ -32,7 +32,10 @@ parser.add_option("-f", "--force", dest = "forces", action = "append",
display")
parser.add_option("--all-methods", dest = "all_methods", action = "store_true",
default = False,
- help = "show all methods")
+ help = "shows all methods")
+parser.add_option("-o", "--output", dest = "output", action = "store",
+ default = "uml.png",
+ help = "output file")
(options, args) = parser.parse_args ()
@@ -44,9 +47,11 @@ forces = reduce (lambda x, y: x + y,
map (lambda s: s.split(","), options.forces), [])
prefix = options.prefix
all_methods = options.all_methods
+output = options.output
print "Settings"
print "--------"
+print "Output file :", output
print "Prefix :", prefix
print "Show all methods :", all_methods
print "Excludes :", excludes
@@ -255,4 +260,4 @@ for class_name in classes:
break
gv.layout (graph, 'dot')
-gv.render (graph, 'png', 'test.png')
+gv.render (graph, 'png', output)