[svn r38044] Now just writing dots when running tests, decreased font size a little of the

class docstring and link.

--HG--
branch : trunk
This commit is contained in:
guido 2007-02-07 02:01:25 +01:00
parent 8ab4468b5c
commit 318a1c2333
4 changed files with 16 additions and 13 deletions

View File

@ -56,22 +56,11 @@ def build(pkgdir, dsa, capture):
spb = htmlgen.SourcePageBuilder(targetdir, l, pkgdir, proj, capture, spb = htmlgen.SourcePageBuilder(targetdir, l, pkgdir, proj, capture,
LayoutPage) LayoutPage)
capture.err.writeorg('building namespace pages\n')
apb.build_namespace_pages() apb.build_namespace_pages()
capture.err.writeorg('building class pages\n')
class_names = dsa.get_class_names() class_names = dsa.get_class_names()
apb.build_class_pages(class_names) apb.build_class_pages(class_names)
capture.err.writeorg('building function pages\n')
function_names = dsa.get_function_names() function_names = dsa.get_function_names()
apb.build_function_pages(function_names) apb.build_function_pages(function_names)
capture.err.writeorg('building source pages\n')
spb.build_pages(pkgdir) spb.build_pages(pkgdir)
capture.err.writeorg('replacing temporary links\n')
l.replace_dirpath(targetdir) l.replace_dirpath(targetdir)
capture.err.writeorg('done building documentation\n')

View File

@ -32,8 +32,10 @@ class H(html):
link = H.a(name, href=href) link = H.a(name, href=href)
self.append(H.BaseDescription(link)) self.append(H.BaseDescription(link))
self.append('):') self.append('):')
self.append(H.Docstring(docstring or '*no docstring available*')) self.append(H.div(H.Docstring(docstring or
self.append(sourcelink) '*no docstring available*'),
sourcelink,
class_='classdoc'))
if properties: if properties:
self.append(H.h2('properties:')) self.append(H.h2('properties:'))
for name, val in properties: for name, val in properties:

View File

@ -251,6 +251,8 @@ class SourcePageBuilder(AbstractPageBuilder):
for fspath in [base] + list(base.visit()): for fspath in [base] + list(base.visit()):
if fspath.ext in ['.pyc', '.pyo']: if fspath.ext in ['.pyc', '.pyo']:
continue continue
if self.capture:
self.capture.err.writeorg('.')
relfspath = fspath.relto(base) relfspath = fspath.relto(base)
if relfspath.find('%s.' % (os.path.sep,)) > -1: if relfspath.find('%s.' % (os.path.sep,)) > -1:
# skip hidden dirs and files # skip hidden dirs and files
@ -443,6 +445,8 @@ class ApiPageBuilder(AbstractPageBuilder):
def build_class_pages(self, classes_dotted_names): def build_class_pages(self, classes_dotted_names):
passed = [] passed = []
for dotted_name in sorted(classes_dotted_names): for dotted_name in sorted(classes_dotted_names):
if self.capture:
self.capture.err.writeorg('.')
parent_dotted_name, _ = split_of_last_part(dotted_name) parent_dotted_name, _ = split_of_last_part(dotted_name)
try: try:
sibling_dotted_names = self.namespace_tree[parent_dotted_name] sibling_dotted_names = self.namespace_tree[parent_dotted_name]
@ -460,6 +464,8 @@ class ApiPageBuilder(AbstractPageBuilder):
def build_function_pages(self, method_dotted_names): def build_function_pages(self, method_dotted_names):
passed = [] passed = []
for dotted_name in sorted(method_dotted_names): for dotted_name in sorted(method_dotted_names):
if self.capture:
self.capture.err.writeorg('.')
# XXX should we create a build_function_view instead? # XXX should we create a build_function_view instead?
parent_dotted_name, _ = split_of_last_part(dotted_name) parent_dotted_name, _ = split_of_last_part(dotted_name)
sibling_dotted_names = self.namespace_tree[parent_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() function_names = self.dsa.get_function_names()
class_names = self.dsa.get_class_names() class_names = self.dsa.get_class_names()
for dotted_name in sorted(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: if dotted_name in function_names or dotted_name in class_names:
continue continue
subitem_dotted_names = self.namespace_tree[dotted_name] subitem_dotted_names = self.namespace_tree[dotted_name]

View File

@ -34,6 +34,10 @@ ul li {
list-style-type: none; list-style-type: none;
} }
.classdoc {
font-size: 0.9em;
}
.code a { .code a {
color: blue; color: blue;
font-weight: bold; font-weight: bold;