From a7d450d38462e3775dfb6aabdbe2be679604e466 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 15 Sep 2010 13:23:32 +0800 Subject: [PATCH] Importer: Add command line option for FTP archive format. To import ./GuiBulkImport -F -c "Full Tilt Poker" -f filename Completely untested at the moment. --- pyfpdb/GuiBulkImport.py | 4 ++++ pyfpdb/fpdb_import.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py index 5b9e0c53..cd374545 100755 --- a/pyfpdb/GuiBulkImport.py +++ b/pyfpdb/GuiBulkImport.py @@ -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() diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index 1b770ce5..102da6fc 100755 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -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