(pageName,
                specType=None,
                specAnchor=None,
                seeAlso=None,
                fp=None,
                auto=False,
                leveloffset=0)
Generate end boilerplate of a reference page.

    - pageName - name of the page
    - specType - None or the 'spec' attribute from the refpage block,
      identifying the specification name and URL this refpage links to.
    - specAnchor - None or the 'anchor' attribute from the refpage block,
      identifying the anchor in the specification this refpage links to. If
      None, the pageName is assumed to be a valid anchor.
    - seeAlso - text of the "See Also" section
    - fp - file to write the page to
    - auto - True if this is an entirely generated refpage, False if it is
      handwritten content from the spec.
    - leveloffset - number of levels to bias section titles up or down.
Generate end boilerplate of a reference page.
Generate end boilerplate of a reference page .
def refPageTail(pageName,
                specType=None,
                specAnchor=None,
                seeAlso=None,
                fp=None,
                auto=False,
                leveloffset=0):
    """Generate end boilerplate of a reference page.

    - pageName - name of the page
    - specType - None or the 'spec' attribute from the refpage block,
      identifying the specification name and URL this refpage links to.
    - specAnchor - None or the 'anchor' attribute from the refpage block,
      identifying the anchor in the specification this refpage links to. If
      None, the pageName is assumed to be a valid anchor.
    - seeAlso - text of the "See Also" section
    - fp - file to write the page to
    - auto - True if this is an entirely generated refpage, False if it is
      handwritten content from the spec.
    - leveloffset - number of levels to bias section titles up or down."""

    specName = conventions.api_name(specType)
    specURL = conventions.specURL(specType)
    if specAnchor is None:
        specAnchor = pageName

    if seeAlso is None:
        seeAlso = 'No cross-references are available\n'

    notes = [
        'For more information, see the {}#{}[{} Specification^]'.format(
            specURL, specAnchor, specName),
        '',
    ]

    if auto:
        notes.extend((
            'This page is a generated document.',
            'Fixes and changes should be made to the generator scripts, '
            'not directly.',
        ))
    else:
        notes.extend((
            'This page is extracted from the ' + specName + ' Specification. ',
            'Fixes and changes should be made to the Specification, '
            'not directly.',
        ))

    # Generate the section header.
    # Default depth is 2.
    depth = max(0, leveloffset + 2)
    prefix = '=' * depth

    print(f'{prefix} See Also',
          '',
          seeAlso,
          '',
          sep='\n', file=fp)

    print(f'{prefix} Document Notes',
          '',
          '\n'.join(notes),
          '',
          sep='\n', file=fp)

    printFooter(fp, leveloffset)
def refPageTail ( pageName , specType = None , specAnchor = None , seeAlso = None , fp = None , auto = False , leveloffset = 0 ) : specName = conventions . api_name ( specType ) specURL = conventions . specURL ( specType ) if specAnchor is None : specAnchor = pageName if seeAlso is None : seeAlso = 'No cross-references are available\n' notes = [ 'For more information, see the {}#{}[{} Specification^]' . format ( specURL , specAnchor , specName ) , '' , ] if auto : notes . extend ( ( 'This page is a generated document.' , 'Fixes and changes should be made to the generator scripts, ' 'not directly.' , ) ) else : notes . extend ( ( 'This page is extracted from the ' + specName + ' Specification. ' , 'Fixes and changes should be made to the Specification, ' 'not directly.' , ) ) # Generate the section header. # Default depth is 2. depth = max ( 0 , leveloffset + 2 ) prefix = '=' * depth print ( f'{prefix} See Also' , '' , seeAlso , '' , sep = '\n' , file = fp ) print ( f'{prefix} Document Notes' , '' , '\n' . join ( notes ) , '' , sep = '\n' , file = fp ) printFooter ( fp , leveloffset )