Merge branch 'master' of git://git.assembla.com/fpdboz
This commit is contained in:
commit
d75de05410
|
@ -1937,100 +1937,99 @@ class Database:
|
||||||
#print "DEBUG: %s %s %s" %(hid, pids, pdata)
|
#print "DEBUG: %s %s %s" %(hid, pids, pdata)
|
||||||
inserts = []
|
inserts = []
|
||||||
for p in pdata:
|
for p in pdata:
|
||||||
#NOTE: Insert new stats at right place because SQL needs strict order
|
line = [0]*89
|
||||||
line = []
|
|
||||||
|
|
||||||
line.append(1) # HDs
|
line[0] = 1 # HDs
|
||||||
line.append(pdata[p]['street0VPI'])
|
if pdata[p]['street0VPI']: line[1] = 1
|
||||||
line.append(pdata[p]['street0Aggr'])
|
if pdata[p]['street0Aggr']: line[2] = 1
|
||||||
line.append(pdata[p]['street0_3BChance'])
|
if pdata[p]['street0_3BChance']: line[3] = 1
|
||||||
line.append(pdata[p]['street0_3BDone'])
|
if pdata[p]['street0_3BDone']: line[4] = 1
|
||||||
line.append(pdata[p]['street0_4BChance'])
|
if pdata[p]['street0_4BChance']: line[5] = 1
|
||||||
line.append(pdata[p]['street0_4BDone'])
|
if pdata[p]['street0_4BDone']: line[6] = 1
|
||||||
line.append(pdata[p]['street0_FoldTo3BChance'])
|
if pdata[p]['street0_FoldTo3BChance']: line[7] = 1
|
||||||
line.append(pdata[p]['street0_FoldTo3BDone'])
|
if pdata[p]['street0_FoldTo3BDone']: line[8] = 1
|
||||||
line.append(pdata[p]['street0_FoldTo4BChance'])
|
if pdata[p]['street0_FoldTo4BChance']: line[9] = 1
|
||||||
line.append(pdata[p]['street0_FoldTo4BDone'])
|
if pdata[p]['street0_FoldTo4BDone']: line[10] = 1
|
||||||
line.append(pdata[p]['other3BStreet0'])
|
if pdata[p]['other3BStreet0']: line[11] = 1
|
||||||
line.append(pdata[p]['other4BStreet0'])
|
if pdata[p]['other4BStreet0']: line[12] = 1
|
||||||
line.append(pdata[p]['street1Seen'])
|
if pdata[p]['street1Seen']: line[13] = 1
|
||||||
line.append(pdata[p]['street2Seen'])
|
if pdata[p]['street2Seen']: line[14] = 1
|
||||||
line.append(pdata[p]['street3Seen'])
|
if pdata[p]['street3Seen']: line[15] = 1
|
||||||
line.append(pdata[p]['street4Seen'])
|
if pdata[p]['street4Seen']: line[16] = 1
|
||||||
line.append(pdata[p]['sawShowdown'])
|
if pdata[p]['sawShowdown']: line[17] = 1
|
||||||
line.append(pdata[p]['street1Aggr'])
|
if pdata[p]['street1Aggr']: line[18] = 1
|
||||||
line.append(pdata[p]['street2Aggr'])
|
if pdata[p]['street2Aggr']: line[19] = 1
|
||||||
line.append(pdata[p]['street3Aggr'])
|
if pdata[p]['street3Aggr']: line[20] = 1
|
||||||
line.append(pdata[p]['street4Aggr'])
|
if pdata[p]['street4Aggr']: line[21] = 1
|
||||||
line.append(pdata[p]['otherRaisedStreet0'])
|
if pdata[p]['otherRaisedStreet0']: line[22] = 1
|
||||||
line.append(pdata[p]['otherRaisedStreet1'])
|
if pdata[p]['otherRaisedStreet1']: line[23] = 1
|
||||||
line.append(pdata[p]['otherRaisedStreet2'])
|
if pdata[p]['otherRaisedStreet2']: line[24] = 1
|
||||||
line.append(pdata[p]['otherRaisedStreet3'])
|
if pdata[p]['otherRaisedStreet3']: line[25] = 1
|
||||||
line.append(pdata[p]['otherRaisedStreet4'])
|
if pdata[p]['otherRaisedStreet4']: line[26] = 1
|
||||||
line.append(pdata[p]['foldToOtherRaisedStreet0'])
|
if pdata[p]['foldToOtherRaisedStreet0']: line[27] = 1
|
||||||
line.append(pdata[p]['foldToOtherRaisedStreet1'])
|
if pdata[p]['foldToOtherRaisedStreet1']: line[28] = 1
|
||||||
line.append(pdata[p]['foldToOtherRaisedStreet2'])
|
if pdata[p]['foldToOtherRaisedStreet2']: line[29] = 1
|
||||||
line.append(pdata[p]['foldToOtherRaisedStreet3'])
|
if pdata[p]['foldToOtherRaisedStreet3']: line[30] = 1
|
||||||
line.append(pdata[p]['foldToOtherRaisedStreet4'])
|
if pdata[p]['foldToOtherRaisedStreet4']: line[31] = 1
|
||||||
line.append(pdata[p]['wonWhenSeenStreet1'])
|
line[32] = pdata[p]['wonWhenSeenStreet1']
|
||||||
line.append(pdata[p]['wonWhenSeenStreet2'])
|
line[33] = pdata[p]['wonWhenSeenStreet2']
|
||||||
line.append(pdata[p]['wonWhenSeenStreet3'])
|
line[34] = pdata[p]['wonWhenSeenStreet3']
|
||||||
line.append(pdata[p]['wonWhenSeenStreet4'])
|
line[35] = pdata[p]['wonWhenSeenStreet4']
|
||||||
line.append(pdata[p]['wonAtSD'])
|
line[36] = pdata[p]['wonAtSD']
|
||||||
line.append(pdata[p]['raiseFirstInChance'])
|
if pdata[p]['raiseFirstInChance']: line[37] = 1
|
||||||
line.append(pdata[p]['raisedFirstIn'])
|
if pdata[p]['raisedFirstIn']: line[38] = 1
|
||||||
line.append(pdata[p]['foldBbToStealChance'])
|
if pdata[p]['foldBbToStealChance']: line[39] = 1
|
||||||
line.append(pdata[p]['foldedBbToSteal'])
|
if pdata[p]['foldedBbToSteal']: line[40] = 1
|
||||||
line.append(pdata[p]['foldSbToStealChance'])
|
if pdata[p]['foldSbToStealChance']: line[41] = 1
|
||||||
line.append(pdata[p]['foldedSbToSteal'])
|
if pdata[p]['foldedSbToSteal']: line[42] = 1
|
||||||
line.append(pdata[p]['street1CBChance'])
|
if pdata[p]['street1CBChance']: line[43] = 1
|
||||||
line.append(pdata[p]['street1CBDone'])
|
if pdata[p]['street1CBDone']: line[44] = 1
|
||||||
line.append(pdata[p]['street2CBChance'])
|
if pdata[p]['street2CBChance']: line[45] = 1
|
||||||
line.append(pdata[p]['street2CBDone'])
|
if pdata[p]['street2CBDone']: line[46] = 1
|
||||||
line.append(pdata[p]['street3CBChance'])
|
if pdata[p]['street3CBChance']: line[47] = 1
|
||||||
line.append(pdata[p]['street3CBDone'])
|
if pdata[p]['street3CBDone']: line[48] = 1
|
||||||
line.append(pdata[p]['street4CBChance'])
|
if pdata[p]['street4CBChance']: line[49] = 1
|
||||||
line.append(pdata[p]['street4CBDone'])
|
if pdata[p]['street4CBDone']: line[50] = 1
|
||||||
line.append(pdata[p]['foldToStreet1CBChance'])
|
if pdata[p]['foldToStreet1CBChance']: line[51] = 1
|
||||||
line.append(pdata[p]['foldToStreet1CBDone'])
|
if pdata[p]['foldToStreet1CBDone']: line[52] = 1
|
||||||
line.append(pdata[p]['foldToStreet2CBChance'])
|
if pdata[p]['foldToStreet2CBChance']: line[53] = 1
|
||||||
line.append(pdata[p]['foldToStreet2CBDone'])
|
if pdata[p]['foldToStreet2CBDone']: line[54] = 1
|
||||||
line.append(pdata[p]['foldToStreet3CBChance'])
|
if pdata[p]['foldToStreet3CBChance']: line[55] = 1
|
||||||
line.append(pdata[p]['foldToStreet3CBDone'])
|
if pdata[p]['foldToStreet3CBDone']: line[56] = 1
|
||||||
line.append(pdata[p]['foldToStreet4CBChance'])
|
if pdata[p]['foldToStreet4CBChance']: line[57] = 1
|
||||||
line.append(pdata[p]['foldToStreet4CBDone'])
|
if pdata[p]['foldToStreet4CBDone']: line[58] = 1
|
||||||
line.append(pdata[p]['totalProfit'])
|
line[59] = pdata[p]['totalProfit']
|
||||||
line.append(pdata[p]['street1CheckCallRaiseChance'])
|
if pdata[p]['street1CheckCallRaiseChance']: line[60] = 1
|
||||||
line.append(pdata[p]['street1CheckCallRaiseDone'])
|
if pdata[p]['street1CheckCallRaiseDone']: line[61] = 1
|
||||||
line.append(pdata[p]['street2CheckCallRaiseChance'])
|
if pdata[p]['street2CheckCallRaiseChance']: line[62] = 1
|
||||||
line.append(pdata[p]['street2CheckCallRaiseDone'])
|
if pdata[p]['street2CheckCallRaiseDone']: line[63] = 1
|
||||||
line.append(pdata[p]['street3CheckCallRaiseChance'])
|
if pdata[p]['street3CheckCallRaiseChance']: line[64] = 1
|
||||||
line.append(pdata[p]['street3CheckCallRaiseDone'])
|
if pdata[p]['street3CheckCallRaiseDone']: line[65] = 1
|
||||||
line.append(pdata[p]['street4CheckCallRaiseChance'])
|
if pdata[p]['street4CheckCallRaiseChance']: line[66] = 1
|
||||||
line.append(pdata[p]['street4CheckCallRaiseDone'])
|
if pdata[p]['street4CheckCallRaiseDone']: line[67] = 1
|
||||||
line.append(pdata[p]['street0Calls'])
|
if pdata[p]['street0Calls']: line[68] = 1
|
||||||
line.append(pdata[p]['street1Calls'])
|
if pdata[p]['street1Calls']: line[69] = 1
|
||||||
line.append(pdata[p]['street2Calls'])
|
if pdata[p]['street2Calls']: line[70] = 1
|
||||||
line.append(pdata[p]['street3Calls'])
|
if pdata[p]['street3Calls']: line[71] = 1
|
||||||
line.append(pdata[p]['street4Calls'])
|
if pdata[p]['street4Calls']: line[72] = 1
|
||||||
line.append(pdata[p]['street0Bets'])
|
if pdata[p]['street0Bets']: line[73] = 1
|
||||||
line.append(pdata[p]['street1Bets'])
|
if pdata[p]['street1Bets']: line[74] = 1
|
||||||
line.append(pdata[p]['street2Bets'])
|
if pdata[p]['street2Bets']: line[75] = 1
|
||||||
line.append(pdata[p]['street3Bets'])
|
if pdata[p]['street3Bets']: line[76] = 1
|
||||||
line.append(pdata[p]['street4Bets'])
|
if pdata[p]['street4Bets']: line[77] = 1
|
||||||
line.append(pdata[p]['street0Raises'])
|
if pdata[p]['street0Raises']: line[78] = 1
|
||||||
line.append(pdata[p]['street1Raises'])
|
if pdata[p]['street1Raises']: line[79] = 1
|
||||||
line.append(pdata[p]['street2Raises'])
|
if pdata[p]['street2Raises']: line[80] = 1
|
||||||
line.append(pdata[p]['street3Raises'])
|
if pdata[p]['street3Raises']: line[81] = 1
|
||||||
line.append(pdata[p]['street4Raises'])
|
if pdata[p]['street4Raises']: line[82] = 1
|
||||||
|
|
||||||
line.append(gid) # gametypeId
|
line[83] = gid # gametypeId
|
||||||
line.append(pids[p]) # playerId
|
line[84] = pids[p] # playerId
|
||||||
line.append(len(pids)) # activeSeats
|
line[85] = len(pids) # activeSeats
|
||||||
pos = {'B':'B', 'S':'S', 0:'D', 1:'C', 2:'M', 3:'M', 4:'M', 5:'E', 6:'E', 7:'E', 8:'E', 9:'E' }
|
pos = {'B':'B', 'S':'S', 0:'D', 1:'C', 2:'M', 3:'M', 4:'M', 5:'E', 6:'E', 7:'E', 8:'E', 9:'E' }
|
||||||
line.append(pos[pdata[p]['position']])
|
line[86] = pos[pdata[p]['position']]
|
||||||
line.append(pdata[p]['tourneyTypeId'])
|
line[87] = pdata[p]['tourneyTypeId']
|
||||||
line.append(styleKey) # styleKey
|
line[88] = styleKey # styleKey
|
||||||
inserts.append(line)
|
inserts.append(line)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
#along with this program. If not, see <http://www.gnu.org/licenses/>.
|
#along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#In the "official" distribution you can find the license in agpl-3.0.txt.
|
#In the "official" distribution you can find the license in agpl-3.0.txt.
|
||||||
|
|
||||||
|
import L10n
|
||||||
|
_ = L10n.get_translation()
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
import pygtk
|
import pygtk
|
||||||
pygtk.require('2.0')
|
pygtk.require('2.0')
|
||||||
|
@ -22,18 +25,6 @@ import gtk
|
||||||
import os
|
import os
|
||||||
from time import time, strftime
|
from time import time, strftime
|
||||||
|
|
||||||
import locale
|
|
||||||
lang=locale.getdefaultlocale()[0][0:2]
|
|
||||||
if lang=="en":
|
|
||||||
def _(string): return string
|
|
||||||
else:
|
|
||||||
import gettext
|
|
||||||
try:
|
|
||||||
trans = gettext.translation("fpdb", localedir="locale", languages=[lang])
|
|
||||||
trans.install()
|
|
||||||
except IOError:
|
|
||||||
def _(string): return string
|
|
||||||
|
|
||||||
import fpdb_import
|
import fpdb_import
|
||||||
import Database
|
import Database
|
||||||
import Filters
|
import Filters
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
#along with this program. If not, see <http://www.gnu.org/licenses/>.
|
#along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#In the "official" distribution you can find the license in agpl-3.0.txt.
|
#In the "official" distribution you can find the license in agpl-3.0.txt.
|
||||||
|
|
||||||
|
import L10n
|
||||||
|
_ = L10n.get_translation()
|
||||||
|
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
from xml.dom.minidom import Node
|
from xml.dom.minidom import Node
|
||||||
|
|
||||||
|
@ -23,18 +26,6 @@ pygtk.require('2.0')
|
||||||
import gtk
|
import gtk
|
||||||
import gobject
|
import gobject
|
||||||
|
|
||||||
import locale
|
|
||||||
lang=locale.getdefaultlocale()[0][0:2]
|
|
||||||
if lang=="en":
|
|
||||||
def _(string): return string
|
|
||||||
else:
|
|
||||||
import gettext
|
|
||||||
try:
|
|
||||||
trans = gettext.translation("fpdb", localedir="locale", languages=[lang])
|
|
||||||
trans.install()
|
|
||||||
except IOError:
|
|
||||||
def _(string): return string
|
|
||||||
|
|
||||||
import Configuration
|
import Configuration
|
||||||
|
|
||||||
rewrite = { 'general' : 'General', 'supported_databases' : 'Databases'
|
rewrite = { 'general' : 'General', 'supported_databases' : 'Databases'
|
||||||
|
|
|
@ -339,7 +339,7 @@ class GuiRingPlayerStats (GuiPlayerStats.GuiPlayerStats):
|
||||||
#end def createStatsTable
|
#end def createStatsTable
|
||||||
|
|
||||||
def reset_style_render_func(self, treeviewcolumn, cell, model, iter):
|
def reset_style_render_func(self, treeviewcolumn, cell, model, iter):
|
||||||
cell.set_property('foreground', 'black')
|
cell.set_property('foreground', None)
|
||||||
#end def reset_style_render_func
|
#end def reset_style_render_func
|
||||||
|
|
||||||
def ledger_style_render_func(self, tvcol, cell, model, iter):
|
def ledger_style_render_func(self, tvcol, cell, model, iter):
|
||||||
|
|
|
@ -434,7 +434,7 @@ class GuiTourneyPlayerStats (GuiPlayerStats.GuiPlayerStats):
|
||||||
#end def refreshStats
|
#end def refreshStats
|
||||||
|
|
||||||
def reset_style_render_func(self, treeviewcolumn, cell, model, iter):
|
def reset_style_render_func(self, treeviewcolumn, cell, model, iter):
|
||||||
cell.set_property('foreground', 'black')
|
cell.set_property('foreground', None)
|
||||||
#end def reset_style_render_func
|
#end def reset_style_render_func
|
||||||
|
|
||||||
def sortCols(self, col, nums):
|
def sortCols(self, col, nums):
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
|
|
||||||
Main for FreePokerTools HUD.
|
Main for FreePokerTools HUD.
|
||||||
"""
|
"""
|
||||||
|
import L10n
|
||||||
|
_ = L10n.get_translation()
|
||||||
|
|
||||||
# Standard Library modules
|
# Standard Library modules
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
@ -51,21 +54,6 @@ elif sys.platform == 'darwin':
|
||||||
else: # This is bad--figure out the values for the various windows flavors
|
else: # This is bad--figure out the values for the various windows flavors
|
||||||
import WinTables as Tables
|
import WinTables as Tables
|
||||||
|
|
||||||
import locale
|
|
||||||
lang = locale.getdefaultlocale()[0][0:2]
|
|
||||||
print "lang:", lang
|
|
||||||
if lang == "en":
|
|
||||||
def _(string):
|
|
||||||
return string
|
|
||||||
else:
|
|
||||||
import gettext
|
|
||||||
try:
|
|
||||||
trans = gettext.translation("fpdb", localedir="locale", languages=[lang])
|
|
||||||
trans.install()
|
|
||||||
except IOError:
|
|
||||||
def _(string):
|
|
||||||
return string
|
|
||||||
|
|
||||||
# get config and set up logger
|
# get config and set up logger
|
||||||
c = Configuration.Config(file=options.config, dbname=options.dbname)
|
c = Configuration.Config(file=options.config, dbname=options.dbname)
|
||||||
log = Configuration.get_logger("logging.conf", "hud", log_dir=c.dir_log, log_file='HUD-log.txt')
|
log = Configuration.get_logger("logging.conf", "hud", log_dir=c.dir_log, log_file='HUD-log.txt')
|
||||||
|
|
|
@ -49,7 +49,8 @@ class PartyPoker(HandHistoryConverter):
|
||||||
currencies = {"\$": "USD", "$": "USD", u"\xe2\x82\xac": "EUR", u"\u20ac": "EUR", '': "T$"}
|
currencies = {"\$": "USD", "$": "USD", u"\xe2\x82\xac": "EUR", u"\u20ac": "EUR", '': "T$"}
|
||||||
substitutions = {
|
substitutions = {
|
||||||
'LEGAL_ISO' : "USD|EUR", # legal ISO currency codes
|
'LEGAL_ISO' : "USD|EUR", # legal ISO currency codes
|
||||||
'LS' : "\$|\u20AC|\xe2\x82\xac|" # legal currency symbols - Euro(cp1252, utf-8)
|
'LS' : u"\$|\u20ac|\xe2\x82\xac|", # Currency symbols - Euro(cp1252, utf-8)
|
||||||
|
'NUM' : u".,\d",
|
||||||
}
|
}
|
||||||
|
|
||||||
# Static regexes
|
# Static regexes
|
||||||
|
@ -81,7 +82,7 @@ class PartyPoker(HandHistoryConverter):
|
||||||
re_PlayerInfo = re.compile(u"""
|
re_PlayerInfo = re.compile(u"""
|
||||||
Seat\s(?P<SEAT>\d+):\s
|
Seat\s(?P<SEAT>\d+):\s
|
||||||
(?P<PNAME>.*)\s
|
(?P<PNAME>.*)\s
|
||||||
\(\s*[%(LS)s]?(?P<CASH>[0-9,.]+)\s*(?:%(LEGAL_ISO)s|)\s*\)
|
\(\s*[%(LS)s]?(?P<CASH>[%(NUM)s]+)\s*(?:%(LEGAL_ISO)s|)\s*\)
|
||||||
""" % substitutions, re.VERBOSE| re.UNICODE)
|
""" % substitutions, re.VERBOSE| re.UNICODE)
|
||||||
|
|
||||||
re_HandInfo = re.compile("""
|
re_HandInfo = re.compile("""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user