From 318a1c2333611398a5ab20cdcdf9df30a487a395 Mon Sep 17 00:00:00 2001 From: guido Date: Wed, 7 Feb 2007 02:01:25 +0100 Subject: [PATCH] [svn r38044] Now just writing dots when running tests, decreased font size a little of the class docstring and link. --HG-- branch : trunk --- py/apigen/apigen.py | 11 ----------- py/apigen/html.py | 6 ++++-- py/apigen/htmlgen.py | 8 ++++++++ py/apigen/style.css | 4 ++++ 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/py/apigen/apigen.py b/py/apigen/apigen.py index 9a2ab7dbd..7ecab70d7 100644 --- a/py/apigen/apigen.py +++ b/py/apigen/apigen.py @@ -56,22 +56,11 @@ def build(pkgdir, dsa, capture): spb = htmlgen.SourcePageBuilder(targetdir, l, pkgdir, proj, capture, LayoutPage) - capture.err.writeorg('building namespace pages\n') apb.build_namespace_pages() - - capture.err.writeorg('building class pages\n') class_names = dsa.get_class_names() apb.build_class_pages(class_names) - - capture.err.writeorg('building function pages\n') function_names = dsa.get_function_names() apb.build_function_pages(function_names) - - capture.err.writeorg('building source pages\n') spb.build_pages(pkgdir) - - capture.err.writeorg('replacing temporary links\n') l.replace_dirpath(targetdir) - capture.err.writeorg('done building documentation\n') - diff --git a/py/apigen/html.py b/py/apigen/html.py index dbd9d733b..de0aee9f7 100644 --- a/py/apigen/html.py +++ b/py/apigen/html.py @@ -32,8 +32,10 @@ class H(html): link = H.a(name, href=href) self.append(H.BaseDescription(link)) self.append('):') - self.append(H.Docstring(docstring or '*no docstring available*')) - self.append(sourcelink) + self.append(H.div(H.Docstring(docstring or + '*no docstring available*'), + sourcelink, + class_='classdoc')) if properties: self.append(H.h2('properties:')) for name, val in properties: diff --git a/py/apigen/htmlgen.py b/py/apigen/htmlgen.py index d9048b7ca..262556c57 100644 --- a/py/apigen/htmlgen.py +++ b/py/apigen/htmlgen.py @@ -251,6 +251,8 @@ class SourcePageBuilder(AbstractPageBuilder): for fspath in [base] + list(base.visit()): if fspath.ext in ['.pyc', '.pyo']: continue + if self.capture: + self.capture.err.writeorg('.') relfspath = fspath.relto(base) if relfspath.find('%s.' % (os.path.sep,)) > -1: # skip hidden dirs and files @@ -443,6 +445,8 @@ class ApiPageBuilder(AbstractPageBuilder): def build_class_pages(self, classes_dotted_names): passed = [] for dotted_name in sorted(classes_dotted_names): + if self.capture: + self.capture.err.writeorg('.') parent_dotted_name, _ = split_of_last_part(dotted_name) try: sibling_dotted_names = self.namespace_tree[parent_dotted_name] @@ -460,6 +464,8 @@ class ApiPageBuilder(AbstractPageBuilder): def build_function_pages(self, method_dotted_names): passed = [] for dotted_name in sorted(method_dotted_names): + if self.capture: + self.capture.err.writeorg('.') # XXX should we create a build_function_view instead? parent_dotted_name, _ = split_of_last_part(dotted_name) sibling_dotted_names = self.namespace_tree[parent_dotted_name] @@ -480,6 +486,8 @@ class ApiPageBuilder(AbstractPageBuilder): function_names = self.dsa.get_function_names() class_names = self.dsa.get_class_names() for dotted_name in sorted(names): + if self.capture: + self.capture.err.writeorg('.') if dotted_name in function_names or dotted_name in class_names: continue subitem_dotted_names = self.namespace_tree[dotted_name] diff --git a/py/apigen/style.css b/py/apigen/style.css index 65b2bc303..b918dc8d0 100644 --- a/py/apigen/style.css +++ b/py/apigen/style.css @@ -34,6 +34,10 @@ ul li { list-style-type: none; } +.classdoc { + font-size: 0.9em; +} + .code a { color: blue; font-weight: bold;