From 5cd5ad8fa6f759cea18fdc24dc424ee88ebe17c5 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Tue, 31 Mar 2009 07:44:19 +0100 Subject: [PATCH] Fix bug I introduced that caused empty hands corresponding to splits between hands (blank lines) to be 'processed' by HHC in Everleaf, PS and FTP converters. --- pyfpdb/EverleafToFpdb.py | 3 ++- pyfpdb/FulltiltToFpdb.py | 3 ++- pyfpdb/HandHistoryConverter.py | 2 +- pyfpdb/PokerStarsToFpdb.py | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 29808295..f353bc61 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -27,7 +27,8 @@ from HandHistoryConverter import * class Everleaf(HandHistoryConverter): # Static regexes - re_SplitHands = re.compile(r"(\n\n\n+)") + re_SplitHands = re.compile(r"\n\n\n+") + re_TailSplitHands = re.compile(r"(\n\n\n+)") re_GameInfo = re.compile(ur"^(Blinds )?(?P\$| €|)(?P[.0-9]+)/(?:\$| €)?(?P[.0-9]+) (?PNL|PL|) ?(?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) #re.compile(ur"^(Blinds )?(?P\$| €|)(?P[.0-9]+)/(?:\$| €)?(?P[.0-9]+) (?PNL|PL|) (?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) re_HandInfo = re.compile(ur".*#(?P[0-9]+)\n.*\n(Blinds )?(?:\$| €|)(?P[.0-9]+)/(?:\$| €|)(?P[.0-9]+) (?P.*) - (?P\d\d\d\d/\d\d/\d\d - \d\d:\d\d:\d\d)\nTable (?P.+$)", re.MULTILINE) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index f3d30229..79d606b3 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -28,7 +28,8 @@ class Fulltilt(HandHistoryConverter): # Static regexes re_GameInfo = re.compile('- (?P\$|)?(?P[.0-9]+)/\$?(?P[.0-9]+) (Ante \$(?P[.0-9]+) )?- (?P(No Limit|Pot Limit|Limit))? (?P(Hold\'em|Omaha Hi|Razz))') - re_SplitHands = re.compile(r"(\n\n+)") + re_SplitHands = re.compile(r"\n\n+") + re_TailSplitHands = re.compile(r"(\n\n+)") re_HandInfo = re.compile('.*#(?P[0-9]+): Table (?P
[- a-zA-Z]+) (\((?P.+)\) )?- \$?(?P[.0-9]+)/\$?(?P[.0-9]+) (Ante \$(?P[.0-9]+) )?- (?P[a-zA-Z\' ]+) - (?P.*)') re_Button = re.compile('^The button is in seat #(?P
[- a-zA-Z]+)\'(?P.+?$)?", re.MULTILINE) re_Button = re.compile('Seat #(?P