Merge branch 'master' of git://git.assembla.com/fpdb-eric
This commit is contained in:
commit
7f1fd2ca38
|
@ -62,6 +62,7 @@ class Site:
|
||||||
self.aux_window = node.getAttribute("aux_window")
|
self.aux_window = node.getAttribute("aux_window")
|
||||||
self.font = node.getAttribute("font")
|
self.font = node.getAttribute("font")
|
||||||
self.font_size = node.getAttribute("font_size")
|
self.font_size = node.getAttribute("font_size")
|
||||||
|
self.use_frames = node.getAttribute("use_frames")
|
||||||
self.layout = {}
|
self.layout = {}
|
||||||
|
|
||||||
for layout_node in node.getElementsByTagName('layout'):
|
for layout_node in node.getElementsByTagName('layout'):
|
||||||
|
@ -466,6 +467,9 @@ class Config:
|
||||||
paths['bulkImport-defaultPath'] = "default"
|
paths['bulkImport-defaultPath'] = "default"
|
||||||
return paths
|
return paths
|
||||||
|
|
||||||
|
def get_frames(self, site = "PokerStars"):
|
||||||
|
return self.supported_sites[site].use_frames == "True"
|
||||||
|
|
||||||
def get_default_colors(self, site = "PokerStars"):
|
def get_default_colors(self, site = "PokerStars"):
|
||||||
colors = {}
|
colors = {}
|
||||||
if self.supported_sites[site].hudopacity == "":
|
if self.supported_sites[site].hudopacity == "":
|
||||||
|
|
|
@ -70,6 +70,13 @@ class Everleaf(HandHistoryConverter):
|
||||||
# Blinds $0.50/$1 PL Omaha - 2008/12/07 - 21:59:48
|
# Blinds $0.50/$1 PL Omaha - 2008/12/07 - 21:59:48
|
||||||
# Blinds $0.05/$0.10 NL Hold'em - 2009/02/21 - 11:21:57
|
# Blinds $0.05/$0.10 NL Hold'em - 2009/02/21 - 11:21:57
|
||||||
# $0.25/$0.50 7 Card Stud - 2008/12/05 - 21:43:59
|
# $0.25/$0.50 7 Card Stud - 2008/12/05 - 21:43:59
|
||||||
|
|
||||||
|
# Tourney:
|
||||||
|
# Everleaf Gaming Game #75065769
|
||||||
|
# ***** Hand history for game #75065769 *****
|
||||||
|
# Blinds 10/20 NL Hold'em - 2009/02/25 - 17:30:32
|
||||||
|
# Table 2
|
||||||
|
|
||||||
structure = "" # nl, pl, cn, cp, fl
|
structure = "" # nl, pl, cn, cp, fl
|
||||||
game = ""
|
game = ""
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@ class Hud:
|
||||||
self.stat_windows[stat_dict[s]['seat']].player_id = stat_dict[s]['player_id']
|
self.stat_windows[stat_dict[s]['seat']].player_id = stat_dict[s]['player_id']
|
||||||
except: # omg, we have more seats than stat windows .. damn poker sites with incorrect max seating info .. let's force 10 here
|
except: # omg, we have more seats than stat windows .. damn poker sites with incorrect max seating info .. let's force 10 here
|
||||||
self.max = 10
|
self.max = 10
|
||||||
self.create(hand, config)
|
self.create(hand, config, stat_dict)
|
||||||
self.stat_windows[stat_dict[s]['seat']].player_id = stat_dict[s]['player_id']
|
self.stat_windows[stat_dict[s]['seat']].player_id = stat_dict[s]['player_id']
|
||||||
|
|
||||||
for r in range(0, config.supported_games[self.poker_game].rows):
|
for r in range(0, config.supported_games[self.poker_game].rows):
|
||||||
|
@ -365,6 +365,7 @@ class Stat_Window:
|
||||||
self.y = y + table.y # x and y are the location relative to table.x & y
|
self.y = y + table.y # x and y are the location relative to table.x & y
|
||||||
self.player_id = player_id # looks like this isn't used ;)
|
self.player_id = player_id # looks like this isn't used ;)
|
||||||
self.sb_click = 0 # used to figure out button clicks
|
self.sb_click = 0 # used to figure out button clicks
|
||||||
|
self.useframes = parent.config.get_frames(parent.site)
|
||||||
|
|
||||||
self.window = gtk.Window()
|
self.window = gtk.Window()
|
||||||
self.window.set_decorated(0)
|
self.window.set_decorated(0)
|
||||||
|
@ -382,10 +383,12 @@ class Stat_Window:
|
||||||
self.frame = []
|
self.frame = []
|
||||||
self.label = []
|
self.label = []
|
||||||
for r in range(self.game.rows):
|
for r in range(self.game.rows):
|
||||||
|
if self.useframes:
|
||||||
self.frame.append([])
|
self.frame.append([])
|
||||||
self.e_box.append([])
|
self.e_box.append([])
|
||||||
self.label.append([])
|
self.label.append([])
|
||||||
for c in range(self.game.cols):
|
for c in range(self.game.cols):
|
||||||
|
if self.useframes:
|
||||||
self.frame[r].append( gtk.Frame() )
|
self.frame[r].append( gtk.Frame() )
|
||||||
self.e_box[r].append( gtk.EventBox() )
|
self.e_box[r].append( gtk.EventBox() )
|
||||||
|
|
||||||
|
@ -393,11 +396,14 @@ class Stat_Window:
|
||||||
self.e_box[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor)
|
self.e_box[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor)
|
||||||
|
|
||||||
Stats.do_tip(self.e_box[r][c], 'stuff')
|
Stats.do_tip(self.e_box[r][c], 'stuff')
|
||||||
# self.grid.attach(self.e_box[r][c], c, c+1, r, r+1, xpadding = 0, ypadding = 0)
|
if self.useframes:
|
||||||
self.grid.attach(self.frame[r][c], c, c+1, r, r+1, xpadding = 0, ypadding = 0)
|
self.grid.attach(self.frame[r][c], c, c+1, r, r+1, xpadding = 0, ypadding = 0)
|
||||||
self.frame[r][c].add(self.e_box[r][c])
|
self.frame[r][c].add(self.e_box[r][c])
|
||||||
|
else:
|
||||||
|
self.grid.attach(self.e_box[r][c], c, c+1, r, r+1, xpadding = 0, ypadding = 0)
|
||||||
self.label[r].append( gtk.Label('xxx') )
|
self.label[r].append( gtk.Label('xxx') )
|
||||||
|
|
||||||
|
if self.useframes:
|
||||||
self.frame[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
|
self.frame[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
|
||||||
self.label[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
|
self.label[r][c].modify_bg(gtk.STATE_NORMAL, parent.backgroundcolor)
|
||||||
self.label[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor)
|
self.label[r][c].modify_fg(gtk.STATE_NORMAL, parent.foregroundcolor)
|
||||||
|
|
|
@ -70,6 +70,13 @@ def do_stat(stat_dict, player = 24, stat = 'vpip'):
|
||||||
###########################################
|
###########################################
|
||||||
# functions that return individual stats
|
# functions that return individual stats
|
||||||
|
|
||||||
|
def totalprofit(stat_dict, player):
|
||||||
|
""" Total Profit."""
|
||||||
|
if stat_dict[player]['net'] != 0:
|
||||||
|
stat = float(stat_dict[player]['net']) / 100
|
||||||
|
return (stat, '$%.2f' % stat, 'tp=$%.2f' % stat, 'totalprofit=$%.2f' % stat, str(stat), 'Total Profit')
|
||||||
|
return ('0', '0', '0', '0', 'Total Profit')
|
||||||
|
|
||||||
def playername(stat_dict, player):
|
def playername(stat_dict, player):
|
||||||
""" Player Name."""
|
""" Player Name."""
|
||||||
return (stat_dict[player]['screen_name'],
|
return (stat_dict[player]['screen_name'],
|
||||||
|
|
|
@ -61,6 +61,7 @@ class Importer:
|
||||||
self.filelist = {}
|
self.filelist = {}
|
||||||
self.dirlist = {}
|
self.dirlist = {}
|
||||||
self.addToDirList = {}
|
self.addToDirList = {}
|
||||||
|
self.removeFromFileList = {} # to remove deleted files
|
||||||
self.monitor = False
|
self.monitor = False
|
||||||
self.updated = {} #Time last import was run {file:mtime}
|
self.updated = {} #Time last import was run {file:mtime}
|
||||||
self.lines = None
|
self.lines = None
|
||||||
|
@ -204,7 +205,12 @@ class Importer:
|
||||||
for dir in self.addToDirList:
|
for dir in self.addToDirList:
|
||||||
self.addImportDirectory(dir, True, self.addToDirList[dir][0], self.addToDirList[dir][1])
|
self.addImportDirectory(dir, True, self.addToDirList[dir][0], self.addToDirList[dir][1])
|
||||||
|
|
||||||
|
for file in self.removeFromFileList:
|
||||||
|
if file in self.filelist:
|
||||||
|
del self.filelist[file]
|
||||||
|
|
||||||
self.addToDirList = {}
|
self.addToDirList = {}
|
||||||
|
self.removeFromFileList = {}
|
||||||
|
|
||||||
# This is now an internal function that should not be called directly.
|
# This is now an internal function that should not be called directly.
|
||||||
def import_file_dict(self, file, site, filter):
|
def import_file_dict(self, file, site, filter):
|
||||||
|
@ -251,9 +257,15 @@ class Importer:
|
||||||
if (file=="stdin"):
|
if (file=="stdin"):
|
||||||
inputFile=sys.stdin
|
inputFile=sys.stdin
|
||||||
else:
|
else:
|
||||||
|
if os.path.exists(file):
|
||||||
inputFile = open(file, "rU")
|
inputFile = open(file, "rU")
|
||||||
try: loc = self.pos_in_file[file]
|
else:
|
||||||
except: pass
|
self.removeFromFileList[file] = True
|
||||||
|
return (0, 0, 0, 1, 0)
|
||||||
|
try:
|
||||||
|
loc = self.pos_in_file[file]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# Read input file into class and close file
|
# Read input file into class and close file
|
||||||
inputFile.seek(loc)
|
inputFile.seek(loc)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user