From cf54ecf3f1f4a2968c0c2851fd2fb7924b63b81f Mon Sep 17 00:00:00 2001 From: Michael Hayes Date: Mon, 2 Sep 2013 19:06:52 +1200 Subject: [PATCH] Add rotate option --- etc/graphdeps.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/etc/graphdeps.py b/etc/graphdeps.py index 764b1f1..eaa1af9 100755 --- a/etc/graphdeps.py +++ b/etc/graphdeps.py @@ -187,6 +187,10 @@ def main(argv = None): dest = 'debug', default = False, help = 'enable debugging') + parser.add_option('--rotate', action = 'store_true', + dest = 'rotate', default = False, + help = 'rotate diagram') + parser.add_option('--fullpaths', action = 'store_true', dest = 'fullpaths', default = False, help = 'show full paths') @@ -236,7 +240,10 @@ def main(argv = None): dotfilename = '/tmp/tmp.dot' dotfile = open (dotfilename, 'w') - dotfile.write ('strict digraph {\n\tgraph [rankdir=LR];\n') + if options.rotate: + dotfile.write ('strict digraph {\n') + else: + dotfile.write ('strict digraph {\n\tgraph [rankdir=LR];\n') for target in wantedtargets: target_output (dotfile, target, targets, modules, options)