if __name__ == "__main__": app = QApplication(sys.argv) opts, args = getopt.gnu_getopt( sys.argv[1:], "s:x:c:p:d:", ['schema=', 'style=', 'catalogs=' 'pp=', 'dsi=']) for o, a in opts: if o in ('-s', '--schema'): xsd = a.strip(' "\'') elif o in ('-x', '--style'): xslt = a.strip(' "\'') elif o in ('-c', '--catalogs'): catalogs = a.strip(' "\'') elif o in ('-p', '--pp'): propFile = a.strip(' "\'') elif o in ('-d', '--dsi'): dsiFile = a.strip(' "\'') if propFile and dsiFile: pp = PropertyNode.read_property_tree(propFile) dsi = PropertyNode.read_property_tree(dsiFile) sernaDoc = SernaDoc.SernaDoc(dsi) publishingPlugin = PublishingPlugin(sernaDoc, pp) publishingPlugin.executeUiEvent("PublishCommandEvent", None) sys.exit(0)