Merge branch 'master' of git://git.assembla.com/fpdboz
This commit is contained in:
commit
35fbeab061
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
# Variable definitions
|
# Variable definitions
|
||||||
VERSION = 0.12
|
VERSION = 0.20
|
||||||
DATE = $(shell date +%Y%m%d)
|
DATE = $(shell date +%Y%m%d)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
|
@ -77,14 +77,15 @@ class PartyPoker(HandHistoryConverter):
|
||||||
re.VERBOSE)
|
re.VERBOSE)
|
||||||
|
|
||||||
re_HandInfo = re.compile("""
|
re_HandInfo = re.compile("""
|
||||||
^Table\s+(?P<TTYPE>[$a-zA-Z0-9 ]+)\s+
|
^Table\s+(?P<TTYPE>[$a-zA-Z0-9 ]+)?\s+
|
||||||
(?: \#|\(|)(?P<TABLE>\d+)\)?\s+
|
(?: \#|\(|)(?P<TABLE>\d+)\)?\s+
|
||||||
(?:[a-zA-Z0-9 ]+\s+\#(?P<MTTTABLE>\d+).+)?
|
(?:[a-zA-Z0-9 ]+\s+\#(?P<MTTTABLE>\d+).+)?
|
||||||
(\(No\sDP\)\s)?
|
(\(No\sDP\)\s)?
|
||||||
\((?P<PLAY>Real|Play)\s+Money\)\s+ # FIXME: check if play money is correct
|
\((?P<PLAY>Real|Play)\s+Money\)\s+ # FIXME: check if play money is correct
|
||||||
Seat\s+(?P<BUTTON>\d+)\sis\sthe\sbutton
|
Seat\s+(?P<BUTTON>\d+)\sis\sthe\sbutton
|
||||||
|
\s+Total\s+number\s+of\s+players\s+\:\s+(?P<PLYRS>\d+)/?(?P<MAX>\d+)?
|
||||||
""",
|
""",
|
||||||
re.VERBOSE|re.MULTILINE)
|
re.VERBOSE|re.MULTILINE|re.DOTALL)
|
||||||
|
|
||||||
re_CountedSeats = re.compile("^Total\s+number\s+of\s+players\s*:\s*(?P<COUNTED_SEATS>\d+)", re.MULTILINE)
|
re_CountedSeats = re.compile("^Total\s+number\s+of\s+players\s*:\s*(?P<COUNTED_SEATS>\d+)", re.MULTILINE)
|
||||||
re_SplitHands = re.compile('\x00+')
|
re_SplitHands = re.compile('\x00+')
|
||||||
|
@ -106,7 +107,6 @@ class PartyPoker(HandHistoryConverter):
|
||||||
def guessMaxSeats(self, hand):
|
def guessMaxSeats(self, hand):
|
||||||
"""Return a guess at max_seats when not specified in HH."""
|
"""Return a guess at max_seats when not specified in HH."""
|
||||||
mo = self.maxOccSeat(hand)
|
mo = self.maxOccSeat(hand)
|
||||||
|
|
||||||
if mo == 10: return mo
|
if mo == 10: return mo
|
||||||
if mo == 2: return 2
|
if mo == 2: return 2
|
||||||
if mo <= 6: return 6
|
if mo <= 6: return 6
|
||||||
|
@ -260,6 +260,7 @@ class PartyPoker(HandHistoryConverter):
|
||||||
for i,v in enumerate(self.collected):
|
for i,v in enumerate(self.collected):
|
||||||
if v[0] in self.pot.returned:
|
if v[0] in self.pot.returned:
|
||||||
self.collected[i][1] = Decimal(v[1]) - self.pot.returned[v[0]]
|
self.collected[i][1] = Decimal(v[1]) - self.pot.returned[v[0]]
|
||||||
|
self.collectees[v[0]] -= self.pot.returned[v[0]]
|
||||||
return origTotalPot()
|
return origTotalPot()
|
||||||
return totalPot
|
return totalPot
|
||||||
instancemethod = type(hand.totalPot)
|
instancemethod = type(hand.totalPot)
|
||||||
|
@ -313,6 +314,9 @@ class PartyPoker(HandHistoryConverter):
|
||||||
if key == 'PLAY' and info['PLAY'] != 'Real':
|
if key == 'PLAY' and info['PLAY'] != 'Real':
|
||||||
# if realy party doesn's save play money hh
|
# if realy party doesn's save play money hh
|
||||||
hand.gametype['currency'] = 'play'
|
hand.gametype['currency'] = 'play'
|
||||||
|
if key == 'MAX' and info[key] is not None:
|
||||||
|
hand.maxseats = int(info[key])
|
||||||
|
|
||||||
|
|
||||||
def readButton(self, hand):
|
def readButton(self, hand):
|
||||||
m = self.re_Button.search(hand.handText)
|
m = self.re_Button.search(hand.handText)
|
||||||
|
|
|
@ -181,7 +181,7 @@ class PokerStars(HandHistoryConverter):
|
||||||
else:
|
else:
|
||||||
info['type'] = 'tour'
|
info['type'] = 'tour'
|
||||||
|
|
||||||
if info['limitType'] == 'fl' and info['bb'] != None and info['type'] == 'ring':
|
if info['limitType'] == 'fl' and info['bb'] is not None and info['type'] == 'ring' and info['base'] != 'stud':
|
||||||
info['sb'] = Lim_Blinds[mg['BB']][0]
|
info['sb'] = Lim_Blinds[mg['BB']][0]
|
||||||
info['bb'] = Lim_Blinds[mg['BB']][1]
|
info['bb'] = Lim_Blinds[mg['BB']][1]
|
||||||
|
|
||||||
|
|
|
@ -2079,8 +2079,7 @@ class Sql:
|
||||||
,100.0*avg((hp.totalProfit+hp.rake)/(gt.bigBlind+0.0)) AS bb100xr
|
,100.0*avg((hp.totalProfit+hp.rake)/(gt.bigBlind+0.0)) AS bb100xr
|
||||||
,avg((hp.totalProfit+hp.rake)/100.0) AS profhndxr
|
,avg((hp.totalProfit+hp.rake)/100.0) AS profhndxr
|
||||||
,avg(h.seats+0.0) AS avgseats
|
,avg(h.seats+0.0) AS avgseats
|
||||||
/*,variance(hp.totalProfit/100.0) AS variance*/
|
,variance(hp.totalProfit/100.0) AS variance
|
||||||
,0.0 AS variance
|
|
||||||
from HandsPlayers hp
|
from HandsPlayers hp
|
||||||
inner join Hands h on (h.id = hp.handId)
|
inner join Hands h on (h.id = hp.handId)
|
||||||
inner join Gametypes gt on (gt.Id = h.gameTypeId)
|
inner join Gametypes gt on (gt.Id = h.gameTypeId)
|
||||||
|
|
|
@ -32,12 +32,16 @@ import gtk
|
||||||
import gobject
|
import gobject
|
||||||
|
|
||||||
# fpdb/free poker tools modules
|
# fpdb/free poker tools modules
|
||||||
|
import Configuration
|
||||||
|
from HandHistoryConverter import getTableTitleRe
|
||||||
|
|
||||||
# get the correct module for the current os
|
# get the correct module for the current os
|
||||||
if os.name == 'posix':
|
if os.name == 'posix':
|
||||||
import XTables as Tables
|
import XTables as Tables
|
||||||
elif os.name == 'nt':
|
elif os.name == 'nt':
|
||||||
import WinTables as Tables
|
import WinTables as Tables
|
||||||
|
|
||||||
|
config = Configuration.Config()
|
||||||
# Main function used for testing
|
# Main function used for testing
|
||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
# c = Configuration.Config()
|
# c = Configuration.Config()
|
||||||
|
@ -82,11 +86,16 @@ if __name__=="__main__":
|
||||||
(tour_no, tab_no) = table_name.split(",", 1)
|
(tour_no, tab_no) = table_name.split(",", 1)
|
||||||
tour_no = tour_no.rstrip()
|
tour_no = tour_no.rstrip()
|
||||||
tab_no = tab_no.rstrip()
|
tab_no = tab_no.rstrip()
|
||||||
table = Tables.Table(None, tournament = tour_no, table_number = tab_no)
|
type = "tour"
|
||||||
|
table_kwargs = dict(tournament = tour_no, table_number = tab_no)
|
||||||
else: # not a tournament
|
else: # not a tournament
|
||||||
print "cash game"
|
print "cash game"
|
||||||
table_name = table_name.rstrip()
|
table_name = table_name.rstrip()
|
||||||
table = Tables.Table(None, table_name = table_name)
|
type = "cash"
|
||||||
|
table_kwargs = dict(table_name = table_name)
|
||||||
|
|
||||||
|
search_string = getTableTitleRe(config, "Full Tilt Poker", type, **table_kwargs)
|
||||||
|
table = Tables.Table(search_string, **table_kwargs)
|
||||||
table.gdk_handle = gtk.gdk.window_foreign_new(table.number)
|
table.gdk_handle = gtk.gdk.window_foreign_new(table.number)
|
||||||
|
|
||||||
print "table =", table
|
print "table =", table
|
||||||
|
|
|
@ -68,7 +68,7 @@ class Table(Table_Window):
|
||||||
window_number = None
|
window_number = None
|
||||||
for listing in os.popen('xwininfo -root -tree').readlines():
|
for listing in os.popen('xwininfo -root -tree').readlines():
|
||||||
if re.search(search_string, listing):
|
if re.search(search_string, listing):
|
||||||
print listing
|
# print listing
|
||||||
mo = re.match('\s+([\dxabcdef]+) (.+):\s\(\"([a-zA-Z.]+)\".+ (\d+)x(\d+)\+\d+\+\d+ \+(\d+)\+(\d+)', listing)
|
mo = re.match('\s+([\dxabcdef]+) (.+):\s\(\"([a-zA-Z.]+)\".+ (\d+)x(\d+)\+\d+\+\d+ \+(\d+)\+(\d+)', listing)
|
||||||
self.number = int( mo.group(1), 0)
|
self.number = int( mo.group(1), 0)
|
||||||
self.width = int( mo.group(4) )
|
self.width = int( mo.group(4) )
|
||||||
|
|
|
@ -152,7 +152,7 @@ setup(
|
||||||
},
|
},
|
||||||
|
|
||||||
# files in 2nd value in tuple are moved to dir named in 1st value
|
# files in 2nd value in tuple are moved to dir named in 1st value
|
||||||
data_files = [('', ['HUD_config.xml.example', 'Cards01.png', 'logging.conf'])
|
data_files = [('', ['HUD_config.xml.example', 'Cards01.png', 'logging.conf', '../docs/readme.txt'])
|
||||||
,(dist_dir, [r'..\run_fpdb.bat'])
|
,(dist_dir, [r'..\run_fpdb.bat'])
|
||||||
,( dist_dir + r'\gfx', glob.glob(r'..\gfx\*.*') )
|
,( dist_dir + r'\gfx', glob.glob(r'..\gfx\*.*') )
|
||||||
# line below has problem with fonts subdir ('not a regular file')
|
# line below has problem with fonts subdir ('not a regular file')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user