add -x command line option to specify converter

usage:
./GuiBulkImport -q -f lala.txt -x EverleafToFpdb
This commit is contained in:
Matt Turnbull 2009-03-15 16:50:59 +00:00
parent 51444f2ac4
commit cfbdff5159

View File

@ -213,7 +213,7 @@ if __name__ == '__main__':
parser = OptionParser() parser = OptionParser()
parser.add_option("-f", "--file", dest="filename", help="Input file in quiet mode", metavar="FILE") parser.add_option("-f", "--file", dest="filename", help="Input file in quiet mode", metavar="FILE")
parser.add_option("-q", "--quiet", action="store_false", dest="gui", default=True, help="don't start gui") parser.add_option("-q", "--quiet", action="store_false", dest="gui", default=True, help="don't start gui")
parser.add_option("-x", "--convert", dest="filtername", help="Conversion filter", default="passthrough")
(options, sys.argv) = parser.parse_args() (options, sys.argv) = parser.parse_args()
config = Configuration.Config() config = Configuration.Config()
@ -240,7 +240,7 @@ if __name__ == '__main__':
importer = fpdb_import.Importer(False,settings, config) importer = fpdb_import.Importer(False,settings, config)
importer.setDropIndexes("auto") importer.setDropIndexes("auto")
importer.setFailOnError(True) importer.setFailOnError(True)
importer.addImportFile(options.filename) importer.addImportFile(options.filename, filter=options.filtername)
importer.setCallHud(False) importer.setCallHud(False)
importer.runImport() importer.runImport()
importer.clearFileList() importer.clearFileList()