From de28aa7dc037f52a774ce7d14f0e30c3bf8cae36 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 27 Jan 2011 12:12:27 +0800 Subject: [PATCH 1/4] FTP: Add 1k/2k limit to lookup. Also remove a noisy debug line --- pyfpdb/FulltiltToFpdb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 348338ba..4e9a4cc8 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -60,7 +60,8 @@ class Fulltilt(HandHistoryConverter): '400.00': ('100.00', '200.00'), '400': ('100.00', '200.00'), '500.00': ('125.00', '250.00'), '500': ('125.00', '250.00'), '800.00': ('200.00', '400.00'), '800': ('200.00', '400.00'), - '1000.00': ('250.00', '500.00'),'1000': ('250.00', '500.00') + '1000.00': ('250.00', '500.00'),'1000': ('250.00', '500.00'), + '2000.00': ('500.00', '1000.00'),'2000': ('500.00', '1000.00'), } # Static regexes @@ -351,7 +352,7 @@ class Fulltilt(HandHistoryConverter): n = self.re_SummarySitout.finditer(post) for b in n: del plist[b.group('PNAME')] - print "DEBUG: Deleting '%s' from player dict" %(b.group('PNAME')) + #print "DEBUG: Deleting '%s' from player dict" %(b.group('PNAME')) # Add remaining players for a in plist: From db3df7b42eed8ee303580c9b5fae618dc142c16e Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 27 Jan 2011 12:42:06 +0800 Subject: [PATCH 2/4] FTP: Make Summary split more careful This prevents the import from crashing on Run It Twice hand histories. --- pyfpdb/FulltiltToFpdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 4e9a4cc8..a95eaf53 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -339,7 +339,7 @@ class Fulltilt(HandHistoryConverter): def readPlayerStacks(self, hand): # Split hand text for FTP, as the regex matches the player names incorrectly # in the summary section - pre, post = hand.handText.split('SUMMARY') + pre, post = hand.handText.split('*** SUMMARY ***') m = self.re_PlayerInfo.finditer(pre) plist = {} From 25d0c36022fb0d1c188bb3320f4d63058562bfea Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 27 Jan 2011 15:58:38 +0800 Subject: [PATCH 3/4] FTP: Add additional blind levels --- pyfpdb/FulltiltToFpdb.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index a95eaf53..6d037505 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -62,6 +62,10 @@ class Fulltilt(HandHistoryConverter): '800.00': ('200.00', '400.00'), '800': ('200.00', '400.00'), '1000.00': ('250.00', '500.00'),'1000': ('250.00', '500.00'), '2000.00': ('500.00', '1000.00'),'2000': ('500.00', '1000.00'), + '3000.00': ('750.00', '1500.00'),'3000': ('750.00', '1500.00'), + '4000.00': ('1000.00', '2000.00'),'4000': ('1000.00', '2000.00'), + '5000.00': ('1250.00', '2500.00'),'5000': ('1250.00', '2500.00'), + '6000.00': ('1500.00', '3000.00'),'6000': ('1500.00', '3000.00'), } # Static regexes @@ -198,11 +202,6 @@ class Fulltilt(HandHistoryConverter): ] def determineGameType(self, handText): - # Full Tilt Poker Game #10777181585: Table Deerfly (deep 6) - $0.01/$0.02 - Pot Limit Omaha Hi - 2:24:44 ET - 2009/02/22 - # Full Tilt Poker Game #10773265574: Table Butte (6 max) - $0.01/$0.02 - Pot Limit Hold'em - 21:33:46 ET - 2009/02/21 - # Full Tilt Poker Game #9403951181: Table CR - tay - $0.05/$0.10 - No Limit Hold'em - 9:40:20 ET - 2008/12/09 - # Full Tilt Poker Game #10809877615: Table Danville - $0.50/$1 Ante $0.10 - Limit Razz - 21:47:27 ET - 2009/02/23 - # Full Tilt Poker.fr Game #23057874034: Table Douai–Lens (6 max) - €0.01/€0.02 - No Limit Hold'em - 21:59:17 CET - 2010/08/13 info = {'type':'ring'} m = self.re_GameInfo.search(handText) @@ -244,12 +243,12 @@ class Fulltilt(HandHistoryConverter): if info['limitType'] == 'fl' and info['bb'] is not None and info['type'] == 'ring': try: - info['sb'] = self.Lim_Blinds[mg['BB']][0] - info['bb'] = self.Lim_Blinds[mg['BB']][1] + info['sb'] = self.Lim_Blinds[self.clearMoneyString(mg['BB'])][0] + info['bb'] = self.Lim_Blinds[self.clearMoneyString(mg['BB'])][1] except KeyError: - log.error(_("determineGameType: Lim_Blinds has no lookup for '%s'" % mg['BB'])) + log.error(_("determineGameType: Lim_Blinds has no lookup for '%s'" % self.clearMoneyString(mg['BB']))) log.error(_("determineGameType: Raising FpdbParseError")) - raise FpdbParseError(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) + raise FpdbParseError(_("Lim_Blinds has no lookup for '%s'") % self.clearMoneyString(mg['BB'])) if mg['GAME'] is not None: (info['base'], info['category']) = games[mg['GAME']] From e26abfeb71067caddb7dc9a917f15b9851952fbc Mon Sep 17 00:00:00 2001 From: Worros Date: Sat, 29 Jan 2011 03:17:55 +0800 Subject: [PATCH 4/4] FTP: Make re_SummarySitout ungreedy The line Seat 5: evv888 (button) is sitting out Was crashing as (button) was becoming part of the player name, Made the name match ungreedy, and allowed (button) as optional. --- pyfpdb/FulltiltToFpdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 6d037505..56346673 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -105,7 +105,7 @@ class Fulltilt(HandHistoryConverter): ''' % substitutions, re.VERBOSE) re_Button = re.compile('^The button is in seat #(?P