Example #1
0
        yield template_footer.format(script="")

register_renderer(render_html, "html", "emits HTML",
        (('-t', '--timer', {
            'action': 'store_true',
            'dest': 'add_timer',
            'help': '''Include a javascript-based timer. Incurs some significant
                extra load time on long logs.''',
            }),
         ('-n', '--log-name', {
            'action': 'store',
            'dest': 'log_name',
            'default': 'Prettified Log',
            'help': '''Name to use for the log's title. If not provided,
            "Prettified Log" will be used.''',
            }),
         ('-dd', '--drop-date', {
            'action': 'store_false',
            'dest': 'keep_date',
            'help': '''Drop the date portion of the timestamp. This is implied
                by --drop-timestamp, so only the latter is needed if both
                effects are desired.''',
            }),
         ('-dt', '--drop-timestamp', {
            'action': 'store_false',
            'dest': 'keep_timestamp',
            'help': '''Drop the timestamp, leaving just the log text. Implies
            --drop-date.''',
            }),
        ))
Example #2
0
register_renderer(render_plaintext, "plaintext", "emits reflowed plaintext", (
    ('-1', '--single-pass', {
        'action':
        'store_true',
        'dest':
        'single_pass',
        'help':
        '''Skip
                the name-length-check pass. All names will be indented to the preset
                maximum name length. Required if operating in a pipeline.''',
    }),
    ('-m', '--max-name-length', {
        'action':
        'store',
        'type':
        int,
        'default':
        24,
        'dest':
        'max_name_length',
        'help':
        '''Maximum name length - in single-pass mode, all
                names will be indented to this length. In two-pass mode, the
                name-length-check pass will terminate prematurely if this length is
                met or exceeded, allowing the first pass time to be shortened in
                some cases.''',
    }),
    ('-w', '--output-width', {
        'action': 'store',
        'type': int,
        'default': 80,
        'dest': 'page_width',
        'help': '''Width to reflow the log to.''',
    }),
    ('-dd', '--drop-date', {
        'action':
        'store_false',
        'dest':
        'keep_date',
        'help':
        '''Drop the date portion of the timestamp. This is implied
                by --drop-timestamp, so only the latter is needed if both
                effects are desired.''',
    }),
    ('-dt', '--drop-timestamp', {
        'action':
        'store_false',
        'dest':
        'keep_timestamp',
        'help':
        '''Drop the timestamp, leaving just the log text. Implies
                --drop-date.''',
    }),
    ('-id', '--indent', {
        'action': 'store',
        'type': int,
        'default': 0,
        'dest': 'indent_depth',
        'help': '''Depth to indent continuation lines to.''',
    }),
))
Example #3
0
register_renderer(render_html, "html", "emits HTML", (
    ('-t', '--timer', {
        'action':
        'store_true',
        'dest':
        'add_timer',
        'help':
        '''Include a javascript-based timer. Incurs some significant
                extra load time on long logs.''',
    }),
    ('-n', '--log-name', {
        'action':
        'store',
        'dest':
        'log_name',
        'default':
        'Prettified Log',
        'help':
        '''Name to use for the log's title. If not provided,
            "Prettified Log" will be used.''',
    }),
    ('-dd', '--drop-date', {
        'action':
        'store_false',
        'dest':
        'keep_date',
        'help':
        '''Drop the date portion of the timestamp. This is implied
                by --drop-timestamp, so only the latter is needed if both
                effects are desired.''',
    }),
    ('-dt', '--drop-timestamp', {
        'action':
        'store_false',
        'dest':
        'keep_timestamp',
        'help':
        '''Drop the timestamp, leaving just the log text. Implies
            --drop-date.''',
    }),
))
Example #4
0
register_renderer(render_plaintext, "plaintext", "emits reflowed plaintext",
        (('-1', '--single-pass', {
            'action': 'store_true',
            'dest': 'single_pass',
            'help': '''Skip
                the name-length-check pass. All names will be indented to the preset
                maximum name length. Required if operating in a pipeline.''',
            }),
         ('-m', '--max-name-length', {
             'action': 'store',
             'type': int,
             'default': 24,
             'dest': 'max_name_length',
             'help': '''Maximum name length - in single-pass mode, all
                names will be indented to this length. In two-pass mode, the
                name-length-check pass will terminate prematurely if this length is
                met or exceeded, allowing the first pass time to be shortened in
                some cases.''',
             }),
         ('-w', '--output-width', {
             'action': 'store',
             'type': int,
             'default': 80,
             'dest': 'page_width',
             'help': '''Width to reflow the log to.''',
             }),
         ('-W', '--screen-width', {
             'action': 'store',
             'type': int,
             'default': 1,
             'dest': 'screen_width',
             'help': '''Screen width to center the log to, less than or equal to
                        output width to use that width (i.e., effectively no
                        centering), or 0 to attempt to guess the width (Python
                        3.3+ only).''',
             }),
         ('-dd', '--drop-date', {
            'action': 'store_false',
            'dest': 'keep_date',
            'help': '''Drop the date portion of the timestamp. This is implied
                by --drop-timestamp, so only the latter is needed if both
                effects are desired.''',
            }),
         ('-dt', '--drop-timestamp', {
            'action': 'store_false',
            'dest': 'keep_timestamp',
            'help': '''Drop the timestamp, leaving just the log text. Implies
                --drop-date.''',
            }),
         ('-I', '--indent', {
             'action': 'store',
             'type': int,
             'default': 0,
             'dest': 'indent_depth',
             'help': '''Depth to indent continuation lines to.''',
             }),
        ))