Add header comment to the generated ReST files

This commit is contained in:
Robin Dunn
2016-06-10 09:25:36 -07:00
parent dd552ce670
commit dd35a4f948

View File

@@ -541,6 +541,17 @@ def makeSummary(class_name, item_list, template, kind, add_tilde=True):
# ----------------------------------------------------------------------- #
header = """\
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2016 by Total Control Software
License: wxWindows License
"""
def writeSphinxOutput(stream, filename, append=False):
"""
Writes the text contained in the `stream` to the `filename` output file.
@@ -557,6 +568,7 @@ def writeSphinxOutput(stream, filename, append=False):
mode = 'a' if append else 'w'
with codecs.open(text_file, mode, encoding='utf-8') as fid:
if mode == 'w':
fid.write(header)
fid.write('.. include:: headings.inc\n\n')
fid.write(text)