mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Add header comment to the generated ReST files
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user