git33 - added fields for CB/2B/3B to table design, table creation and tv. importer fills it with placeholder data

renamed ebuild from v0.01 alpha to v1.0 alpha as I won't be using normal version numbers before 1.0
This commit is contained in:
steffen123 2008-08-13 06:50:30 +01:00
parent aecfa6d61b
commit 61d0857a4c
9 changed files with 163 additions and 26 deletions

View File

@ -3,8 +3,7 @@ Everything is subject to change.
alpha2 alpha2
====== ======
add steal reaction to tv CB, 2nd/3rd Barrel, fold to these -> actually calculate them
CB, 2nd/3rd Barrel, fold to these
printhand each and the 2/3 relevant printplayerflags respectively on ps-lhe-ring-successful-steal-by-cutoff.txt and ps-lhe-ring-call-3B-preflop-cb-no2b.txt printhand each and the 2/3 relevant printplayerflags respectively on ps-lhe-ring-successful-steal-by-cutoff.txt and ps-lhe-ring-call-3B-preflop-cb-no2b.txt
auto-import auto-import
seperate and improve instructions for update seperate and improve instructions for update
@ -15,6 +14,10 @@ delete old mailing list and create fpdb-announce
finish updating filelist finish updating filelist
return sng support return sng support
update abbreviations.txt update abbreviations.txt
fix up bg colours in tv
ebuild symlink doesnt work
more automation in the ebuild, update install-in-gentoo.txt, set permissions in it
gentoo ebuild: USE dedicated, USE postgresql, copy docs
alpha3 alpha3
====== ======
@ -24,7 +27,7 @@ show database version error in GUI
before beta before beta
=========== ===========
optionally combine FB/FS optionally combine FB/FS and CB/2B/3B
separate all gui and all processing into files that are named accordingly separate all gui and all processing into files that are named accordingly
ensure that there is only one db handle flying around and that its state is handled properly, ie. by the GUI. i think that might be why we have to reconnect the DB in tableviewer. ensure that there is only one db handle flying around and that its state is handled properly, ie. by the GUI. i think that might be why we have to reconnect the DB in tableviewer.
figure out what slowed it down so much between git19 and git21 (8/9aug) figure out what slowed it down so much between git19 and git21 (8/9aug)
@ -81,7 +84,6 @@ ensure that refresh still takes no more than 10 seks on my P3M-800 (a quick run
select range of stakes and sng/mtt values and types for tv select range of stakes and sng/mtt values and types for tv
change "for i" to more sensible var name instead of i change "for i" to more sensible var name instead of i
recognise somewhere if a file is still active and if so keep it open and only read new hands rather than detecting dupes recognise somewhere if a file is still active and if so keep it open and only read new hands rather than detecting dupes
gentoo ebuild
can wait till 1.x can wait till 1.x
================= =================

View File

@ -1,4 +1,10 @@
alpha2
======
Main new features:
Now reads and displays steal attempts and reaction to them
alpha1 alpha1
======
Hi everyone, Hi everyone,
I am proud to announce the first release of my new poker tracking software fpdb (freepokerdb, very imaginative I know ;) ). You may wonder why I bothered when now with HM and PT3 there are at least two excellent packages to choose from. I am proud to announce the first release of my new poker tracking software fpdb (freepokerdb, very imaginative I know ;) ). You may wonder why I bothered when now with HM and PT3 there are at least two excellent packages to choose from.
@ -9,7 +15,7 @@ Four main reasons:
You still need to run Windows or wine to run the actual poker client though. You still need to run Windows or wine to run the actual poker client though.
4. Fpdb won't irritate you with copy prevention measures. 4. Fpdb won't irritate you with copy prevention measures.
To install it go to https://sourceforge.net/projects/showfiles.php?group_id=226872 and download the zip or tar.bz2, unpack it, and follow the instructions in docs/install-in-* for your operating system (e.g. docs\install-in-windows.txt). Sourceforge lists the release files as source files, not as binary executables - this is correct, python will automagically compile as and when required. To install it go to https://sourceforge.net/project/showfiles.php?group_id=226872 and download the zip or tar.bz2, unpack it, and follow the instructions in docs/install-in-* for your operating system (e.g. docs\install-in-windows.txt). Sourceforge lists the release files as source files, not as binary executables - this is correct, python will automagically compile as and when required.
This is alpha1, as the name indicates it is still at a very early stage. The importer and database are nearing completion but the GUI in particular is not very functional yet and the HUD is missing alltogether. This is alpha1, as the name indicates it is still at a very early stage. The importer and database are nearing completion but the GUI in particular is not very functional yet and the HUD is missing alltogether.

View File

@ -12,18 +12,13 @@ Stud/Razz ring games on PokerStars
================================== ==================================
Broken - used to work, hardly tested. Needs to be updated to new infrastructure using a HudData table rather than hands_players_flags. Will fix this shortly. Broken - used to work, hardly tested. Needs to be updated to new infrastructure using a HudData table rather than hands_players_flags. Will fix this shortly.
A note on No Limit and Pot Limit
================================
Fpdb fully supports NL/PL, however currently only as far as it does limit games. So it'll tell you how often a player has bet, but not how much. But the mate I'm writing this for doesnt play NL/PL (and neither do I) so volunteers would be most welcome.
Tournaments/SnGs Tournaments/SnGs
================ ================
Broken - used to work, hardly tested. Needs to be updated to new infrastructure.. Will probably fix this quite soon. Broken - used to work, hardly tested. Needs to be updated to new infrastructure.. Will probably fix this shortly
Independent of the current brokenness the tourney support would only show information as if a tourney is a ring game - but it's not. If you play tournaments and would like to help improving this let me know, I probably won't bother.
Full Tilt Poker Full Tilt Poker
=============== ===============
Not sure - it should import them, but I believe the table viewer won't work. Would be easy to fix though, volunteers welcome Not sure - it should import them, but I believe the table viewer won't work. Would be easy to fix I think, volunteers welcome. This used to work in a pre-alpha but basically was left behind during updates to the other stuff.
Other Sites Other Sites
=========== ===========

View File

@ -509,6 +509,7 @@ autorates</B></P>
<TD><P>float</P></TD> <TD><P>float</P></TD>
<TD><P>As wonWhenSeenFlop, but for showdown.</P></TD> <TD><P>As wonWhenSeenFlop, but for showdown.</P></TD>
</TR> </TR>
<TR VALIGN=TOP> <TR VALIGN=TOP>
<TD><P>stealAttemptChance</P></TD> <TD><P>stealAttemptChance</P></TD>
<TD><P>int</P></TD> <TD><P>int</P></TD>
@ -539,6 +540,37 @@ autorates</B></P>
<TD><P>int</P></TD> <TD><P>int</P></TD>
<TD><P>Player folded SB to steal attempt</P></TD> <TD><P>Player folded SB to steal attempt</P></TD>
</TR> </TR>
<TR VALIGN=TOP>
<TD><P>contBetChance</P></TD>
<TD><P>int</P></TD>
<TD><P>Player had chance to make continuation bet</P></TD>
</TR>
<TR VALIGN=TOP>
<TD><P>contBetDone</P></TD>
<TD><P>int</P></TD>
<TD><P>Player used chance to make continuation bet</P></TD>
</TR>
<TR VALIGN=TOP>
<TD><P>secondBarrelChance</P></TD>
<TD><P>int</P></TD>
<TD><P>Player had chance to make second barrel bet</P></TD>
</TR>
<TR VALIGN=TOP>
<TD><P>secondBarrelDone</P></TD>
<TD><P>int</P></TD>
<TD><P>Player used chance to make second barrel bet</P></TD>
</TR>
<TR VALIGN=TOP>
<TD><P>thirdBarrelChance</P></TD>
<TD><P>int</P></TD>
<TD><P>Player had chance to make third barrel bet</P></TD>
</TR>
<TR VALIGN=TOP>
<TD><P>thirdBarrelDone</P></TD>
<TD><P>int</P></TD>
<TD><P>Player used chance to make third barrel bet</P></TD>
</TR>
</TABLE> </TABLE>
<P></P> <P></P>
<P><B>Table hands_actions</B></P> <P><B>Table hands_actions</B></P>

View File

@ -0,0 +1,37 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-util/fpdb/fpdb-1.0_alpha1_p27.ebuild,v 1.0 2008/08/13 05:45:00 jer Exp $
NEED_PYTHON=2.3
#inherit distutils
MY_P="fpdb-${PV}"
DESCRIPTION="A database program to track your online poker games"
HOMEPAGE="https://sourceforge.net/projects/fpdb/"
SRC_URI="mirror://sourceforge/fpdb/fpdb-alpha1-git27.tar.bz2"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
#note: I would be very surprised if this doesnt work on other architectures, please send me your experiences
IUSE=""
RDEPEND="virtual/mysql
dev-python/mysql-python
>=x11-libs/gtk+-2.10
dev-python/pygtk"
DEPEND="${RDEPEND}"
src_install() {
DIRINST="${D}usr/share/games/fpdb/"
mkdir -p "${DIRINST}"
cp -R * "${DIRINST}" || die
DIRBIN="${D}usr/bin/games/"
mkdir -p "${DIRBIN}"
#echo "dirs"
#echo "${DIRINST}pyfpdb/fpdb.py"
#echo
ln -s "${DIRINST}pyfpdb/fpdb.py" "${DIRBIN}/fpdb.py" || die
}

View File

@ -347,7 +347,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("delete_event", self.delete_event) self.window.connect("delete_event", self.delete_event)
self.window.connect("destroy", self.destroy) self.window.connect("destroy", self.destroy)
self.window.set_title("Free Poker DB - version: alpha1+, git31") self.window.set_title("Free Poker DB - version: alpha1+, git33")
self.window.set_border_width(1) self.window.set_border_width(1)
self.window.set_size_request(950,400) self.window.set_size_request(950,400)
self.window.set_resizable(True) self.window.set_resizable(True)

View File

@ -47,7 +47,7 @@ class fpdb_db:
try: try:
self.cursor.execute("SELECT * FROM settings") self.cursor.execute("SELECT * FROM settings")
settings=self.cursor.fetchone() settings=self.cursor.fetchone()
if settings[0]!=30: if settings[0]!=33:
print "outdated database version - please recreate tables" print "outdated database version - please recreate tables"
except:# _mysql_exceptions.ProgrammingError: except:# _mysql_exceptions.ProgrammingError:
print "failed to read settings table - please recreate tables" print "failed to read settings table - please recreate tables"
@ -274,14 +274,22 @@ class fpdb_db:
otherRaisedRiverFold INT, otherRaisedRiverFold INT,
wonWhenSeenFlop FLOAT, wonWhenSeenFlop FLOAT,
wonAtSD FLOAT, wonAtSD FLOAT,
stealAttemptChance INT, stealAttemptChance INT,
stealAttempted INT, stealAttempted INT,
foldBbToStealChance INT, foldBbToStealChance INT,
foldedBbToSteal INT, foldedBbToSteal INT,
foldSbToStealChance INT, foldSbToStealChance INT,
foldedSbToSteal INT)""") foldedSbToSteal INT,
self.cursor.execute("INSERT INTO settings VALUES (30);") contBetChance INT,
contBetDone INT,
secondBarrelChance INT,
secondBarrelDone INT,
thirdBarrelChance INT,
thirdBarrelDone INT)""")
self.cursor.execute("INSERT INTO settings VALUES (33);")
self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"Full Tilt Poker\", 'USD');") self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"Full Tilt Poker\", 'USD');")
self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"PokerStars\", 'USD');") self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"PokerStars\", 'USD');")
self.db.commit() self.db.commit()

View File

@ -1249,10 +1249,6 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
wonAtSD=[] wonAtSD=[]
stealAttemptChance=[] stealAttemptChance=[]
stealAttempted=[] stealAttempted=[]
foldBbToStealChance=[]
foldedBbToSteal=[]
foldSbToStealChance=[]
foldedSbToSteal=[]
firstPfRaiseByNo=-1 firstPfRaiseByNo=-1
firstPfRaiserId=-1 firstPfRaiserId=-1
@ -1487,6 +1483,10 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
result['stealAttempted']=stealAttempted result['stealAttempted']=stealAttempted
#after having calculated the above we now do second level calculations, so far just steal attempts. #after having calculated the above we now do second level calculations, so far just steal attempts.
foldBbToStealChance=[]
foldedBbToSteal=[]
foldSbToStealChance=[]
foldedSbToSteal=[]
for player in range (len(player_ids)): for player in range (len(player_ids)):
myFoldBbToStealChance=False myFoldBbToStealChance=False
myFoldedBbToSteal=False myFoldedBbToSteal=False
@ -1515,6 +1515,48 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
result['foldSbToStealChance']=foldSbToStealChance result['foldSbToStealChance']=foldSbToStealChance
result['foldedSbToSteal']=foldedSbToSteal result['foldedSbToSteal']=foldedSbToSteal
#now CB/2B/3B
contBetChance=[]
contBetDone=[]
for player in range (len(player_ids)):
myContBetChance=False
myContBetDone=False
#calc CB
contBetChance.append(myContBetChance)
contBetDone.append(myContBetDone)
result['contBetChance']=contBetDone
result['contBetDone']=contBetDone
#now 2B
secondBarrelChance=[]
secondBarrelDone=[]
for player in range (len(player_ids)):
mySecondBarrelChance=False
mySecondBarrelDone=False
#calc 2b
secondBarrelChance.append(mySecondBarrelChance)
secondBarrelDone.append(mySecondBarrelDone)
result['secondBarrelChance']=secondBarrelDone
result['secondBarrelDone']=secondBarrelDone
#now 3B
thirdBarrelChance=[]
thirdBarrelDone=[]
for player in range (len(player_ids)):
myThirdBarrelChance=False
myThirdBarrelDone=False
#calc 3b
thirdBarrelChance.append(myThirdBarrelChance)
thirdBarrelDone.append(myThirdBarrelDone)
result['thirdBarrelChance']=thirdBarrelDone
result['thirdBarrelDone']=thirdBarrelDone
return result return result
#end def calculateHudImport #end def calculateHudImport
@ -1574,16 +1616,23 @@ def storeHudData(cursor, category, gametypeId, playerIds, hudImportData):
if hudImportData['foldSbToStealChance'][player]: row[28]+=1 if hudImportData['foldSbToStealChance'][player]: row[28]+=1
if hudImportData['foldedSbToSteal'][player]: row[29]+=1 if hudImportData['foldedSbToSteal'][player]: row[29]+=1
if hudImportData['contBetChance'][player]: row[30]+=1
if hudImportData['contBetDone'][player]: row[31]+=1
if hudImportData['secondBarrelChance'][player]: row[32]+=1
if hudImportData['secondBarrelDone'][player]: row[33]+=1
if hudImportData['thirdBarrelChance'][player]: row[34]+=1
if hudImportData['thirdBarrelDone'][player]: row[35]+=1
if doInsert: if doInsert:
#print "playerid before insert:",row[2] #print "playerid before insert:",row[2]
cursor.execute("""INSERT INTO HudDataHoldemOmaha cursor.execute("""INSERT INTO HudDataHoldemOmaha
(gametypeId, playerId, activeSeats, HDs, VPIP, PFR, PF3B4BChance, PF3B4B, sawFlop, sawTurn, sawRiver, sawShowdown, raisedFlop, raisedTurn, raisedRiver, otherRaisedFlop, otherRaisedFlopFold, otherRaisedTurn, otherRaisedTurnFold, otherRaisedRiver, otherRaisedRiverFold, wonWhenSeenFlop, wonAtSD, stealAttemptChance, stealAttempted, foldBbToStealChance, foldedBbToSteal, foldSbToStealChance, foldedSbToSteal) (gametypeId, playerId, activeSeats, HDs, VPIP, PFR, PF3B4BChance, PF3B4B, sawFlop, sawTurn, sawRiver, sawShowdown, raisedFlop, raisedTurn, raisedRiver, otherRaisedFlop, otherRaisedFlopFold, otherRaisedTurn, otherRaisedTurnFold, otherRaisedRiver, otherRaisedRiverFold, wonWhenSeenFlop, wonAtSD, stealAttemptChance, stealAttempted, foldBbToStealChance, foldedBbToSteal, foldSbToStealChance, foldedSbToSteal, contBetChance, contBetDone, secondBarrelChance, secondBarrelDone, thirdBarrelChance, thirdBarrelDone)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""", (row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19], row[20], row[21], row[22], row[23], row[24], row[25], row[26], row[27], row[28], row[29])) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""", (row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19], row[20], row[21], row[22], row[23], row[24], row[25], row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[33], row[34], row[35]))
else: else:
#print "storing updated hud data line" #print "storing updated hud data line"
cursor.execute("""UPDATE HudDataHoldemOmaha cursor.execute("""UPDATE HudDataHoldemOmaha
SET HDs=%s, VPIP=%s, PFR=%s, PF3B4BChance=%s, PF3B4B=%s, sawFlop=%s, sawTurn=%s, sawRiver=%s, sawShowdown=%s, raisedFlop=%s, raisedTurn=%s, raisedRiver=%s, otherRaisedFlop=%s, otherRaisedFlopFold=%s, otherRaisedTurn=%s, otherRaisedTurnFold=%s, otherRaisedRiver=%s, otherRaisedRiverFold=%s, wonWhenSeenFlop=%s, wonAtSD=%s, stealAttemptChance=%s, stealAttempted=%s, foldBbToStealChance=%s, foldedBbToSteal=%s, foldSbToStealChance=%s, foldedSbToSteal=%s SET HDs=%s, VPIP=%s, PFR=%s, PF3B4BChance=%s, PF3B4B=%s, sawFlop=%s, sawTurn=%s, sawRiver=%s, sawShowdown=%s, raisedFlop=%s, raisedTurn=%s, raisedRiver=%s, otherRaisedFlop=%s, otherRaisedFlopFold=%s, otherRaisedTurn=%s, otherRaisedTurnFold=%s, otherRaisedRiver=%s, otherRaisedRiverFold=%s, wonWhenSeenFlop=%s, wonAtSD=%s, stealAttemptChance=%s, stealAttempted=%s, foldBbToStealChance=%s, foldedBbToSteal=%s, foldSbToStealChance=%s, foldedSbToSteal=%s, contBetChance=%s, contBetDone=%s, secondBarrelChance=%s, secondBarrelDone=%s, thirdBarrelChance=%s, thirdBarrelDone=%s
WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s""", (row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19], row[20], row[21], row[22], row[23], row[24], row[25], row[26], row[27], row[28], row[29], row[1], row[2], row[3])) WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s""", (row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19], row[20], row[21], row[22], row[23], row[24], row[25], row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[33], row[34], row[35], row[1], row[2], row[3]))
else: else:
raise FpdbError("todo") raise FpdbError("todo")
#end def storeHudData #end def storeHudData

View File

@ -59,9 +59,12 @@ class table_viewer (threading.Thread):
arr=[] arr=[]
#first prepare the header row #first prepare the header row
if (self.category=="holdem" or self.category=="omahahi" or self.category=="omahahilo"): if (self.category=="holdem" or self.category=="omahahi" or self.category=="omahahilo"):
tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "ST", "FS", "FB", "AF", "FF", "AT", "FT", "AR", "FR", "WtSD", "W$wsF", "W$SD") tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "ST", "FS", "FB", "CB", "2B", "3B")
if self.settings['tv-combinedPostflop']: if self.settings['tv-combinedPostflop']:
tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "ST", "FS", "FB", "Postf A", "Postf F", "WtSD", "W$wsF", "W$SD") tmp+=("Postf A", "Postf F")
else:
tmp+=("AF", "FF", "AT", "FT", "AR", "FR")
tmp+=("WtSD", "W$wsF", "W$SD")
else: else:
raise fpdb_simple.FpdbError("reimplement stud") raise fpdb_simple.FpdbError("reimplement stud")
arr.append(tmp) arr.append(tmp)
@ -106,10 +109,15 @@ class table_viewer (threading.Thread):
tmp.append(self.hudDivide(row[5],row[4])) #VPIP tmp.append(self.hudDivide(row[5],row[4])) #VPIP
tmp.append(self.hudDivide(row[6],row[4])) #PFR tmp.append(self.hudDivide(row[6],row[4])) #PFR
tmp.append(self.hudDivide(row[8],row[7])+" ("+str(row[7])+")") #PF3B4B tmp.append(self.hudDivide(row[8],row[7])+" ("+str(row[7])+")") #PF3B4B
tmp.append(self.hudDivide(row[25],row[24])+" ("+str(row[24])+")") #ST tmp.append(self.hudDivide(row[25],row[24])+" ("+str(row[24])+")") #ST
tmp.append(self.hudDivide(row[29],row[28])+" ("+str(row[28])+")") #FS tmp.append(self.hudDivide(row[29],row[28])+" ("+str(row[28])+")") #FS
tmp.append(self.hudDivide(row[27],row[26])+" ("+str(row[26])+")") #FB tmp.append(self.hudDivide(row[27],row[26])+" ("+str(row[26])+")") #FB
tmp.append(self.hudDivide(row[31],row[30])+" ("+str(row[30])+")") #CB
tmp.append(self.hudDivide(row[33],row[32])+" ("+str(row[32])+")") #2B
tmp.append(self.hudDivide(row[35],row[34])+" ("+str(row[34])+")") #3B
if self.settings['tv-combinedPostflop']: if self.settings['tv-combinedPostflop']:
aggCount=row[13]+row[14]+row[15] aggCount=row[13]+row[14]+row[15]
handCount=row[9]+row[10]+row[11] handCount=row[9]+row[10]+row[11]