def main():
global DEBUG<EOL>argd = docopt(USAGESTR, version=VERSIONSTR, script=SCRIPT)<EOL>DEBUG = argd['<STR_LIT>']<EOL>width = parse_int(argd['<STR_LIT>'] or DEFAULT_WIDTH) or <NUM_LIT:1><EOL>indent = parse_int(argd['<STR_LIT>'] or (argd['<STR_LIT>'] or <NUM_LIT:0>))<EOL>prepend = '<STR_LIT:U+0020>' * (indent * <NUM_LIT:4>)<EOL>if prepend and argd['<STR_LIT>']:<EOL><INDENT>width -= len(prepend)<EOL><DEDENT>userprepend = argd['<STR_LIT>'] or (argd['<STR_LIT>'] or '<STR_LIT>')<EOL>prepend = '<STR_LIT>'.join((prepend, userprepend))<EOL>if argd['<STR_LIT>']:<EOL><INDENT>width -= len(userprepend)<EOL><DEDENT>userappend = argd['<STR_LIT>'] or (argd['<STR_LIT>'] or '<STR_LIT>')<EOL>if argd['<STR_LIT>']:<EOL><INDENT>width -= len(userappend)<EOL><DEDENT>if argd['<STR_LIT>']:<EOL><INDENT>argd['<STR_LIT>'] = (<EOL>(try_read_file(w) if len(w) < <NUM_LIT> else w)<EOL>for w in argd['<STR_LIT>']<EOL>)<EOL>words = '<STR_LIT:U+0020>'.join((w for w in argd['<STR_LIT>'] if w))<EOL><DEDENT>else:<EOL><INDENT>words = read_stdin()<EOL><DEDENT>block = FormatBlock(words).iter_format_block(<EOL>chars=argd['<STR_LIT>'],<EOL>fill=argd['<STR_LIT>'],<EOL>prepend=prepend,<EOL>strip_first=argd['<STR_LIT>'],<EOL>append=userappend,<EOL>strip_last=argd['<STR_LIT>'],<EOL>width=width,<EOL>newlines=argd['<STR_LIT>'],<EOL>lstrip=argd['<STR_LIT>'],<EOL>)<EOL>for i, line in enumerate(block):<EOL><INDENT>if argd['<STR_LIT>']:<EOL><INDENT>print('<STR_LIT>'.format(i + <NUM_LIT:1>, line))<EOL><DEDENT>else:<EOL><INDENT>print(line)<EOL><DEDENT><DEDENT>return <NUM_LIT:0><EOL>
Main entry point, expects doctopt arg dict as argd.