From d36d8f4249cf445d7cc3f64b8d0cd2a52fd697c5 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 1 Oct 2009 10:49:59 +0800 Subject: [PATCH 1/3] From 7d5a3e81a5d41298ab1fa4d57bef25862a167350 Mon Sep 17 00:00:00 2001 From: lucktard Date: Wed, 30 Sep 2009 12:16:06 -0500 Subject: [PATCH] Detect and import capped 6 max hands on FullTilt and From b35d23aba38935406cf1522ae07a49cd441318b3 Mon Sep 17 00:00:00 2001 From: lucktard Date: Wed, 30 Sep 2009 12:21:34 -0500 Subject: [PATCH] Detect deep 6 max tables for HUD on FT --- pyfpdb/FulltiltToFpdb.py | 8 +++++++- pyfpdb/Tables.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 pyfpdb/FulltiltToFpdb.py diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py old mode 100644 new mode 100755 index a74d71d3..5ce0a5c8 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -40,6 +40,7 @@ class Fulltilt(HandHistoryConverter): (?P[.0-9]+)/ \$?(?P[.0-9]+)\s (Ante\s\$?(?P[.0-9]+)\s)?-\s + \$?(?P[.0-9]+\sCap\s)? (?P(No\sLimit|Pot\sLimit|Limit))?\s (?P(Hold\'em|Omaha\sHi|Omaha\sH/L|7\sCard\sStud|Stud\sH/L|Razz|Stud\sHi)) ''', re.VERBOSE) @@ -52,6 +53,7 @@ class Fulltilt(HandHistoryConverter): (?P[-\s\da-zA-Z]+)\s (\((?P.+)\)\s)?-\s \$?(?P[.0-9]+)/\$?(?P[.0-9]+)\s(Ante\s\$?(?P[.0-9]+)\s)?-\s + \$?(?P[.0-9]+\sCap\s)? (?P[a-zA-Z\/\'\s]+)\s-\s (?P\d+:\d+:\d+\s\w+\s-\s\d+/\d+/\d+)\s? (?P\(partial\))?\n @@ -143,6 +145,7 @@ class Fulltilt(HandHistoryConverter): return [["ring", "hold", "nl"], ["ring", "hold", "pl"], ["ring", "hold", "fl"], + ["ring", "hold", "cn"], ["ring", "stud", "fl"], @@ -175,7 +178,10 @@ class Fulltilt(HandHistoryConverter): 'Stud H/L' : ('stud','studhilo') } currencies = { u' €':'EUR', '$':'USD', '':'T$' } - info['limitType'] = limits[mg['LIMIT']] + if mg['CAP']: + info['limitType'] = 'cn' + else: + info['limitType'] = limits[mg['LIMIT']] info['sb'] = mg['SB'] info['bb'] = mg['BB'] if mg['GAME'] != None: diff --git a/pyfpdb/Tables.py b/pyfpdb/Tables.py index 6bc9e57d..d9efff6a 100755 --- a/pyfpdb/Tables.py +++ b/pyfpdb/Tables.py @@ -376,7 +376,7 @@ def clean_title(name): """Clean the little info strings from the table name.""" # these strings could go in a config file for pattern in [' \(6 max\)', ' \(heads up\)', ' \(deep\)', - ' \(deep hu\)', ' \(deep 6\)', ' \(2\)', + ' \(deep hu\)', ' \(deep 6\)', '\(6 max, deep\)', ' \(2\)', ' \(edu\)', ' \(edu, 6 max\)', ' \(6\)', ' \(speed\)', 'special', 'newVPP', ' no all-in', ' fast', ',', ' 50BB min', '50bb min', '\s+$']: From b0037e545ad27f1e3a26762eea88b01644aec198 Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Thu, 1 Oct 2009 21:40:14 +0100 Subject: [PATCH 2/3] improve stats menu on hud --- pyfpdb/Hud.py | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index cc8994b5..ec2b09cb 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -152,38 +152,32 @@ class Hud: aggitem.set_submenu(self.aggMenu) # set agg_bb_mult to 1 to stop aggregation item = gtk.CheckMenuItem('For This Blind Level Only') - item.ms = 1 self.aggMenu.append(item) - item.connect("activate", self.set_aggregation) - setattr(self, 'showStatsMenuItem1', item) + item.connect("activate", self.set_aggregation, 1) + setattr(self, 'aggBBmultItem1', item) # item = gtk.MenuItem('For Multiple Blind Levels:') self.aggMenu.append(item) - setattr(self, 'showStatsMenuItem2', item) # item = gtk.CheckMenuItem(' 0.5 to 2.0 x Current Blinds') - item.ms = 2 self.aggMenu.append(item) - item.connect("activate", self.set_aggregation) - setattr(self, 'showStatsMenuItem3', item) + item.connect("activate", self.set_aggregation, 2) + setattr(self, 'aggBBmultItem2', item) # item = gtk.CheckMenuItem(' 0.33 to 3.0 x Current Blinds') - item.ms = 3 self.aggMenu.append(item) - item.connect("activate", self.set_aggregation) - setattr(self, 'showStatsMenuItem4', item) + item.connect("activate", self.set_aggregation, 3) + setattr(self, 'aggBBmultItem3', item) # item = gtk.CheckMenuItem(' 0.1 to 10 x Current Blinds') - item.ms = 10 self.aggMenu.append(item) - item.connect("activate", self.set_aggregation) - setattr(self, 'showStatsMenuItem5', item) + item.connect("activate", self.set_aggregation, 10) + setattr(self, 'aggBBmultItem10', item) # item = gtk.CheckMenuItem(' All Levels') - item.ms = 10000 self.aggMenu.append(item) - item.connect("activate", self.set_aggregation) - setattr(self, 'showStatsMenuItem6', item) + item.connect("activate", self.set_aggregation, 10000) + setattr(self, 'aggBBmultItemAll', item) # item = gtk.MenuItem('For Hero:') self.aggMenu.append(item) @@ -203,12 +197,24 @@ class Hud: self.aggMenu.append(item) item.connect("activate", self.set_hud_style, 'HT') setattr(self, 'HTStyleOption', item) + + # set active on current options: + if self.hud_params['agg_bb_mult'] == 1: + getattr(self, 'aggBBmultItem1').set_active(True) + elif self.hud_params['agg_bb_mult'] == 2: + getattr(self, 'aggBBmultItem2').set_active(True) + elif self.hud_params['agg_bb_mult'] == 3: + getattr(self, 'aggBBmultItem3').set_active(True) + elif self.hud_params['agg_bb_mult'] == 10: + getattr(self, 'aggBBmultItem10').set_active(True) + elif self.hud_params['agg_bb_mult'] > 9000: + getattr(self, 'aggBBmultItemAll').set_active(True) if self.hud_params['h_hud_style'] == 'A': - item.set_active(True) - if self.hud_params['h_hud_style'] == 'S': - item.set_active(True) - if self.hud_params['h_hud_style'] == 'T': - item.set_active(True) + getattr(self, 'HAStyleOption').set_active(True) + elif self.hud_params['h_hud_style'] == 'S': + getattr(self, 'HSStyleOption').set_active(True) + elif self.hud_params['h_hud_style'] == 'T': + getattr(self, 'HTStyleOption').set_active(True) eventbox.connect_object("button-press-event", self.on_button_press, menu) From 61f384a8864ec844505e1f41e6f287bb3a4d5a31 Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Thu, 1 Oct 2009 23:16:20 +0100 Subject: [PATCH 3/3] improve stats menu in HUD some more --- pyfpdb/Hud.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index ec2b09cb..2c83ccd0 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -177,7 +177,7 @@ class Hud: item = gtk.CheckMenuItem(' All Levels') self.aggMenu.append(item) item.connect("activate", self.set_aggregation, 10000) - setattr(self, 'aggBBmultItemAll', item) + setattr(self, 'aggBBmultItem10000', item) # item = gtk.MenuItem('For Hero:') self.aggMenu.append(item) @@ -253,14 +253,21 @@ class Hud: print "Exception:",str(e) pass - def set_aggregation(self, widget): + def set_aggregation(self, widget, val): # try setting these to true all the time, and set the multiplier to 1 to turn agg off: self.hud_params['aggregate_ring'] = True self.hud_params['aggregate_tour'] = True + self.hud_params['h_aggregate_ring'] = True + self.hud_params['h_aggregate_tour'] = True - if self.hud_params['agg_bb_mult'] != widget.ms: - print 'set_aggregation', widget.ms - self.hud_params['agg_bb_mult'] = widget.ms + if self.hud_params['agg_bb_mult'] != val \ + and getattr(self, 'aggBBmultItem'+str(val)).get_active(): + print 'set_aggregation', val + self.hud_params['agg_bb_mult'] = val + self.hud_params['h_agg_bb_mult'] = val + for mult in ('1', '2', '3', '10', '10000'): + if mult != str(val): + getattr(self, 'aggBBmultItem'+mult).set_active(False) def set_hud_style(self, widget, val): # try setting these to true all the time, and set the multiplier to 1 to turn agg off: