Generate header of a reference page. - pageName - string name of the page - pageDesc - string short description of the page - pageAliases - set of aliases of this page - specType - string containing 'spec' field from refpage open block, or None. Used to determine containing sp
(pageName, pageDesc, pageAliases, specText, fieldName, fieldText, descText, fp)
| 332 | |
| 333 | |
| 334 | def refPageHead(pageName, pageDesc, pageAliases, specText, fieldName, fieldText, descText, fp): |
| 335 | """Generate header of a reference page. |
| 336 | |
| 337 | - pageName - string name of the page |
| 338 | - pageDesc - string short description of the page |
| 339 | - pageAliases - set of aliases of this page |
| 340 | - specType - string containing 'spec' field from refpage open block, or None. |
| 341 | Used to determine containing spec name and URL. |
| 342 | - specText - string that goes in the "C Specification" section |
| 343 | - fieldName - string heading an additional section following specText, if not None |
| 344 | - fieldText - string that goes in the additional section |
| 345 | - descText - string that goes in the "Description" section |
| 346 | - fp - file to write to""" |
| 347 | sections = OrderedDict() |
| 348 | |
| 349 | if specText is not None: |
| 350 | sections['C Specification'] = specText |
| 351 | |
| 352 | if fieldName is not None: |
| 353 | sections[fieldName] = fieldText |
| 354 | |
| 355 | if descText is None or descText.strip() == '': |
| 356 | logWarn('refPageHead: no description provided for', pageName) |
| 357 | |
| 358 | if descText is not None: |
| 359 | sections['Description'] = descText |
| 360 | |
| 361 | refPageShell(pageName, pageDesc, pageAliases, fp, head_content=None, sections=sections) |
| 362 | |
| 363 | |
| 364 | def refPageTail(pageName, |
no test coverage detected