From d4400b9f48acc83b231229ee976af95256cef617 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 2 Sep 2010 00:40:36 +0800 Subject: [PATCH] Stars: add part support for NL Single Draw --- pyfpdb/PokerStarsToFpdb.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 4fbe9dfd..98abcaf0 100644 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -83,6 +83,7 @@ class PokerStars(HandHistoryConverter): '7 Card Stud Hi/Lo' : ('stud','studhilo'), 'Badugi' : ('draw','badugi'), 'Triple Draw 2-7 Lowball' : ('draw','27_3draw'), + 'Single Draw 2-7 Lowball' : ('draw','27_1draw'), '5 Card Draw' : ('draw','fivedraw') } currencies = { u'€':'EUR', '$':'USD', '':'T$' } @@ -96,7 +97,7 @@ class PokerStars(HandHistoryConverter): (?P(?P[%(LS)s\d\.]+)?\+?(?P[%(LS)s\d\.]+)?\+?(?P[%(LS)s\d\.]+)?\s?(?P%(LEGAL_ISO)s)?|Freeroll)\s+)? # close paren of tournament info (?PHORSE|8\-Game|HOSE|Mixed PLH/PLO)?\s?\(? - (?PHold\'em|Razz|RAZZ|7\sCard\sStud|7\sCard\sStud\sHi/Lo|Omaha|Omaha\sHi/Lo|Badugi|Triple\sDraw\s2\-7\sLowball|5\sCard\sDraw)\s + (?PHold\'em|Razz|RAZZ|7\sCard\sStud|7\sCard\sStud\sHi/Lo|Omaha|Omaha\sHi/Lo|Badugi|Triple\sDraw\s2\-7\sLowball|Single\sDraw\s2\-7\sLowball|5\sCard\sDraw)\s (?PNo\sLimit|Limit|LIMIT|Pot\sLimit)\)?,?\s (-\s)? (Match.*)? #TODO: waiting for reply from user as to what this means @@ -169,6 +170,7 @@ class PokerStars(HandHistoryConverter): ["ring", "stud", "fl"], ["ring", "draw", "fl"], + ["ring", "draw", "nl"], ["tour", "hold", "nl"], ["tour", "hold", "pl"], @@ -178,10 +180,6 @@ class PokerStars(HandHistoryConverter): ] def determineGameType(self, handText): -# inspect the handText and return the gametype dict -# gametype dict is: -# {'limitType': xxx, 'base': xxx, 'category': xxx} - info = {} m = self.re_GameInfo.search(handText) if not m: @@ -191,10 +189,6 @@ class PokerStars(HandHistoryConverter): raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() -# I don't think this is doing what we think. mg will always have all -# the expected keys, but the ones that didn't match in the regex will -# have a value of None. It is OK if it throws an exception when it -# runs across an unknown game or limit or whatever. if 'LIMIT' in mg: info['limitType'] = self.limits[mg['LIMIT']] if 'GAME' in mg: