summaryrefslogtreecommitdiff
path: root/logilab/common/ureports/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'logilab/common/ureports/__init__.py')
-rw-r--r--logilab/common/ureports/__init__.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/logilab/common/ureports/__init__.py b/logilab/common/ureports/__init__.py
index d76ebe5..8ce68a0 100644
--- a/logilab/common/ureports/__init__.py
+++ b/logilab/common/ureports/__init__.py
@@ -3,18 +3,18 @@
#
# This file is part of logilab-common.
#
-# logilab-common is free software: you can redistribute it and/or modify it under
-# the terms of the GNU Lesser General Public License as published by the Free
-# Software Foundation, either version 2.1 of the License, or (at your option) any
-# later version.
+# logilab-common is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by the
+# Free Software Foundation, either version 2.1 of the License,
+# or (at your option) any later version.
#
# logilab-common is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
-# You should have received a copy of the GNU Lesser General Public License along
-# with logilab-common. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with logilab-common. If not, see <http://www.gnu.org/licenses/>.
"""Universal report objects and some formatting drivers.
A way to create simple reports using python objects, primarily designed to be
@@ -37,6 +37,7 @@ def get_nodes(node, klass):
for grandchild in get_nodes(child, klass):
yield grandchild
+
def layout_title(layout):
"""try to return the layout's title as string, return None if not found
"""
@@ -44,6 +45,7 @@ def layout_title(layout):
if isinstance(child, Title):
return u' '.join([node.data for node in get_nodes(child, Text)])
+
def build_summary(layout, level=1):
"""make a summary for the report, including X level"""
assert level > 0