From b4a08af2b1ec56be83280ad12d4359c645b3d0b3 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Sun, 22 Aug 2010 13:09:26 +0300 Subject: [PATCH 1/6] Remove trailing percent symbols from HUD values The values that are displayed in the HUD box included the '%' symbol if these values were percentages. This clutters the HUD for those who don't need such extra characters. This patch removes the trailing '%' from result[1]. The default formatting for HUD values is '%3.1f' and if decimal places need to be changed, the code for those is now simpler. A user who wishes to show a percent symbol after any given stat value, can edit HUD_config.xml and assign such stats the hudsuffix="%" attribute. This patch also changes the way the tooltip strings are constructed. Instead of appending the percent symbol to generated string, the '%' is now generated in place by the format-string stanza '%%'. --- pyfpdb/Stats.py | 457 +++++++++++++++++++++++------------------------- 1 file changed, 221 insertions(+), 236 deletions(-) diff --git a/pyfpdb/Stats.py b/pyfpdb/Stats.py index ffb1e47e..22900da8 100755 --- a/pyfpdb/Stats.py +++ b/pyfpdb/Stats.py @@ -78,7 +78,6 @@ log = logging.getLogger("db") re_Places = re.compile("_[0-9]$") -re_Percent = re.compile("%$") # String manipulation import codecs @@ -88,35 +87,21 @@ def do_tip(widget, tip): _tip = Charset.to_utf8(tip) widget.set_tooltip_text(_tip) + def do_stat(stat_dict, player = 24, stat = 'vpip'): match = re_Places.search(stat) - if match is None: - result = eval("%(stat)s(stat_dict, %(player)d)" % {'stat': stat, 'player': player}) - else: + result = eval("%(stat)s(stat_dict, %(player)d)" % {'stat': stat, 'player': player}) + + # If decimal places have been defined, override result[1] + if match: base = stat[0:-2] places = int(stat[-1:]) - result = (0.0, '0.0', 'notset=0', 'notset=0', '0', 'not set') - try: - result = eval("%(stat)s(stat_dict, %(player)d)" % {'stat': base, 'player': player}) - except: - pass # - log.info(_("exception getting stat %s for player %s %s") % (base, str(player), str(sys.exc_info()))) - log.debug(_("Stats.do_stat result = %s") % str(result) ) - - match = re_Percent.search(result[1]) - try: - if match is None: - result = (result[0], "%.*f" % (places, result[0]), result[2], result[3], result[4], result[5]) - else: - result = (result[0], "%.*f%%" % (places, 100*result[0]), result[2], result[3], result[4], result[5]) - except: - log.info(_("error: %s") % str(sys.exc_info())) - raise + result[1] = '%.*f' % (places, 100.0*result[0]) return result # OK, for reference the tuple returned by the stat is: # 0 - The stat, raw, no formating, eg 0.33333333 -# 1 - formatted stat with appropriate precision and punctuation, eg 33% +# 1 - formatted stat with appropriate precision, eg. 33; shown in HUD # 2 - formatted stat with appropriate precision, punctuation and a hint, eg v=33% # 3 - same as #2 except name of stat instead of hint, eg vpip=33% # 4 - the calculation that got the stat, eg 9/27 @@ -147,17 +132,17 @@ def vpip(stat_dict, player): try: stat = float(stat_dict[player]['vpip'])/float(stat_dict[player]['n']) return (stat, - '%3.1f' % (100*stat) + '%', - 'v=%3.1f' % (100*stat) + '%', - 'vpip=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['vpip'], stat_dict[player]['n']), + '%3.1f' % (100.0*stat), + 'v=%3.1f%%' % (100.0*stat), + 'vpip=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['vpip'], stat_dict[player]['n']), _('Voluntarily Put In Pot Pre-Flop%') ) except: return (stat, - '%3.1f' % (0) + '%', - 'v=%3.1f' % (0) + '%', - 'vpip=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'v=%3.1f%%' % (0), + 'vpip=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('Voluntarily Put In Pot Pre-Flop%') ) @@ -167,18 +152,18 @@ def pfr(stat_dict, player): try: stat = float(stat_dict[player]['pfr'])/float(stat_dict[player]['n']) return (stat, - '%3.1f' % (100*stat) + '%', - 'p=%3.1f' % (100*stat) + '%', - 'pfr=%3.1f' % (100*stat) + '%', + '%3.1f' % (100.0*stat), + 'p=%3.1f%%' % (100.0*stat), + 'pfr=%3.1f%%' % (100.0*stat), '(%d/%d)' % (stat_dict[player]['pfr'], stat_dict[player]['n']), _('Pre-Flop Raise %') ) except: return (stat, - '%3.1f' % (0) + '%', - 'p=%3.1f' % (0) + '%', - 'pfr=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'p=%3.1f%%' % (0), + 'pfr=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('Pre-Flop Raise %') ) @@ -188,18 +173,18 @@ def wtsd(stat_dict, player): try: stat = float(stat_dict[player]['sd'])/float(stat_dict[player]['saw_f']) return (stat, - '%3.1f' % (100*stat) + '%', - 'w=%3.1f' % (100*stat) + '%', - 'wtsd=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['sd'], stat_dict[player]['saw_f']), + '%3.1f' % (100.0*stat), + 'w=%3.1f%%' % (100.0*stat), + 'wtsd=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['sd'], stat_dict[player]['saw_f']), _('% went to showdown') ) except: return (stat, - '%3.1f' % (0) + '%', - 'w=%3.1f' % (0) + '%', - 'wtsd=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'w=%3.1f%%' % (0), + 'wtsd=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% went to showdown') ) @@ -209,18 +194,18 @@ def wmsd(stat_dict, player): try: stat = float(stat_dict[player]['wmsd'])/float(stat_dict[player]['sd']) return (stat, - '%3.1f' % (100*stat) + '%', - 'w=%3.1f' % (100*stat) + '%', - 'wmsd=%3.1f' % (100*stat) + '%', + '%3.1f' % (100.0*stat), + 'w=%3.1f%%' % (100.0*stat), + 'wmsd=%3.1f%%' % (100.0*stat), '(%5.1f/%d)' % (float(stat_dict[player]['wmsd']), stat_dict[player]['sd']), _('% won money at showdown') ) except: return (stat, - '%3.1f' % (0) + '%', - 'w=%3.1f' % (0) + '%', - 'wmsd=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'w=%3.1f%%' % (0), + 'wmsd=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% won money at showdown') ) @@ -230,19 +215,19 @@ def profit100(stat_dict, player): try: stat = float(stat_dict[player]['net'])/float(stat_dict[player]['n']) return (stat, - '%.0f' % (100.0*stat), - 'p=%.0f' % (100.0*stat), - 'p/100=%.0f' % (100.0*stat), + '%.0f' % (100.0*stat), + 'p=%.0f' % (100.0*stat), + 'p/100=%.0f' % (100.0*stat), '%d/%d' % (stat_dict[player]['net'], stat_dict[player]['n']), _('profit/100hands') ) except: print _("exception calcing p/100: 100 * %d / %d") % (stat_dict[player]['net'], stat_dict[player]['n']) return (stat, - '%.0f' % (0.0), - 'p=%.0f' % (0.0), - 'p/100=%.0f' % (0.0), - '(%d/%d)' % (0, 0), + '%.0f' % (0.0), + 'p=%.0f' % (0.0), + 'p/100=%.0f' % (0.0), + '(%d/%d)' % (0, 0), _('profit/100hands') ) @@ -252,19 +237,19 @@ def bbper100(stat_dict, player): try: stat = 100.0 * float(stat_dict[player]['net']) / float(stat_dict[player]['bigblind']) return (stat, - '%5.3f' % (stat), - 'bb100=%5.3f' % (stat), - 'bb100=%5.3f' % (stat), - '(%d,%d)' % (100*stat_dict[player]['net'],stat_dict[player]['bigblind']), + '%5.3f' % (stat), + 'bb100=%5.3f' % (stat), + 'bb100=%5.3f' % (stat), + '(%d,%d)' % (100*stat_dict[player]['net'],stat_dict[player]['bigblind']), _('big blinds/100 hands') ) except: log.info("exception calcing bb/100: "+str(stat_dict[player])) return (stat, - '%.0f' % (0), - 'bb100=%.0f' % (0), - 'bb100=%.0f' % (0), - '(%f)' % (0), + '%.0f' % (0), + 'bb100=%.0f' % (0), + 'bb100=%.0f' % (0), + '(%f)' % (0), _('big blinds/100 hands') ) @@ -274,19 +259,19 @@ def BBper100(stat_dict, player): try: stat = 50 * float(stat_dict[player]['net']) / float(stat_dict[player]['bigblind']) return (stat, - '%5.3f' % (stat), - 'BB100=%5.3f' % (stat), - 'BB100=%5.3f' % (stat), - '(%d,%d)' % (100*stat_dict[player]['net'],2*stat_dict[player]['bigblind']), + '%5.3f' % (stat), + 'BB100=%5.3f' % (stat), + 'BB100=%5.3f' % (stat), + '(%d,%d)' % (100*stat_dict[player]['net'],2*stat_dict[player]['bigblind']), _('Big Bets/100 hands') ) except: log.info(_("exception calcing BB/100: ")+str(stat_dict[player])) return (stat, - '%.0f' % (0.0), - 'BB100=%.0f' % (0.0), - 'BB100=%.0f' % (0.0), - '(%f)' % (0.0), + '%.0f' % (0.0), + 'BB100=%.0f' % (0.0), + 'BB100=%.0f' % (0.0), + '(%f)' % (0.0), _('Big Bets/100 hands') ) @@ -297,10 +282,10 @@ def saw_f(stat_dict, player): den = float(stat_dict[player]['n']) stat = num/den return (stat, - '%3.1f' % (100*stat) + '%', - 'sf=%3.1f' % (100*stat) + '%', - 'saw_f=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['saw_f'], stat_dict[player]['n']), + '%3.1f' % (100.0*stat), + 'sf=%3.1f%%' % (100.0*stat), + 'saw_f=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['saw_f'], stat_dict[player]['n']), _('Flop Seen %') ) except: @@ -308,10 +293,10 @@ def saw_f(stat_dict, player): num = 0 den = 0 return (stat, - '%3.1f' % (stat) + '%', - 'sf=%3.1f' % (stat) + '%', - 'saw_f=%3.1f' % (stat) + '%', - '(%d/%d)' % (num, den), + '%3.1f' % (stat), + 'sf=%3.1f%%' % (stat), + 'saw_f=%3.1f%%' % (stat), + '(%d/%d)' % (num, den), _('Flop Seen %') ) @@ -352,18 +337,18 @@ def fold_f(stat_dict, player): try: stat = float(stat_dict[player]['fold_2'])/float(stat_dict[player]['saw_f']) return (stat, - '%3.1f' % (100*stat) + '%', - 'ff=%3.1f' % (100*stat) + '%', - 'fold_f=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['fold_2'], stat_dict[player]['saw_f']), + '%3.1f' % (100.0*stat), + 'ff=%3.1f%%' % (100.0*stat), + 'fold_f=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['fold_2'], stat_dict[player]['saw_f']), _('folded flop/4th') ) except: return (stat, - '%3.1f' % (0) + '%', - 'ff=%3.1f' % (0) + '%', - 'fold_f=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'ff=%3.1f%%' % (0), + 'fold_f=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('folded flop/4th') ) @@ -373,10 +358,10 @@ def steal(stat_dict, player): try: stat = float(stat_dict[player]['steal'])/float(stat_dict[player]['steal_opp']) return (stat, - '%3.1f' % (100*stat) + '%', - 'st=%3.1f' % (100*stat) + '%', - 'steal=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['steal'], stat_dict[player]['steal_opp']), + '%3.1f' % (100.0*stat), + 'st=%3.1f%%' % (100.0*stat), + 'steal=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['steal'], stat_dict[player]['steal_opp']), _('% steal attempted') ) except: @@ -388,10 +373,10 @@ def f_SB_steal(stat_dict, player): try: stat = float(stat_dict[player]['sbnotdef'])/float(stat_dict[player]['sbstolen']) return (stat, - '%3.1f' % (100*stat) + '%', - 'fSB=%3.1f' % (100*stat) + '%', - 'fSB_s=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['sbnotdef'], stat_dict[player]['sbstolen']), + '%3.1f' % (100.0*stat), + 'fSB=%3.1f%%' % (100.0*stat), + 'fSB_s=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['sbnotdef'], stat_dict[player]['sbstolen']), _('% folded SB to steal')) except: return (stat, @@ -407,10 +392,10 @@ def f_BB_steal(stat_dict, player): try: stat = float(stat_dict[player]['bbnotdef'])/float(stat_dict[player]['bbstolen']) return (stat, - '%3.1f' % (100*stat) + '%', - 'fBB=%3.1f' % (100*stat) + '%', - 'fBB_s=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['bbnotdef'], stat_dict[player]['bbstolen']), + '%3.1f' % (100.0*stat), + 'fBB=%3.1f%%' % (100.0*stat), + 'fBB_s=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['bbnotdef'], stat_dict[player]['bbstolen']), _('% folded BB to steal')) except: return (stat, @@ -429,10 +414,10 @@ def f_steal(stat_dict, player): stat = float(folded_blind)/float(blind_stolen) return (stat, - '%3.1f' % (100*stat) + '%', - 'fB=%3.1f' % (100*stat) + '%', - 'fB_s=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (folded_blind, blind_stolen), + '%3.1f' % (100.0*stat), + 'fB=%3.1f%%' % (100.0*stat), + 'fB_s=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (folded_blind, blind_stolen), _('% folded blind to steal')) except: return (stat, @@ -448,17 +433,17 @@ def three_B(stat_dict, player): try: stat = float(stat_dict[player]['tb_0'])/float(stat_dict[player]['tb_opp_0']) return (stat, - '%3.1f' % (100*stat) + '%', - '3B=%3.1f' % (100*stat) + '%', - '3B_pf=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['tb_0'], stat_dict[player]['tb_opp_0']), + '%3.1f' % (100.0*stat), + '3B=%3.1f%%' % (100.0*stat), + '3B_pf=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['tb_0'], stat_dict[player]['tb_opp_0']), _('% 3/4 Bet preflop/3rd')) except: return (stat, - '%3.1f' % (0) + '%', - '3B=%3.1f' % (0) + '%', - '3B_pf=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + '3B=%3.1f%%' % (0), + '3B_pf=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% 3/4 Bet preflop/3rd')) def WMsF(stat_dict, player): @@ -467,17 +452,17 @@ def WMsF(stat_dict, player): try: stat = float(stat_dict[player]['w_w_s_1'])/float(stat_dict[player]['saw_1']) return (stat, - '%3.1f' % (100*stat) + '%', - 'wf=%3.1f' % (100*stat) + '%', - 'w_w_f=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['w_w_s_1'], stat_dict[player]['saw_f']), + '%3.1f' % (100.0*stat), + 'wf=%3.1f%%' % (100.0*stat), + 'w_w_f=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['w_w_s_1'], stat_dict[player]['saw_f']), _('% won$/saw flop/4th')) except: return (stat, - '%3.1f' % (0) + '%', - 'wf=%3.1f' % (0) + '%', - 'w_w_f=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'wf=%3.1f%%' % (0), + 'w_w_f=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% won$/saw flop/4th')) def a_freq1(stat_dict, player): @@ -486,17 +471,17 @@ def a_freq1(stat_dict, player): try: stat = float(stat_dict[player]['aggr_1'])/float(stat_dict[player]['saw_f']) return (stat, - '%3.1f' % (100*stat) + '%', - 'a1=%3.1f' % (100*stat) + '%', - 'a_fq_1=%3.1f' % (100*stat) + '%', + '%3.1f' % (100.0*stat), + 'a1=%3.1f%%' % (100.0*stat), + 'a_fq_1=%3.1f%%' % (100.0*stat), '(%d/%d)' % (stat_dict[player]['aggr_1'], stat_dict[player]['saw_f']), _('Aggression Freq flop/4th')) except: return (stat, - '%3.1f' % (0) + '%', - 'a1=%3.1f' % (0) + '%', - 'a_fq_1=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'a1=%3.1f%%' % (0), + 'a_fq_1=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('Aggression Freq flop/4th')) def a_freq2(stat_dict, player): @@ -505,17 +490,17 @@ def a_freq2(stat_dict, player): try: stat = float(stat_dict[player]['aggr_2'])/float(stat_dict[player]['saw_2']) return (stat, - '%3.1f' % (100*stat) + '%', - 'a2=%3.1f' % (100*stat) + '%', - 'a_fq_2=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['aggr_2'], stat_dict[player]['saw_2']), + '%3.1f' % (100.0*stat), + 'a2=%3.1f%%' % (100.0*stat), + 'a_fq_2=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['aggr_2'], stat_dict[player]['saw_2']), _('Aggression Freq turn/5th')) except: return (stat, - '%3.1f' % (0) + '%', - 'a2=%3.1f' % (0) + '%', - 'a_fq_2=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'a2=%3.1f%%' % (0), + 'a_fq_2=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('Aggression Freq turn/5th')) def a_freq3(stat_dict, player): @@ -524,17 +509,17 @@ def a_freq3(stat_dict, player): try: stat = float(stat_dict[player]['aggr_3'])/float(stat_dict[player]['saw_3']) return (stat, - '%3.1f' % (100*stat) + '%', - 'a3=%3.1f' % (100*stat) + '%', - 'a_fq_3=%3.1f' % (100*stat) + '%', + '%3.1f' % (100.0*stat), + 'a3=%3.1f%%' % (100.0*stat), + 'a_fq_3=%3.1f%%' % (100.0*stat), '(%d/%d)' % (stat_dict[player]['aggr_3'], stat_dict[player]['saw_3']), _('Aggression Freq river/6th')) except: return (stat, - '%3.1f' % (0) + '%', - 'a3=%3.1f' % (0) + '%', - 'a_fq_3=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'a3=%3.1f%%' % (0), + 'a_fq_3=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('Aggression Freq river/6th')) def a_freq4(stat_dict, player): @@ -543,17 +528,17 @@ def a_freq4(stat_dict, player): try: stat = float(stat_dict[player]['aggr_4'])/float(stat_dict[player]['saw_4']) return (stat, - '%3.1f' % (100*stat) + '%', - 'a4=%3.1f' % (100*stat) + '%', - 'a_fq_4=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['aggr_4'], stat_dict[player]['saw_4']), + '%3.1f' % (100.0*stat), + 'a4=%3.1f%%' % (100.0*stat), + 'a_fq_4=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['aggr_4'], stat_dict[player]['saw_4']), _('Aggression Freq 7th')) except: return (stat, - '%3.1f' % (0) + '%', - 'a4=%3.1f' % (0) + '%', - 'a_fq_4=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'a4=%3.1f%%' % (0), + 'a_fq_4=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('Aggression Freq 7th')) def a_freq_123(stat_dict, player): @@ -563,9 +548,9 @@ def a_freq_123(stat_dict, player): stat = float( stat_dict[player]['aggr_1'] + stat_dict[player]['aggr_2'] + stat_dict[player]['aggr_3'] ) / float( stat_dict[player]['saw_1'] + stat_dict[player]['saw_2'] + stat_dict[player]['saw_3']); return (stat, - '%3.1f' % (100*stat) + '%', - 'afq=%3.1f' % (100*stat) + '%', - 'postf_aggfq=%3.1f' % (100*stat) + '%', + '%3.1f' % (100.0*stat), + 'afq=%3.1f%%' % (100.0*stat), + 'postf_aggfq=%3.1f%%' % (100.0*stat), '(%d/%d)' % ( stat_dict[player]['aggr_1'] + stat_dict[player]['aggr_2'] + stat_dict[player]['aggr_3'] @@ -576,10 +561,10 @@ def a_freq_123(stat_dict, player): _('Post-Flop Aggression Freq')) except: return (stat, - '%2.0f' % (0) + '%', - 'a3=%2.0f' % (0) + '%', - 'a_fq_3=%2.0f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%2.0f' % (0), + 'a3=%2.0f%%' % (0), + 'a_fq_3=%2.0f%%' % (0), + '(%d/%d)' % (0, 0), _('Post-Flop Aggression Freq')) def agg_freq(stat_dict, player): @@ -597,17 +582,17 @@ def agg_freq(stat_dict, player): stat = float (bet_raise) / float(post_call + post_fold + bet_raise) return (stat, - '%3.1f' % (100*stat) + '%', - 'afr=%3.1f' % (100*stat) + '%', - 'agg_fr=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (bet_raise, (post_call + post_fold + bet_raise)), + '%3.1f' % (100.0*stat), + 'afr=%3.1f%%' % (100.0*stat), + 'agg_fr=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (bet_raise, (post_call + post_fold + bet_raise)), _('Aggression Freq')) except: return (stat, - '%2.1f' % (0) + '%', - 'af=%3.1f' % (0) + '%', - 'agg_f=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%2.1f' % (0), + 'af=%3.1f%%' % (0), + 'agg_f=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('Aggression Freq')) def agg_fact(stat_dict, player): @@ -647,17 +632,17 @@ def cbet(stat_dict, player): oppt = stat_dict[player]['cb_opp_1']+stat_dict[player]['cb_opp_2']+stat_dict[player]['cb_opp_3']+stat_dict[player]['cb_opp_4'] stat = float(cbets)/float(oppt) return (stat, - '%3.1f' % (100*stat) + '%', - 'cbet=%3.1f' % (100*stat) + '%', - 'cbet=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (cbets, oppt), + '%3.1f' % (100.0*stat), + 'cbet=%3.1f%%' % (100.0*stat), + 'cbet=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (cbets, oppt), _('% continuation bet ')) except: return (stat, - '%3.1f' % (0) + '%', - 'cbet=%3.1f' % (0) + '%', - 'cbet=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'cbet=%3.1f%%' % (0), + 'cbet=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% continuation bet ')) def cb1(stat_dict, player): @@ -666,17 +651,17 @@ def cb1(stat_dict, player): try: stat = float(stat_dict[player]['cb_1'])/float(stat_dict[player]['cb_opp_1']) return (stat, - '%3.1f' % (100*stat) + '%', - 'cb1=%3.1f' % (100*stat) + '%', - 'cb_1=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['cb_1'], stat_dict[player]['cb_opp_1']), + '%3.1f' % (100.0*stat), + 'cb1=%3.1f%%' % (100.0*stat), + 'cb_1=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['cb_1'], stat_dict[player]['cb_opp_1']), _('% continuation bet flop/4th')) except: return (stat, - '%3.1f' % (0) + '%', - 'cb1=%3.1f' % (0) + '%', - 'cb_1=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'cb1=%3.1f%%' % (0), + 'cb_1=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% continuation bet flop/4th')) def cb2(stat_dict, player): @@ -685,17 +670,17 @@ def cb2(stat_dict, player): try: stat = float(stat_dict[player]['cb_2'])/float(stat_dict[player]['cb_opp_2']) return (stat, - '%3.1f' % (100*stat) + '%', - 'cb2=%3.1f' % (100*stat) + '%', - 'cb_2=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['cb_2'], stat_dict[player]['cb_opp_2']), + '%3.1f' % (100.0*stat), + 'cb2=%3.1f%%' % (100.0*stat), + 'cb_2=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['cb_2'], stat_dict[player]['cb_opp_2']), _('% continuation bet turn/5th')) except: return (stat, - '%3.1f' % (0) + '%', - 'cb2=%3.1f' % (0) + '%', - 'cb_2=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'cb2=%3.1f%%' % (0), + 'cb_2=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% continuation bet turn/5th')) def cb3(stat_dict, player): @@ -704,17 +689,17 @@ def cb3(stat_dict, player): try: stat = float(stat_dict[player]['cb_3'])/float(stat_dict[player]['cb_opp_3']) return (stat, - '%3.1f' % (100*stat) + '%', - 'cb3=%3.1f' % (100*stat) + '%', - 'cb_3=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['cb_3'], stat_dict[player]['cb_opp_3']), + '%3.1f' % (100.0*stat), + 'cb3=%3.1f%%' % (100.0*stat), + 'cb_3=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['cb_3'], stat_dict[player]['cb_opp_3']), _('% continuation bet river/6th')) except: return (stat, - '%3.1f' % (0) + '%', - 'cb3=%3.1f' % (0) + '%', - 'cb_3=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'cb3=%3.1f%%' % (0), + 'cb_3=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% continuation bet river/6th')) def cb4(stat_dict, player): @@ -723,17 +708,17 @@ def cb4(stat_dict, player): try: stat = float(stat_dict[player]['cb_4'])/float(stat_dict[player]['cb_opp_4']) return (stat, - '%3.1f' % (100*stat) + '%', - 'cb4=%3.1f' % (100*stat) + '%', - 'cb_4=%3.1f' % (100*stat) + '%', + '%3.1f' % (100.0*stat), + 'cb4=%3.1f%%' % (100.0*stat), + 'cb_4=%3.1f%%' % (100.0*stat), '(%d/%d)' % (stat_dict[player]['cb_4'], stat_dict[player]['cb_opp_4']), _('% continuation bet 7th')) except: return (stat, - '%3.1f' % (0) + '%', - 'cb4=%3.1f' % (0) + '%', - 'cb_4=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'cb4=%3.1f%%' % (0), + 'cb_4=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% continuation bet 7th')) def ffreq1(stat_dict, player): @@ -742,10 +727,10 @@ def ffreq1(stat_dict, player): try: stat = float(stat_dict[player]['f_freq_1'])/float(stat_dict[player]['was_raised_1']) return (stat, - '%3.1f' % (100*stat) + '%', - 'ff1=%3.1f' % (100*stat) + '%', - 'ff_1=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['f_freq_1'], stat_dict[player]['was_raised_1']), + '%3.1f' % (100.0*stat), + 'ff1=%3.1f%%' % (100.0*stat), + 'ff_1=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['f_freq_1'], stat_dict[player]['was_raised_1']), _('% fold frequency flop/4th')) except: return (stat, @@ -761,17 +746,17 @@ def ffreq2(stat_dict, player): try: stat = float(stat_dict[player]['f_freq_2'])/float(stat_dict[player]['was_raised_2']) return (stat, - '%3.1f' % (100*stat) + '%', - 'ff2=%3.1f' % (100*stat) + '%', - 'ff_2=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['f_freq_2'], stat_dict[player]['was_raised_2']), + '%3.1f' % (100.0*stat), + 'ff2=%3.1f%%' % (100.0*stat), + 'ff_2=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['f_freq_2'], stat_dict[player]['was_raised_2']), _('% fold frequency turn/5th')) except: return (stat, - '%3.1f' % (0) + '%', - 'ff2=%3.1f' % (0) + '%', - 'ff_2=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'ff2=%3.1f%%' % (0), + 'ff_2=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% fold frequency turn/5th')) def ffreq3(stat_dict, player): @@ -780,17 +765,17 @@ def ffreq3(stat_dict, player): try: stat = float(stat_dict[player]['f_freq_3'])/float(stat_dict[player]['was_raised_3']) return (stat, - '%3.1f' % (100*stat) + '%', - 'ff3=%3.1f' % (100*stat) + '%', - 'ff_3=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['f_freq_3'], stat_dict[player]['was_raised_3']), + '%3.1f' % (100.0*stat), + 'ff3=%3.1f%%' % (100.0*stat), + 'ff_3=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['f_freq_3'], stat_dict[player]['was_raised_3']), _('% fold frequency river/6th')) except: return (stat, - '%3.1f' % (0) + '%', - 'ff3=%3.1f' % (0) + '%', - 'ff_3=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'ff3=%3.1f%%' % (0), + 'ff_3=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% fold frequency river/6th')) def ffreq4(stat_dict, player): @@ -799,24 +784,24 @@ def ffreq4(stat_dict, player): try: stat = float(stat_dict[player]['f_freq_4'])/float(stat_dict[player]['was_raised_4']) return (stat, - '%3.1f' % (100*stat) + '%', - 'ff4=%3.1f' % (100*stat) + '%', - 'ff_4=%3.1f' % (100*stat) + '%', - '(%d/%d)' % (stat_dict[player]['f_freq_4'], stat_dict[player]['was_raised_4']), + '%3.1f' % (100.0*stat), + 'ff4=%3.1f%%' % (100.0*stat), + 'ff_4=%3.1f%%' % (100.0*stat), + '(%d/%d)' % (stat_dict[player]['f_freq_4'], stat_dict[player]['was_raised_4']), _('% fold frequency 7th')) except: return (stat, - '%3.1f' % (0) + '%', - 'ff4=%3.1f' % (0) + '%', - 'ff_4=%3.1f' % (0) + '%', - '(%d/%d)' % (0, 0), + '%3.1f' % (0), + 'ff4=%3.1f%%' % (0), + 'ff_4=%3.1f%%' % (0), + '(%d/%d)' % (0, 0), _('% fold frequency 7th')) if __name__== "__main__": statlist = dir() misslist = [ "Configuration", "Database", "Charset", "codecs", "encoder" , "do_stat", "do_tip", "GInitiallyUnowned", "gtk", "pygtk" - , "re", "re_Percent", "re_Places" + , "re", "re_Places" ] statlist = [ x for x in statlist if x not in dir(sys) ] statlist = [ x for x in statlist if x not in dir(codecs) ] From 4a92638941eb105ab80ca3c1a1ecc41f5d18bf14 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Sun, 22 Aug 2010 13:57:01 +0300 Subject: [PATCH 2/6] Return "hard" NA for missing/incalculable stats It makes very little sense to do a format string for nothing but zeroes in case of unknown values. Simply return a set of 'NA' strings in place of usual stats. This makes the error cases consistent throughout Stats.py --- pyfpdb/Stats.py | 211 ++++++++++++++++++++++++------------------------ 1 file changed, 105 insertions(+), 106 deletions(-) diff --git a/pyfpdb/Stats.py b/pyfpdb/Stats.py index 22900da8..cfe82f0a 100755 --- a/pyfpdb/Stats.py +++ b/pyfpdb/Stats.py @@ -139,10 +139,10 @@ def vpip(stat_dict, player): _('Voluntarily Put In Pot Pre-Flop%') ) except: return (stat, - '%3.1f' % (0), - 'v=%3.1f%%' % (0), - 'vpip=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'v=NA', + 'vpip=NA', + '(0/0)', _('Voluntarily Put In Pot Pre-Flop%') ) @@ -160,10 +160,10 @@ def pfr(stat_dict, player): ) except: return (stat, - '%3.1f' % (0), - 'p=%3.1f%%' % (0), - 'pfr=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'p=NA', + 'pfr=NA', + '(0/0)', _('Pre-Flop Raise %') ) @@ -181,10 +181,10 @@ def wtsd(stat_dict, player): ) except: return (stat, - '%3.1f' % (0), - 'w=%3.1f%%' % (0), - 'wtsd=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'w=NA', + 'wtsd=NA', + '(0/0)', _('% went to showdown') ) @@ -202,10 +202,10 @@ def wmsd(stat_dict, player): ) except: return (stat, - '%3.1f' % (0), - 'w=%3.1f%%' % (0), - 'wmsd=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'w=NA', + 'wmsd=NA', + '(0/0)', _('% won money at showdown') ) @@ -224,10 +224,10 @@ def profit100(stat_dict, player): except: print _("exception calcing p/100: 100 * %d / %d") % (stat_dict[player]['net'], stat_dict[player]['n']) return (stat, - '%.0f' % (0.0), - 'p=%.0f' % (0.0), - 'p/100=%.0f' % (0.0), - '(%d/%d)' % (0, 0), + 'NA', + 'p=NA', + 'p/100=NA', + '(0/0)', _('profit/100hands') ) @@ -246,10 +246,10 @@ def bbper100(stat_dict, player): except: log.info("exception calcing bb/100: "+str(stat_dict[player])) return (stat, - '%.0f' % (0), - 'bb100=%.0f' % (0), - 'bb100=%.0f' % (0), - '(%f)' % (0), + 'NA', + 'bb100=NA', + 'bb100=NA', + '(--)', _('big blinds/100 hands') ) @@ -268,10 +268,10 @@ def BBper100(stat_dict, player): except: log.info(_("exception calcing BB/100: ")+str(stat_dict[player])) return (stat, - '%.0f' % (0.0), - 'BB100=%.0f' % (0.0), - 'BB100=%.0f' % (0.0), - '(%f)' % (0.0), + 'NA', + 'BB100=NA', + 'BB100=NA', + '(--)', _('Big Bets/100 hands') ) @@ -290,13 +290,11 @@ def saw_f(stat_dict, player): ) except: stat = 0.0 - num = 0 - den = 0 return (stat, - '%3.1f' % (stat), - 'sf=%3.1f%%' % (stat), - 'saw_f=%3.1f%%' % (stat), - '(%d/%d)' % (num, den), + 'NA', + 'sf=NA', + 'saw_f=NA', + '(0/0)', _('Flop Seen %') ) @@ -323,6 +321,7 @@ def n(stat_dict, player): _('number hands seen') ) except: + # Number of hands shouldn't ever be "NA"; zeroes are better here return (0, '%d' % (0), 'n=%d' % (0), @@ -345,10 +344,10 @@ def fold_f(stat_dict, player): ) except: return (stat, - '%3.1f' % (0), - 'ff=%3.1f%%' % (0), - 'fold_f=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'ff=NA', + 'fold_f=NA', + '(0/0)', _('folded flop/4th') ) @@ -440,10 +439,10 @@ def three_B(stat_dict, player): _('% 3/4 Bet preflop/3rd')) except: return (stat, - '%3.1f' % (0), - '3B=%3.1f%%' % (0), - '3B_pf=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + '3B=NA', + '3B_pf=NA', + '(0/0)', _('% 3/4 Bet preflop/3rd')) def WMsF(stat_dict, player): @@ -459,10 +458,10 @@ def WMsF(stat_dict, player): _('% won$/saw flop/4th')) except: return (stat, - '%3.1f' % (0), - 'wf=%3.1f%%' % (0), - 'w_w_f=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'wf=NA', + 'w_w_f=NA', + '(0/0)', _('% won$/saw flop/4th')) def a_freq1(stat_dict, player): @@ -478,10 +477,10 @@ def a_freq1(stat_dict, player): _('Aggression Freq flop/4th')) except: return (stat, - '%3.1f' % (0), - 'a1=%3.1f%%' % (0), - 'a_fq_1=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'a1=NA', + 'a_fq_1=NA', + '(0/0)', _('Aggression Freq flop/4th')) def a_freq2(stat_dict, player): @@ -497,10 +496,10 @@ def a_freq2(stat_dict, player): _('Aggression Freq turn/5th')) except: return (stat, - '%3.1f' % (0), - 'a2=%3.1f%%' % (0), - 'a_fq_2=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'a2=NA', + 'a_fq_2=NA', + '(0/0)', _('Aggression Freq turn/5th')) def a_freq3(stat_dict, player): @@ -516,10 +515,10 @@ def a_freq3(stat_dict, player): _('Aggression Freq river/6th')) except: return (stat, - '%3.1f' % (0), - 'a3=%3.1f%%' % (0), - 'a_fq_3=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'a3=NA', + 'a_fq_3=NA', + '(0/0)', _('Aggression Freq river/6th')) def a_freq4(stat_dict, player): @@ -535,10 +534,10 @@ def a_freq4(stat_dict, player): _('Aggression Freq 7th')) except: return (stat, - '%3.1f' % (0), - 'a4=%3.1f%%' % (0), - 'a_fq_4=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'a4=NA', + 'a_fq_4=NA', + '(0/0)', _('Aggression Freq 7th')) def a_freq_123(stat_dict, player): @@ -561,10 +560,10 @@ def a_freq_123(stat_dict, player): _('Post-Flop Aggression Freq')) except: return (stat, - '%2.0f' % (0), - 'a3=%2.0f%%' % (0), - 'a_fq_3=%2.0f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'a3=NA', + 'a_fq_3=NA', + '(0/0)', _('Post-Flop Aggression Freq')) def agg_freq(stat_dict, player): @@ -589,10 +588,10 @@ def agg_freq(stat_dict, player): _('Aggression Freq')) except: return (stat, - '%2.1f' % (0), - 'af=%3.1f%%' % (0), - 'agg_f=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'af=NA', + 'agg_f=NA', + '(0/0)', _('Aggression Freq')) def agg_fact(stat_dict, player): @@ -615,10 +614,10 @@ def agg_fact(stat_dict, player): _('Aggression Factor')) except: return (stat, - '%2.2f' % (0) , - 'afa=%2.2f' % (0) , - 'agg_fa=%2.2f' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'afa=NA', + 'agg_fa=NA', + '(0/0)', _('Aggression Factor')) def cbet(stat_dict, player): @@ -639,10 +638,10 @@ def cbet(stat_dict, player): _('% continuation bet ')) except: return (stat, - '%3.1f' % (0), - 'cbet=%3.1f%%' % (0), - 'cbet=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'cbet=NA', + 'cbet=NA', + '(0/0)', _('% continuation bet ')) def cb1(stat_dict, player): @@ -658,10 +657,10 @@ def cb1(stat_dict, player): _('% continuation bet flop/4th')) except: return (stat, - '%3.1f' % (0), - 'cb1=%3.1f%%' % (0), - 'cb_1=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'cb1=NA', + 'cb_1=NA', + '(0/0)', _('% continuation bet flop/4th')) def cb2(stat_dict, player): @@ -677,10 +676,10 @@ def cb2(stat_dict, player): _('% continuation bet turn/5th')) except: return (stat, - '%3.1f' % (0), - 'cb2=%3.1f%%' % (0), - 'cb_2=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'cb2=NA', + 'cb_2=NA', + '(0/0)', _('% continuation bet turn/5th')) def cb3(stat_dict, player): @@ -696,10 +695,10 @@ def cb3(stat_dict, player): _('% continuation bet river/6th')) except: return (stat, - '%3.1f' % (0), - 'cb3=%3.1f%%' % (0), - 'cb_3=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'cb3=NA', + 'cb_3=NA', + '(0/0)', _('% continuation bet river/6th')) def cb4(stat_dict, player): @@ -715,10 +714,10 @@ def cb4(stat_dict, player): _('% continuation bet 7th')) except: return (stat, - '%3.1f' % (0), - 'cb4=%3.1f%%' % (0), - 'cb_4=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'cb4=NA', + 'cb_4=NA', + '(0/0)', _('% continuation bet 7th')) def ffreq1(stat_dict, player): @@ -753,10 +752,10 @@ def ffreq2(stat_dict, player): _('% fold frequency turn/5th')) except: return (stat, - '%3.1f' % (0), - 'ff2=%3.1f%%' % (0), - 'ff_2=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'ff2=NA', + 'ff_2=NA', + '(0/0)', _('% fold frequency turn/5th')) def ffreq3(stat_dict, player): @@ -772,10 +771,10 @@ def ffreq3(stat_dict, player): _('% fold frequency river/6th')) except: return (stat, - '%3.1f' % (0), - 'ff3=%3.1f%%' % (0), - 'ff_3=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'ff3=NA', + 'ff_3=NA', + '(0/0)', _('% fold frequency river/6th')) def ffreq4(stat_dict, player): @@ -791,10 +790,10 @@ def ffreq4(stat_dict, player): _('% fold frequency 7th')) except: return (stat, - '%3.1f' % (0), - 'ff4=%3.1f%%' % (0), - 'ff_4=%3.1f%%' % (0), - '(%d/%d)' % (0, 0), + 'NA', + 'ff4=NA', + 'ff_4=NA', + '(0/0)', _('% fold frequency 7th')) if __name__== "__main__": From d2483b88665b1ea4ff5fcb49143b5ab31cd5d4eb Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Sun, 22 Aug 2010 14:12:29 +0300 Subject: [PATCH 3/6] Add comment on decimal place override --- pyfpdb/Stats.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyfpdb/Stats.py b/pyfpdb/Stats.py index cfe82f0a..285a45ea 100755 --- a/pyfpdb/Stats.py +++ b/pyfpdb/Stats.py @@ -93,6 +93,11 @@ def do_stat(stat_dict, player = 24, stat = 'vpip'): result = eval("%(stat)s(stat_dict, %(player)d)" % {'stat': stat, 'player': player}) # If decimal places have been defined, override result[1] + # NOTE: decimal place override ALWAYS assumes the raw result is a + # fraction (x/100); manual decimal places really only make sense for + # percentage values. Also, profit/100 hands (bb/BB) already default + # to three decimal places anyhow, so they are unlikely override + # candidates. if match: base = stat[0:-2] places = int(stat[-1:]) From d85358483bb76bb912b190939d7bbf106585a62e Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Wed, 25 Aug 2010 10:06:06 +0300 Subject: [PATCH 4/6] Update changelog --- packaging/debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 49211161..29aa5e79 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,10 @@ +free-poker-tools (0.20.905-1) unstable; urgency=low + + * New snapshot + * Hungarian translation + + -- Mika Bostrom Wed, 25 Aug 2010 10:05:36 +0300 + free-poker-tools (0.20.904-2) unstable; urgency=low * On fpdb start, copy example HUD_config.xml in place if none is present From 7acc8e11356592c2f1e64575bf8a91ea6d629262 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Fri, 27 Aug 2010 08:27:16 +0300 Subject: [PATCH 5/6] Update changelog for snapshot --- packaging/debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 29aa5e79..c09713a3 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,9 @@ +free-poker-tools (0.20.906-1) unstable; urgency=low + + * New snapshot + + -- Mika Bostrom Fri, 27 Aug 2010 08:26:05 +0300 + free-poker-tools (0.20.905-1) unstable; urgency=low * New snapshot From d44b9494fbde94eecee50d0a67310dbf5380aa49 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Fri, 27 Aug 2010 09:11:50 +0300 Subject: [PATCH 6/6] py2exe script moved to packaging/windows --- packaging/debian/rules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packaging/debian/rules b/packaging/debian/rules index 58b1136b..9f8d5238 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -26,8 +26,7 @@ install: build # Copy *.pyw manually in packaging tree cp pyfpdb/*.pyw debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb/ # Remove scripts that are only useful in win32 - rm debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb//windows_make_bats.py - rm debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb/py2exe_setup.py + rm debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb/windows_make_bats.py binary-indep: build install