File: core.py

package info (click to toggle)
python-click-plugins 1.1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 204 kB
  • sloc: python: 308; makefile: 8
file content (19 lines) | stat: -rw-r--r-- 335 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
Add bold styling to `printit`
"""


import click


@click.command()
@click.argument('infile', type=click.File('r'), default='-')
@click.argument('outfile', type=click.File('w'), default='-')
def bold(infile, outfile):

    """
    Make text bold.
    """

    for line in infile:
        click.secho(line, bold=True, file=outfile)