def main(argv=sys.argv[<NUM_LIT:1>:]):
args = docopt(__doc__, argv=argv,<EOL>version=pkg_resources.require('<STR_LIT>')[<NUM_LIT:0>].version)<EOL>level = logging.ERROR<EOL>if args['<STR_LIT>']:<EOL><INDENT>level = logging.INFO<EOL><DEDENT>if args['<STR_LIT>'] == <NUM_LIT:2>:<EOL><INDENT>level = logging.DEBUG<EOL><DEDENT>logging.basicConfig(level=level)<EOL>log = logging.getLogger(__name__)<EOL>log.info("<STR_LIT>")<EOL>latitude = float(args['<STR_LIT>'])<EOL>longitude = float(args['<STR_LIT>'])<EOL>timeframe = int(args['<STR_LIT>'])<EOL>usexml = False<EOL>if args['<STR_LIT>']:<EOL><INDENT>usexml = True<EOL><DEDENT>result = get_data(latitude, longitude, usexml)<EOL>if result[SUCCESS]:<EOL><INDENT>log.debug("<STR_LIT>", result)<EOL>result = parse_data(result[CONTENT], result[RAINCONTENT],<EOL>latitude, longitude, timeframe, usexml)<EOL>log.info("<STR_LIT>", result)<EOL>print(result)<EOL><DEDENT>else:<EOL><INDENT>log.error("<STR_LIT>",<EOL>result[MESSAGE])<EOL><DEDENT>
Parse argument and start main program.