def _writeSTML(index, doc, destPath, nav): out = htmlCommon.writer( open( _fixFileName(destPath + '/t.%s.html' % (_fixFileName(string.replace(doc.name, '/', '.')))), 'w')) out('<HTML><HEAD><TITLE>%s %s</TITLE></HEAD>\n' % (doc.kind, doc.name)) out('<BODY BGCOLOR=WHITE FGCOLOR=BLACK>') out(nav.render(1)) out('<HR><TABLE CELLSPACING=0 BORDER=0 width=100%><TR>') out('<TD COLSPAN=2 BGCOLOR=%s>' % STML_COLORS[doc.kind]) out('<H2>%s <code>%s</code></H2>' % (doc.kind, doc.name)) out('<font size=-1>%s</font>' % renderDocString(doc.docString)) color = STML_COLORS[doc.kind] _writeDeps(out, color, 'Includes', index, doc, doc.includes) _writeBrandedDeps(out, color, 'Branded Includes', index, doc, doc.brandincludes) _writeDeps(out, color, 'Components', index, doc, doc.components) _writeBrandedDeps(out, color, 'Branded Components', index, doc, doc.brandcomponents) _writeDeps(out, color, 'Data Components', index, doc, doc.datacomps) _writeBrandedDeps(out, color, 'Branded Data Components', index, doc, doc.branddatacomps) _writeCaches(out, color, doc) _writeImports(out, color, index, doc) out('</TABLE>') _writeSource(out, doc) _writeDepTree(out, doc, index) out('<HR>') _writeUsedBy(out, color, doc, index) out(nav.render(0)) out('</BODY></HTML>')
def _writeSTML(index, doc, destPath, nav): out = htmlCommon.writer( open(_fixFileName(destPath + "/t.%s.html" % (_fixFileName(string.replace(doc.name, "/", ".")))), "w") ) out("<HTML><HEAD><TITLE>%s %s</TITLE></HEAD>\n" % (doc.kind, doc.name)) out("<BODY BGCOLOR=WHITE FGCOLOR=BLACK>") out(nav.render(1)) out("<HR><TABLE CELLSPACING=0 BORDER=0 width=100%><TR>") out("<TD COLSPAN=2 BGCOLOR=%s>" % STML_COLORS[doc.kind]) out("<H2>%s <code>%s</code></H2>" % (doc.kind, doc.name)) out("<font size=-1>%s</font>" % renderDocString(doc.docString)) color = STML_COLORS[doc.kind] _writeDeps(out, color, "Includes", index, doc, doc.includes) _writeBrandedDeps(out, color, "Branded Includes", index, doc, doc.brandincludes) _writeDeps(out, color, "Components", index, doc, doc.components) _writeBrandedDeps(out, color, "Branded Components", index, doc, doc.brandcomponents) _writeDeps(out, color, "Data Components", index, doc, doc.datacomps) _writeBrandedDeps(out, color, "Branded Data Components", index, doc, doc.branddatacomps) _writeCaches(out, color, doc) _writeImports(out, color, index, doc) out("</TABLE>") _writeSource(out, doc) _writeDepTree(out, doc, index) out("<HR>") _writeUsedBy(out, color, doc, index) out(nav.render(0)) out("</BODY></HTML>")
def _writeClass(destPath, upThing, klass, nav, index, ns, toppath = ''): out = writer(open(destPath + '/m.%s%s.%s.html' % ( upThing.name, toppath, klass.name), 'w')) nav = nav.newPlusAlter(up = 'm.%s%s.html' % (upThing.name, toppath), upText = '%s <code>%s</code>' % ( upThing.__class__.__name__, upThing.name)) out('<HTML><HEAD><TITLE>Class %s</TITLE></HEAD>\n' % klass.name) out('<BODY BGCOLOR=WHITE FGCOLOR=BLACK>') out('<H2>Class %s</H2>' % common.plainEscape(klass.name)) out(nav.render(1)) out('<HR><TABLE CELLSPACING=10 BORDER=0 width=100%><TR>') out('<TD COLSPAN=2 BGCOLOR=%s>' % CLASS_COLOR) out('<H2>Class <code>%s</code></H2>' % klass.name) _writeInherits(upThing, klass, out, index, ns) out('<font size=-1>%s</font>' % renderDocString(klass.docString)) _writeItemToc(klass, out, '%s%s.' % (toppath, upThing.name)) out('</TD></TR>') out('<TR><TD BGCOLOR=%s><FONT COLOR=%s>---</font></TD><TD>' % ( CLASS_COLOR, CLASS_COLOR)) for item in klass.funcClasses: if item.__class__.__name__ == 'Function': _writeFunction(item, out) else: #it's a class out('<B>Class <A HREF="m.%s%s.%s.html">%s</A></B><BR>' % ( toppath, klass.name, item.name, item.name)) _writeClass(destPath, klass, item, nav, index, ns, '%s%s.' % (toppath, klass.name)) out('</TD></TR></TABLE><BR><HR>') out(nav.render(0)) out('</BODY></HTML>')
def _writeModule(destPath, module, index, nav, ns): out = writer(open(destPath + '/m.%s.html' % module.name, 'w')) out('<HTML><HEAD><TITLE>Module %s</TITLE></HEAD>\n' % module.name) out('<BODY BGCOLOR=WHITE FGCOLOR=BLACK>') out('<H2>Module %s</H2>' % common.plainEscape(module.name)) out(nav.render(1)) out('<TD COLSPAN=2 BGCOLOR=%s>' % MODULE_COLOR) out('<HR><TABLE CELLSPACING=10 BORDER=0 width=100%><TR>') out('<TD COLSPAN=2 BGCOLOR=%s>' % MODULE_COLOR) out('<H2>Module <code>%s</code></H2>' % module.name) out('<font size=-1>%s</font>' % renderDocString(module.docString)) _writeItemToc(module, out) out('</TD></TR>') out('<TR><TD BGCOLOR=%s><FONT COLOR=%s>----</font></TD><TD>' % ( MODULE_COLOR, MODULE_COLOR)) for item in module.funcClasses: if item.__class__.__name__ == 'Function': _writeFunction(item, out) else: #it's a class out('<B>Class <A HREF="m.%s.%s.html">%s</A></B><BR>' % ( module.name, item.name, item.name)) _writeClass(destPath, module, item, nav, index, ns) out('</TD></TR></TABLE><HR>') out(nav.render(0)) out('</BODY></HTML>')
def _writeFunction(func, out, toppath = ''): """**take a function definition and produce HTML""" out('<P><A NAME="%s">' % func.name) out('<B><CODE>%s</CODE></B><BR>' % func.sig) out('<p><font size=-1>%s</font>' % renderDocString(func.docString)) out('<HR>')