From 857c7f524d808c2246c0ddf2738b279decc9398f Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 14 Feb 2010 23:54:19 +0800 Subject: [PATCH] PokerStarsToFpdb - regex fix for actions sqlcoder had a hh file containing "playername: folds " - ie with a space on the end. --- pyfpdb/PokerStarsToFpdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 90a8bfd0..21246b12 100755 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -101,7 +101,7 @@ class PokerStars(HandHistoryConverter): self.re_PostBoth = re.compile(r"^%(PLYR)s: posts small \& big blinds %(CUR)s(?P[.0-9]+)" % subst, re.MULTILINE) self.re_HeroCards = re.compile(r"^Dealt to %(PLYR)s(?: \[(?P.+?)\])?( \[(?P.+?)\])" % subst, re.MULTILINE) self.re_Action = re.compile(r""" - ^%(PLYR)s:(?P\sbets|\schecks|\sraises|\scalls|\sfolds|\sdiscards|\sstands\spat) + ^%(PLYR)s:(?P\sbets|\schecks|\sraises|\scalls|\sfolds|\sdiscards|\sstands\spat)\s? (\s(%(CUR)s)?(?P[.\d]+))?(\sto\s%(CUR)s(?P[.\d]+))? # the number discarded goes in (\scards?(\s\[(?P.+?)\])?)?$""" % subst, re.MULTILINE|re.VERBOSE) @@ -336,6 +336,7 @@ class PokerStars(HandHistoryConverter): m = self.re_Action.finditer(hand.streets[street]) for action in m: acts = action.groupdict() + #print "DEBUG: acts: %s" %acts if action.group('ATYPE') == ' raises': hand.addRaiseBy( street, action.group('PNAME'), action.group('BET') ) elif action.group('ATYPE') == ' calls':