diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 9b8f4f08..fb182f4b 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -62,6 +62,7 @@ class Site: self.aux_window = node.getAttribute("aux_window") self.font = node.getAttribute("font") self.font_size = node.getAttribute("font_size") + self.use_frames = node.getAttribute("use_frames") self.layout = {} for layout_node in node.getElementsByTagName('layout'): @@ -189,7 +190,7 @@ class Import: def __init__(self, node): self.interval = node.getAttribute("interval") self.callFpdbHud = node.getAttribute("callFpdbHud") - self.hhArchiveBase = node.getAttribute("hhArchiveBase") + self.hhArchiveBase = node.getAttribute("hhArchiveBase") def __str__(self): return " interval = %s\n callFpdbHud = %s\n hhArchiveBase = %s" % (self.interval, self.callFpdbHud, self.hhArchiveBase) @@ -465,6 +466,9 @@ class Config: paths['hud-defaultPath'] = "default" paths['bulkImport-defaultPath'] = "default" return paths + + def get_frames(self, site = "PokerStars"): + return self.supported_sites[site].use_frames == "True" def get_default_colors(self, site = "PokerStars"): colors = {} @@ -665,4 +669,4 @@ if __name__== "__main__": for game in c.get_supported_games(): print c.get_game_parameters(game) - print "start up path = ", c.execution_path("") \ No newline at end of file + print "start up path = ", c.execution_path("") diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 4e51213f..4c565d44 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -20,88 +20,94 @@ import sys import Configuration from HandHistoryConverter import * +from time import strftime -# Everleaf HH format - -# Everleaf Gaming Game #55208539 -# ***** Hand history for game #55208539 ***** -# Blinds $0.50/$1 NL Hold'em - 2008/09/01 - 13:35:01 -# Table Speed Kuala -# Seat 1 is the button -# Total number of players: 9 -# Seat 1: BadBeatBox ( $ 98.97 USD ) -# Seat 3: EricBlade ( $ 73.96 USD ) -# Seat 4: randy888 ( $ 196.50 USD ) -# Seat 5: BaronSengir ( $ 182.80 USD ) -# Seat 6: dogge ( $ 186.06 USD ) -# Seat 7: wings ( $ 50 USD ) -# Seat 8: schoffeltje ( $ 282.05 USD ) -# Seat 9: harrydebeng ( $ 109.45 USD ) -# Seat 10: smaragdar ( $ 96.50 USD ) -# EricBlade: posts small blind [$ 0.50 USD] -# randy888: posts big blind [$ 1 USD] -# wings: posts big blind [$ 1 USD] -# ** Dealing down cards ** -# Dealt to EricBlade [ qc, 3c ] -# BaronSengir folds -# dogge folds -# wings raises [$ 2.50 USD] -# schoffeltje folds -# harrydebeng calls [$ 3.50 USD] -# smaragdar raises [$ 15.50 USD] -# BadBeatBox folds -# EricBlade folds -# randy888 folds -# wings calls [$ 12 USD] -# harrydebeng folds -# ** Dealing Flop ** [ qs, 3d, 8h ] -# wings: bets [$ 34.50 USD] -# smaragdar calls [$ 34.50 USD] -# ** Dealing Turn ** [ 2d ] -# ** Dealing River ** [ 6c ] -# dogge shows [ 9h, 9c ]a pair of nines -# spicybum shows [ 5d, 6d ]a straight, eight high -# harrydebeng does not show cards -# smaragdar wins $ 102 USD from main pot with a pair of aces [ ad, ah, qs, 8h, 6c ] +# Class for converting Everleaf HH format. class Everleaf(HandHistoryConverter): + + # Static regexes + re_SplitHands = re.compile(r"\n\n+") + re_GameInfo = re.compile(r".*Blinds \$?(?P[.0-9]+)/\$?(?P[.0-9]+) (?P(NL|PL)) (?P(Hold\'em|Omaha|7 Card Stud))") + re_HandInfo = re.compile(r".*#(?P[0-9]+)\n.*\nBlinds \$?(?P[.0-9]+)/\$?(?P[.0-9]+) (?P.*) - (?P\d\d\d\d/\d\d/\d\d - \d\d:\d\d:\d\d)\nTable (?P[- a-zA-Z]+)") + re_Button = re.compile(r"^Seat (?P
[ a-zA-Z]+)\nSeat (?P
[- a-zA-Z]+) (\((?P.+)\) )?- \$?(?P[.0-9]+)/\$?(?P[.0-9]+) (Ante \$(?P[.0-9]+) )?- (?P[a-zA-Z\' ]+) - (?P.*)') + re_Button = re.compile('^The button is in seat #(?P
[- a-zA-Z]+) (\((?P.+)\) )?- \$?(?P[.0-9]+)/\$?(?P[.0-9]+) - (?P[a-zA-Z\' ]+) - (?P.*)') -# self.rexx.setHandInfoRegex('.*#(?P[0-9]+): Table (?P
[ a-zA-Z]+) - \$?(?P[.0-9]+)/\$?(?P[.0-9]+) - (?P.*) - (?P
[0-9]+):(?P[0-9]+) ET - (?P[0-9]+)/(?P[0-9]+)/(?P[0-9]+)Table (?P
[ a-zA-Z]+)\nSeat (?P