def main():
parser = optparse.OptionParser(usage="<STR_LIT>",<EOL>version=xtuml.version.complete_string,<EOL>formatter=optparse.TitledHelpFormatter())<EOL>parser.set_description(__doc__.strip())<EOL>parser.add_option("<STR_LIT:-c>", "<STR_LIT>", dest="<STR_LIT>", metavar="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>action="<STR_LIT:store>", default=None)<EOL>parser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=False)<EOL>parser.add_option("<STR_LIT>", "<STR_LIT>", dest='<STR_LIT>', metavar="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>action="<STR_LIT:store>", default=None)<EOL>parser.add_option("<STR_LIT>", "<STR_LIT>", dest='<STR_LIT>', action="<STR_LIT:count>", <EOL>help="<STR_LIT>", default=<NUM_LIT:2>)<EOL>(opts, args) = parser.parse_args()<EOL>if len(args) == <NUM_LIT:0> or opts.output is None:<EOL><INDENT>parser.print_help()<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>levels = {<EOL><NUM_LIT:0>: logging.ERROR,<EOL><NUM_LIT:1>: logging.WARNING,<EOL><NUM_LIT:2>: logging.INFO,<EOL><NUM_LIT:3>: logging.DEBUG,<EOL>}<EOL>logging.basicConfig(level=levels.get(opts.verbosity, logging.DEBUG))<EOL>loader = ooaofooa.Loader()<EOL>for filename in args:<EOL><INDENT>loader.filename_input(filename)<EOL><DEDENT>c = loader.build_component(opts.component, opts.derived)<EOL>xtuml.persist_database(c, opts.output)<EOL>
Parse argv for options and arguments, and start schema generation.