Mercurial > hg > TextShaper
diff textshaper/indent.py @ 34:88a69d587326
round1 of commands
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 02 Mar 2014 15:33:07 -0800 |
parents | 23616399f36c |
children |
line wrap: on
line diff
--- a/textshaper/indent.py Sun Feb 23 16:48:09 2014 -0800 +++ b/textshaper/indent.py Sun Mar 02 15:33:07 2014 -0800 @@ -43,6 +43,12 @@ return retval +@lines +def deindent(text): + """strip lines""" + return [line.strip() for line in text] + +### CLI def add_arguments(parser): parser.add_argument('infile', nargs='?', type=argparse.FileType('r'), @@ -52,6 +58,7 @@ def main(args=sys.argv[1:]): + """CLI""" # parse command line description = """indent files or stdin if no files given"""