diff --git a/docs/docmaker.py b/docs/docmaker.py index 1560ad814..5a6ea0e7b 100644 --- a/docs/docmaker.py +++ b/docs/docmaker.py @@ -327,6 +327,33 @@ class DocContent: if field: print " " + def dump_html(self): + n = len(self.fields) + for i in range(n): + field = self.fields[i] + if field==[]: + print "

" + for paras in self.texts[i]: + print "

" + paras.dump() + print "

" + else: + if i==1: + print "" + if n > 1: + print "
" + else: + print "
" + + print ""+field+"" + + for paras in self.texts[i]: + print "

" + paras.dump() + print "

" + + print "
" + ###################################################################################### # @@ -439,6 +466,36 @@ def dump_doc_contents( block_list ): print "" print "" +def dump_html_1( block_list ): + + print "" + types = [ 'Type', 'Struct', 'FuncType', 'Function', 'Constant', 'Enumeration' ] + for block in block_list: + docblock = DocBlock(block) + print "
" + for i in range(len(docblock.markers)): + marker = docblock.markers[i] + content = docblock.contents[i] + dcontent = DocContent( content ) + + if marker=="Description": + print "" + + elif marker in types: + print "

"+content[0]+"

" + else: + print "

"+marker+"

" + print "" + + print "" + + print "
" + + def main(argv): """main program loop""" print "extracting comment blocks from sources .." @@ -449,8 +506,10 @@ def main(argv): # dump_doc_blocks( list ) # print "dumping block contents .." - dump_doc_contents(list) +# dump_doc_contents(list) + dump_html_1(list) + # dump_single_content(list) # If called from the command line