def main(argv=sys.argv[<NUM_LIT:1>:]):
parser = setup_argparse()<EOL>args = parser.parse_args(argv)<EOL>if args.gendochelp:<EOL><INDENT>sys.argv[<NUM_LIT:0>] = '<STR_LIT>'<EOL>genparser = gendoc.setup_parser()<EOL>genparser.print_help()<EOL>sys.exit(<NUM_LIT:0>)<EOL><DEDENT>print('<STR_LIT>')<EOL>print('<STR_LIT:=>'*<NUM_LIT>)<EOL>for odir in args.output:<EOL><INDENT>prepare_dir(odir, not args.nodelete)<EOL><DEDENT>print('<STR_LIT>')<EOL>print('<STR_LIT:=>'*<NUM_LIT>)<EOL>for i, idir in enumerate(args.input):<EOL><INDENT>if i >= len(args.output):<EOL><INDENT>odir = args.output[-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>odir = args.output[i]<EOL><DEDENT>run_gendoc(idir, odir, args.gendocargs)<EOL><DEDENT>
Parse commandline arguments and run the tool

    :param argv: the commandline arguments.
    :type argv: list
    :returns: None
    :rtype: None
    :raises: None