def main(): options = get_options() # get attributes attrFinder = xml2csv.AttrFinder(options.xsd, options.source, False) base = os.path.basename(options.xsd).split('.')[0] # generate proto format description module = xml2protobuf.generateProto(attrFinder.tagAttrs, attrFinder.depthTags, attrFinder.xsdStruc._namedEnumerations, options.protodir, base) writeXml(attrFinder.xsdStruc.root.name, module, options)