mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Phoenix: sizers_overview.rst expanded; added a bunch of "contributed" snippets on various classes/methods; many fixes on strange doxygen layouts and XML hierarchies; fixed many cross-references between classes/methods/functions in the etg files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -560,6 +560,7 @@ def WriteSphinxOutput(stream, filename, append=False):
|
||||
fid = codecs.open(text_file, mode, encoding='utf-8')
|
||||
if mode == 'w':
|
||||
fid.write('.. include:: headings.inc\n\n')
|
||||
|
||||
fid.write(text)
|
||||
fid.close()
|
||||
|
||||
@@ -761,7 +762,7 @@ def FormatContributedSnippets(kind, contrib_snippets):
|
||||
if kind == 'class':
|
||||
text = TEMPLATE_CONTRIB
|
||||
else:
|
||||
text = spacer + '\n**Contributed Examples:**\n\n'
|
||||
text = '\n' + spacer + '**Contributed Examples:**\n\n'
|
||||
|
||||
for indx, snippet in enumerate(contrib_snippets):
|
||||
fid = open(snippet, 'rt')
|
||||
@@ -771,14 +772,19 @@ def FormatContributedSnippets(kind, contrib_snippets):
|
||||
onlyfile = os.path.split(snippet)[1]
|
||||
|
||||
text += RAW_1%(spacer, spacer)
|
||||
text += '\n' + spacer + 'Example %d - %s (:download:`download <_downloads/%s>`)::\n\n'%(indx+1, user, onlyfile)
|
||||
text += '\n' + spacer + 'Example %d - %s (:download:`download <_downloads/%s>`):\n\n'%(indx+1, user, onlyfile)
|
||||
|
||||
for line in lines[1:]:
|
||||
text += 4*' '+ spacer + line
|
||||
text += spacer + '.. literalinclude:: %s\n'%snippet
|
||||
text += spacer + ' :lines: 2-\n\n'
|
||||
|
||||
text += '\n'
|
||||
text += RAW_2%(spacer, spacer)
|
||||
|
||||
text += '\n\n%s|\n\n'%spacer
|
||||
|
||||
download = os.path.join(SPHINXROOT, '_downloads', onlyfile)
|
||||
if not os.path.isfile(download):
|
||||
shutil.copyfile(snippet, download)
|
||||
|
||||
return text
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user