MCPcopy
hub / github.com/KhronosGroup/Vulkan-Docs / printFooter

Function printFooter

scripts/genRef.py:125–148  ·  view source on GitHub ↗

Print footer material at the end of each refpage on open file fp. If generating separate refpages, adds the copyright. If generating the single combined refpage, just add a separator. - leveloffset - number of levels to bias section titles up or down.

(fp, leveloffset=0)

Source from the content-addressed store, hash-verified

123
124
125def printFooter(fp, leveloffset=0):
126 """Print footer material at the end of each refpage on open file fp.
127
128 If generating separate refpages, adds the copyright.
129 If generating the single combined refpage, just add a separator.
130
131 - leveloffset - number of levels to bias section titles up or down."""
132
133 # Generate the section header.
134 # Default depth is 2.
135 depth = max(0, leveloffset + 2)
136 prefix = '=' * depth
137
138 print('ifdef::doctype-manpage[]',
139 f'{prefix} Copyright',
140 '',
141 f'include::{{config}}/copyright-ccby{conventions.file_suffix}[]',
142 'endif::doctype-manpage[]',
143 '',
144 'ifndef::doctype-manpage[]',
145 '<<<',
146 'endif::doctype-manpage[]',
147 '',
148 sep='\n', file=fp)
149
150
151def macroPrefix(name, rewriteAlias = True):

Callers 1

refPageTailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected