def main():
config = Config()<EOL>defaults = vars(config)<EOL>defaults['<STR_LIT>'] = None<EOL>defaults['<STR_LIT>'] = '<STR_LIT:->'<EOL>defaults['<STR_LIT>'] = None<EOL>defaults['<STR_LIT>'] = False<EOL>options, remainingArgs = get_option_parser(defaults).parse_args()<EOL>for key in vars(options):<EOL><INDENT>if hasattr(config, key):<EOL><INDENT>setattr(config, key, getattr(options, key))<EOL><DEDENT><DEDENT>logformat = '<STR_LIT>'<EOL>loglevel = logging.INFO<EOL>if options.debug:<EOL><INDENT>loglevel = logging.DEBUG<EOL><DEDENT>if options.log:<EOL><INDENT>logging.basicConfig(filename=options.log,<EOL>format=logformat, level=loglevel)<EOL><DEDENT>else:<EOL><INDENT>logging.basicConfig(format=logformat, level=loglevel)<EOL><DEDENT>output = options.output<EOL>to_format = options.to_format<EOL>if options.config is not None:<EOL><INDENT>config.read_and_parse_config_file(options.config)<EOL>options, remainingArgs = get_option_parser(vars(config)).parse_args()<EOL>for key in vars(options):<EOL><INDENT>if hasattr(config, key):<EOL><INDENT>setattr(config, key, getattr(options, key))<EOL><DEDENT><DEDENT><DEDENT>if remainingArgs:<EOL><INDENT>inputfiles = remainingArgs<EOL><DEDENT>else:<EOL><INDENT>inputfiles = ['<STR_LIT:->']<EOL><DEDENT>voc = skosify(*inputfiles, **vars(config))<EOL>write_rdf(voc, output, to_format)<EOL>
Read command line parameters and make a transform based on them.