Mercurial > pygame
comparison makeref.py @ 1849:301bc61643a9 math_module
merged changes from trunk
| author | lorenz |
|---|---|
| date | Mon, 16 Nov 2009 18:31:40 +0000 |
| parents | fdf70a7fb220 |
| children | c777771e11f1 |
comparison
equal
deleted
inserted
replaced
| 1848:bbc21cd6faeb | 1849:301bc61643a9 |
|---|---|
| 85 WritePageLinks(outFile, pages) | 85 WritePageLinks(outFile, pages) |
| 86 outFile.write(HTMLMid) | 86 outFile.write(HTMLMid) |
| 87 HtmlOut(doc, index, outFile) | 87 HtmlOut(doc, index, outFile) |
| 88 outFile.write(HTMLFinish) | 88 outFile.write(HTMLFinish) |
| 89 outFile.close() | 89 outFile.close() |
| 90 | 90 |
| 91 outFile = open(os.path.join("src", "pygamedocs.h"), "w") | 91 for name, doc in docs: |
| 92 outFile.write("/* Auto generated file: with makeref.py . Docs go in src/ *.doc . */\n") | 92 outFile = open(os.path.join("src", "doc", "%s_doc.h") % name, "w") |
| 93 for doc in justDocs: | 93 outFile.write("/* Auto generated file: with makeref.py . Docs go in src/ *.doc . */\n") |
| 94 WriteDocHeader(outFile, doc, options.have_code_docs) | 94 WriteDocHeader(outFile, doc, options.have_code_docs) |
| 95 | 95 outFile.write("\n\n/* Docs in a comments... slightly easier to read. */\n\n\n/*") |
| 96 | |
| 97 outFile.write("\n\n/* Docs in a comments... slightly easier to read. */\n\n\n/*") | |
| 98 # add the docs as comments to the header file. | |
| 99 for doc in justDocs: | |
| 100 WriteDocHeaderComments(outFile, doc) | 96 WriteDocHeaderComments(outFile, doc) |
| 101 | 97 outFile.write("\n\n*/\n\n") |
| 102 outFile.write("\n\n*/\n\n") | |
| 103 | |
| 104 | 98 |
| 105 topDoc = LayoutDocs(justDocs) | 99 topDoc = LayoutDocs(justDocs) |
| 106 | 100 |
| 107 outFile = open(os.path.join("docs","ref","index.html"), "w") | 101 outFile = open(os.path.join("docs","ref","index.html"), "w") |
| 108 outFile.write(HTMLHeader % "Index") | 102 outFile.write(HTMLHeader % "Index") |
| 117 | 111 |
| 118 def HtmlOut(doc, index, f): | 112 def HtmlOut(doc, index, f): |
| 119 f.write('\n\n<a name="%s">\n' % doc.fullname) | 113 f.write('\n\n<a name="%s">\n' % doc.fullname) |
| 120 f.write("<big><b>%s</big></b><br><ul>\n" % doc.fullname) | 114 f.write("<big><b>%s</big></b><br><ul>\n" % doc.fullname) |
| 121 if doc.descr: | 115 if doc.descr: |
| 122 f.write(" <i>%s</i><br>\n" % doc.descr) | 116 f.write(" <i>%s</i><br>\n" % doc.descr) |
| 123 if doc.protos: | 117 if doc.protos: |
| 124 for p in doc.protos: | 118 for p in doc.protos: |
| 125 f.write(" <tt>%s</tt><br>\n" % p) | 119 f.write(" <tt>%s</tt><br>\n" % p) |
| 126 if doc.kids: | 120 if doc.kids: |
| 127 f.write("<ul><small><table>\n") | 121 f.write("<ul><small><table>\n") |
