Importer: Add command line option for FTP archive format.

To import

./GuiBulkImport -F -c "Full Tilt Poker" -f filename

Completely untested at the moment.
This commit is contained in:
Worros 2010-09-15 13:23:32 +08:00
parent 90e991dec8
commit a7d450d384
2 changed files with 8 additions and 0 deletions

View File

@ -358,6 +358,8 @@ def main(argv=None):
help=_("Print some useful one liners"))
parser.add_option("-s", "--starsarchive", action="store_true", dest="starsArchive", default=False,
help=_("Do the required conversion for Stars Archive format (ie. as provided by support"))
parser.add_option("-F", "--ftparchive", action="store_true", dest="ftpArchive", default=False,
help=_("Do the required conversion for FTP Archive format (ie. as provided by support"))
parser.add_option("-t", "--testdata", action="store_true", dest="testData", default=False,
help=_("Output the pprinted version of the HandsPlayer hash for regresion testing"))
(options, argv) = parser.parse_args(args = argv)
@ -404,6 +406,8 @@ def main(argv=None):
importer.setCallHud(False)
if options.starsArchive:
importer.setStarsArchive(True)
if options.ftpArchive:
importer.setFTPArchive(True)
if options.testData:
importer.setPrintTestData(True)
(stored, dups, partial, errs, ttime) = importer.runImport()

View File

@ -103,6 +103,7 @@ class Importer:
self.settings.setdefault("dropIndexes", "don't drop")
self.settings.setdefault("dropHudCache", "don't drop")
self.settings.setdefault("starsArchive", False)
self.settings.setdefault("ftpArchive", False)
self.settings.setdefault("testData", False)
self.settings.setdefault("cacheHHC", False)
@ -149,6 +150,9 @@ class Importer:
def setStarsArchive(self, value):
self.settings['starsArchive'] = value
def setFTPArchive(self, value):
self.settings['ftpArchive'] = value
def setPrintTestData(self, value):
self.settings['testData'] = value