Unverified Commit 1fe5ebdd authored by Heewon Jeon(gogamza)'s avatar Heewon Jeon(gogamza) Committed by GitHub
Browse files

Merge pull request #5 from juliusfrost/patch-1

Allows more flexible input on command line
parents 834f726e 736e924a
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -21,7 +21,14 @@ def main(args=sys.argv[1:]):
    args = get_parser().parse_args(args)

    source = args.infile.read()
    result = '\n'.join([spacing(_) for _ in source.splitlines()])
    
    limit = 198
    result = '\n'
    for line in source.splitlines():
        while len(line) > limit:
            result += spacing(line[0:limit])
            line = line[limit:]
        result += '\n'

    if args.overwrite:
        args.infile.close()