From 69905a051bd7994ec821ed090798b059905dd393 Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 29 Mar 2011 18:07:39 +0800 Subject: [PATCH 1/2] Everleaf: Clean out some crufty comments --- pyfpdb/EverleafToFpdb.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index ac47e8d3..6882335e 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -96,8 +96,6 @@ class Everleaf(HandHistoryConverter): 'bigBet' 'currency' in ('USD', 'EUR', 'T$', ) or None if we fail to get the info """ - #(TODO: which parts are optional/required?) - # Blinds $0.50/$1 PL Omaha - 2008/12/07 - 21:59:48 # Blinds $0.05/$0.10 NL Hold'em - 2009/02/21 - 11:21:57 # $0.25/$0.50 7 Card Stud - 2008/12/05 - 21:43:59 @@ -169,11 +167,6 @@ or None if we fail to get the info """ # https://www.poker4ever.com/tourney/%TOURNEY_NUMBER% # Believe Everleaf time is GMT/UTC, no transation necessary - # Stars format (Nov 10 2008): 2008/11/07 12:38:49 CET [2008/11/07 7:38:49 ET] - # or : 2008/11/07 12:38:49 ET - # Not getting it in my HH files yet, so using - # 2008/11/10 3:58:52 ET - #TODO: Need some date functions to convert to different timezones (Date::Manip for perl rocked for this) hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%Y/%m/%d - %H:%M:%S") return @@ -192,9 +185,6 @@ or None if we fail to get the info """ def markStreets(self, hand): - # PREFLOP = ** Dealing down cards ** - # This re fails if, say, river is missing; then we don't get the ** that starts the river. - #m = re.search('(\*\* Dealing down cards \*\*\n)(?P.*?\n\*\*)?( Dealing Flop \*\* \[ (?P\S\S), (?P\S\S), (?P\S\S) \])?(?P.*?\*\*)?( Dealing Turn \*\* \[ (?P\S\S) \])?(?P.*?\*\*)?( Dealing River \*\* \[ (?P\S\S) \])?(?P.*)', hand.handText,re.DOTALL) if hand.gametype['base'] == 'hold': m = re.search(r"\*\* Dealing down cards \*\*(?P.+(?=\*\* Dealing Flop \*\*)|.+)" r"(\*\* Dealing Flop \*\*(?P \[ \S\S, \S\S, \S\S \].+(?=\*\* Dealing Turn \*\*)|.+))?" From 9eb0138f3d1a18de3364b5811bc4b71613b15b44 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 30 Mar 2011 11:13:03 +0800 Subject: [PATCH 2/2] THP: Make less noisy --- pyfpdb/TestHandsPlayers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyfpdb/TestHandsPlayers.py b/pyfpdb/TestHandsPlayers.py index dc7cb4a7..d6e76d38 100755 --- a/pyfpdb/TestHandsPlayers.py +++ b/pyfpdb/TestHandsPlayers.py @@ -32,6 +32,8 @@ import Options import datetime import pytz +DEBUG = False + class FpdbError: def __init__(self, sitename): @@ -172,8 +174,8 @@ def compare(leaf, importer, errors, site): # Test if this is a hand history file if filename.endswith('.txt'): # test if there is a .hp version of the file - print "Site: %s" % site - print "Filename: %s" % filename + if DEBUG: print "Site: %s" % site + if DEBUG: print "Filename: %s" % filename importer.addBulkImportImportFileOrDir(filename, site=site) (stored, dups, partial, errs, ttime) = importer.runImport()