summaryrefslogtreecommitdiff
path: root/bin/tprint.py
blob: c00c48671c44ffff503ae55ab31fd2fd655f9280 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python

import argparse

from blessings import Terminal


parser = argparse.ArgumentParser(
    description='displays argument as specified style')

parser.add_argument('style', type=str, help='style formatter')
parser.add_argument('text', type=str, nargs='+')


term = Terminal()
args = parser.parse_args()

style = getattr(term, args.style)

print(style(' '.join(args.text)))