diff options
-rw-r--r-- | graph.py | 7 | ||||
-rw-r--r-- | ureports/nodes.py | 14 |
2 files changed, 12 insertions, 9 deletions
@@ -89,14 +89,15 @@ class DotBackend: def emit_edge(self, name1, name2, **props): """emits edge from <name1> to <name2> - authorized props: label, style, color, dir, weight + authorized props: see http://www.graphviz.org/doc/info/attrs.html """ attrs = ['%s="%s"' % (prop, value) for prop, value in props.items()] self.emit('edge [%s];' % ", ".join(attrs)) self.emit('%s -> %s' % (normalize_node_id(name1), normalize_node_id(name2))) def emit_node(self, name, **props): - """authorized props: shape, label, color, fillcolor, style""" + """authorized props: see http://www.graphviz.org/doc/info/attrs.html + """ attrs = ['%s="%s"' % (prop, value) for prop, value in props.items()] self.emit('%s [%s];' % (normalize_node_id(name), ", ".join(attrs))) @@ -118,7 +119,7 @@ class GraphGenerator: props = propshdlr.node_properties(node) self.backend.emit_node(nodeid, **props) for subjnode, objnode, edge in visitor.edges(): - props = propshdlr.edge_properties(edge) + props = propshdlr.edge_properties(edge, subjnode, objnode) self.backend.emit_edge(subjnode, objnode, **props) return self.backend.generate(outputfile) diff --git a/ureports/nodes.py b/ureports/nodes.py index 1cf2624..c8da4f5 100644 --- a/ureports/nodes.py +++ b/ureports/nodes.py @@ -1,6 +1,3 @@ -# Copyright (c) 2004-2005 LOGILAB S.A. (Paris, FRANCE). -# http://www.logilab.fr/ -- mailto:contact@logilab.fr -# # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later @@ -13,12 +10,17 @@ # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -"""Universal reports objects +"""Micro reports objects + +A micro report is a tree of layout and content objects + -A Universal report is a tree of layout and content objects +:author: Logilab +:copyright: 2004-2008 LOGILAB S.A. (Paris, FRANCE) +:contact: http://www.logilab.fr/ -- mailto:python-projects@logilab.org """ -__revision__ = "$Id: nodes.py,v 1.11 2006-03-08 09:47:38 katia Exp $" +__docformat__ = "restructuredtext en" from logilab.common.tree import VNode |