scripts/man.py
def format_bi(op):
        """Format an op dictionary into a .BI line for troff"""
        line = '.BI '
        if op['short_op'] is not None:
            line += '-' + op['short_op'] + '/'
        line += '--' + op['long_op']
        if op['has_arg'] != 'NULL':
            if op['has_arg'] == 'no_argument':
                markers = ['', '']
            elif op['has_arg'] == 'required_argument':
                markers = ['<', '>']
            elif op['has_arg'] == 'optional_argument':
                markers = ['[', ']']
            else:
                markers = ['', '']

            line += ' " {}{}{}"'.format(
                markers[0],
                op['long_op'].replace('-', '_'),
                markers[1],
            )
        return line
Format an op dictionary into a .BI line for troff
Format an op dictionary into a .BI line for troff
Format an op dictionary into a . BI line for troff
def format_bi(op):
        line = '.BI '
        if op['short_op'] is not None:
            line += '-' + op['short_op'] + '/'
        line += '--' + op['long_op']
        if op['has_arg'] != 'NULL':
            if op['has_arg'] == 'no_argument':
                markers = ['', '']
            elif op['has_arg'] == 'required_argument':
                markers = ['<', '>']
            elif op['has_arg'] == 'optional_argument':
                markers = ['[', ']']
            else:
                markers = ['', '']
            line += ' " {}{}{}"'.format(
                markers[0],
                op['long_op'].replace('-', '_'),
                markers[1],
            )
        return line
def format_bi ( op ) : line = '.BI ' if op [ 'short_op' ] is not None : line += '-' + op [ 'short_op' ] + '/' line += '--' + op [ 'long_op' ] if op [ 'has_arg' ] != 'NULL' : if op [ 'has_arg' ] == 'no_argument' : markers = [ '' , '' ] elif op [ 'has_arg' ] == 'required_argument' : markers = [ '<' , '>' ] elif op [ 'has_arg' ] == 'optional_argument' : markers = [ '[' , ']' ] else : markers = [ '' , '' ] line += ' " {}{}{}"' . format ( markers [ 0 ] , op [ 'long_op' ] . replace ( '-' , '_' ) , markers [ 1 ] , ) return line
Format an op dictionary into a .BI line for troff
Format an op dictionary into a . BI line for troff
"""Format an op dictionary into a .BI line for troff"""
op