[dia] New file format for DSM tool (--dt), see http://dtangler.org
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] New file format for DSM tool (--dt), see http://dtangler.org
- Date: Wed, 6 Oct 2010 22:00:24 +0000 (UTC)
commit 56b4ccbbce9358f11a00f8ac42f8443e0d2db73e
Author: Hans Breuer <hans breuer org>
Date: Fri Oct 1 22:08:09 2010 +0200
New file format for DSM tool (--dt), see http://dtangler.org
plug-ins/python/wdeps.py | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/python/wdeps.py b/plug-ins/python/wdeps.py
index f84faaa..b27bf35 100644
--- a/plug-ins/python/wdeps.py
+++ b/plug-ins/python/wdeps.py
@@ -591,6 +591,7 @@ def main () :
bByUse = 0
bReduce = 0
bTred = 0
+ bSaveDt = 0
sOutFilename = None
sPickle = None
@@ -639,6 +640,8 @@ def main () :
nCutLeafs = 10000 # infinite ;)
elif arg == "--dump" :
bDump = 1
+ elif arg == "--dt" :
+ bSaveDt = 1
elif arg == "--reduce" :
bReduce = 1
elif arg == "--tred" :
@@ -794,8 +797,22 @@ For more information read the source.
DumpSymbols (deps, f)
# no diagram at all
sys.exit (0)
+ if bSaveDt :
+ SaveDt (deps, f)
+ else :
+ SaveDot (deps, sGraph, bByUse, nSymbols, f)
- SaveDot (deps, sGraph, bByUse, nSymbols, f)
+def SaveDt (deps, f) :
+ """ see: http://dtangler.org """
+ deps_keys = deps.keys()
+ deps_keys.sort()
+ for sn in deps_keys :
+ node = deps[sn]
+ edge_keys = node.deps.keys()
+ if not edge_keys :
+ continue
+ edge_keys.sort()
+ f.write (sn + " : " + string.join (edge_keys, " ") + "\n")
def SaveDot (deps, sGraph, bByUse, nSymbols, f) :
# build the graph
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]