Mercurial > hg > TextShaper
comparison textshaper/main.py @ 43:21b6a9569f21
onelineit
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Wed, 03 Sep 2014 18:13:15 -0700 |
parents | 8cf9a26b9aaa |
children |
comparison
equal
deleted
inserted
replaced
42:1a80204bd562 | 43:21b6a9569f21 |
---|---|
10 import subprocess | 10 import subprocess |
11 import sys | 11 import sys |
12 import time | 12 import time |
13 from .commands import Commands | 13 from .commands import Commands |
14 from .indent import deindent, indent | 14 from .indent import deindent, indent |
15 from .onelineit import onelineit | |
15 from .tablify import make_csv | 16 from .tablify import make_csv |
16 from .whitespace import underscore | 17 from .whitespace import underscore |
17 from which import which | 18 from which import which |
18 | 19 |
19 HR = '--' | 20 HR = '--' |
39 def add_commands(): | 40 def add_commands(): |
40 # TODO: do this dynamically | 41 # TODO: do this dynamically |
41 commands = Commands() | 42 commands = Commands() |
42 commands.add(indent, 'i') | 43 commands.add(indent, 'i') |
43 commands.add(deindent, 'd') | 44 commands.add(deindent, 'd') |
45 commands.add(onelineit, 'o') | |
44 commands.add(underscore, 'u') | 46 commands.add(underscore, 'u') |
45 commands.add(make_csv, 'c') | 47 commands.add(make_csv, 'c') |
46 return commands | 48 return commands |
47 | 49 |
48 | 50 |