4 import parser as parsermodule
6 parser = parsermodule.getParser()
7 parser.set_defaults(filename=None)
8 parser.add_option("-i", "--idb", dest="input", metavar="dbname",
9 help="Provide the input dbname to convert")
10 parser.add_option("-o", "--odb", dest="output", metavar="dbname",
11 help="Provide the output dbname to save to")
12 config = parsermodule.parse_args(parser)
14 if config.input is None:
15 print "please provide a pickle file to convert"
18 if config.output is None:
19 # just use the input name.
20 config.output = config.input
22 data = database.dbLoad(config.input)
23 database.dbDump(config.output, data, 'php')