From fbcf987d97ee713c7ce93289e39117547c8da89f Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 19 Aug 2010 18:29:10 +0800 Subject: [PATCH] BulkImport: Add command line option to generate test data --- pyfpdb/GuiBulkImport.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py index 9b88a12f..72e5e463 100755 --- a/pyfpdb/GuiBulkImport.py +++ b/pyfpdb/GuiBulkImport.py @@ -356,6 +356,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("-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) if options.usage == True: @@ -401,6 +403,8 @@ def main(argv=None): importer.setCallHud(False) if options.starsArchive: importer.setStarsArchive(True) + if options.testData: + importer.setPrintTestData(True) (stored, dups, partial, errs, ttime) = importer.runImport() importer.clearFileList() print _('GuiBulkImport done: Stored: %d \tDuplicates: %d \tPartial: %d \tErrors: %d in %s seconds - %.0f/sec')\