git24 - changed config file format to match new way of passing around settings inside the code - will use this to facilitate various code cleanups and a generalised method of dealing with settings
got deep links for windows DL for everything tv option of combined postflop is now exported to profile
This commit is contained in:
parent
488af76f8e
commit
9b737612d0
|
@ -11,6 +11,8 @@ FT=Turn Fold percentage
|
||||||
HD=Hands
|
HD=Hands
|
||||||
PF3B4B=Pre Flop 3Bet or 4Bet
|
PF3B4B=Pre Flop 3Bet or 4Bet
|
||||||
PFR=Pre Flop Raise
|
PFR=Pre Flop Raise
|
||||||
|
Postf A=Postflop (ie. flop+turn+river) Aggression%
|
||||||
|
Postf F=Postflop Fold %
|
||||||
SD/F=Showdown/Flop=WtSD=How often player went to showdown when he saw the flop
|
SD/F=Showdown/Flop=WtSD=How often player went to showdown when he saw the flop
|
||||||
W$wsF=Won $ when he saw flop
|
W$wsF=Won $ when he saw flop
|
||||||
W$@SD=Won $ at showdown
|
W$@SD=Won $ at showdown
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
backend=2
|
db-backend=2
|
||||||
host=localhost
|
db-host=localhost
|
||||||
database=fpdb
|
db-databaseName=fpdb
|
||||||
user=fpdb
|
db-user=fpdb
|
||||||
password=enterYourPwHere
|
db-password=enterYourPwHere
|
||||||
|
tv-combinedPostflop=True
|
||||||
|
|
|
@ -3,12 +3,17 @@ made them in XP Pro, if you discover any differences or problems please let me k
|
||||||
Also see the other install-in-*.txt files.
|
Also see the other install-in-*.txt files.
|
||||||
The length of these instructions is due to MS refusal to provide any kind of package management.
|
The length of these instructions is due to MS refusal to provide any kind of package management.
|
||||||
|
|
||||||
For some packages I've given direct(ish) download links here, for the remainder check requirements.txt.
|
Here are direct download links from 10Aug2008:
|
||||||
|
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.67-win32.zip/from/pick#mirrors
|
||||||
|
http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi
|
||||||
|
http://downloads.sourceforge.net/mysql-python/MySQL-python-1.2.2.win32-py2.5.exe?modtime=1173863337&big_mirror=0
|
||||||
|
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.12/gtk+-bundle-2.12.11.zip
|
||||||
|
http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.4/pycairo-1.4.12-1.win32-py2.5.exe
|
||||||
|
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.14/pygobject-2.14.1-1.win32-py2.5.exe
|
||||||
|
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.12/pygtk-2.12.1-2.win32-py2.5.exe
|
||||||
|
|
||||||
1a. Install MySQL and do its basic setup
|
1a. Install MySQL and do its basic setup
|
||||||
Download Windows ZIP/Setup.exe from http://dev.mysql.com/downloads/mysql/5.0.html#win32
|
- Download Windows ZIP/Setup.exe
|
||||||
Note that there is a link to skip registration/login.
|
|
||||||
As of this writing the latest binary version is 5.0.51b whilst the latest version is 5.0.56... Windows.
|
|
||||||
- Unzip the archive, execute the setup file
|
- Unzip the archive, execute the setup file
|
||||||
At the end make sure you activate that you want to configure it now.
|
At the end make sure you activate that you want to configure it now.
|
||||||
Use the advanced/detailed config. Leave everything as default unless stated below, or unless you have reason not to.
|
Use the advanced/detailed config. Leave everything as default unless stated below, or unless you have reason not to.
|
||||||
|
@ -20,12 +25,11 @@ Once finished it shold confirm "service started successfully"
|
||||||
Then configure a user and create a database.
|
Then configure a user and create a database.
|
||||||
|
|
||||||
2. Install python
|
2. Install python
|
||||||
Go to http://www.python.org/download/ and get the latest Windows installer. As of this writing that is 2.5.2. Double click the .msi file to start installation and follow the prompts.
|
Get the latest Windows installer. As of this writing that is 2.5.2. Double click the .msi file to start installation and follow the prompts.
|
||||||
|
|
||||||
|
|
||||||
3. Install the Python-DBAPI package for MySQL:
|
3. Install the Python-DBAPI package for MySQL:
|
||||||
Go to http://sourceforge.net/project/showfiles.php?group_id=22307 and get the latest version of MySQL-python-*.win32-py2.5.exe
|
Get the package and double click to install.
|
||||||
Double click to install.
|
|
||||||
|
|
||||||
|
|
||||||
4. In MySQL create a new database fpdb and a user by the same name. Set a password. I did this in webmin. Then set permissions for that user to: Select | Insert | Update | Delete | Create | Drop
|
4. In MySQL create a new database fpdb and a user by the same name. Set a password. I did this in webmin. Then set permissions for that user to: Select | Insert | Update | Delete | Create | Drop
|
||||||
|
@ -36,8 +40,7 @@ To use it, create some empty folder like c:\gtk . Using either
|
||||||
Windows Explorer's built-in zip file management, or the command-line
|
Windows Explorer's built-in zip file management, or the command-line
|
||||||
unzip.exe from
|
unzip.exe from
|
||||||
ftp://tug.ctan.org/tex-archive/tools/zip/info-zip/WIN32/unz552xN.exe
|
ftp://tug.ctan.org/tex-archive/tools/zip/info-zip/WIN32/unz552xN.exe
|
||||||
unzip this bundle. (But you presumably already did that, as you are
|
unzip this bundle.
|
||||||
reading this file.)
|
|
||||||
|
|
||||||
Then add the bin folder to your PATH. Make sure you have no other
|
Then add the bin folder to your PATH. Make sure you have no other
|
||||||
versions of GTK+ in PATH.
|
versions of GTK+ in PATH.
|
||||||
|
|
|
@ -3,13 +3,12 @@ todolist (db=database, imp=importer, tv=tableviewer)
|
||||||
before alpha
|
before alpha
|
||||||
============
|
============
|
||||||
fix default pathes up to sensible ones
|
fix default pathes up to sensible ones
|
||||||
get deep links for windows DL for everything
|
|
||||||
GUI license info
|
|
||||||
update regression testing to take into account everything new, make sure it passes all tests
|
update regression testing to take into account everything new, make sure it passes all tests
|
||||||
|
3B/4B might not be recognised nor counted as chance if someone raised after player called.
|
||||||
|
add to install the sql commands to create DB etc.
|
||||||
|
|
||||||
next
|
next
|
||||||
====
|
====
|
||||||
3B/4B might not be recognised nor counted as chance if someone raised after player called.
|
|
||||||
fill steal fields correctly, add to tester and tv
|
fill steal fields correctly, add to tester and tv
|
||||||
CB, 2nd/3rd Barrel, fold to these
|
CB, 2nd/3rd Barrel, fold to these
|
||||||
|
|
||||||
|
@ -21,7 +20,6 @@ why do we have to reconnect in tv.read_names_clicked?
|
||||||
implement error file in importer
|
implement error file in importer
|
||||||
catch index error, type error, file not found error
|
catch index error, type error, file not found error
|
||||||
finish updating filelist
|
finish updating filelist
|
||||||
export combinedPostflop from table_viewer.prepareData to profile
|
|
||||||
use different colours according to classification.
|
use different colours according to classification.
|
||||||
table with data for graphs for SD/F, W$wSF, W$@SD
|
table with data for graphs for SD/F, W$wSF, W$@SD
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ If you can be bothered please do contact your poker site(s) and ask them to rele
|
||||||
Before I start the list a note on the databases, as of git96 I have yet to try using this with PostgreSQL, but if I'm not mistaken it should actually work by now (the stuff in fpdb-python at least).
|
Before I start the list a note on the databases, as of git96 I have yet to try using this with PostgreSQL, but if I'm not mistaken it should actually work by now (the stuff in fpdb-python at least).
|
||||||
|
|
||||||
If you use a package management system (e.g. if you have GNU/Linux or *BSD) just check that you have mysql, mysql-python and pygtk or postgresql, pygresql and pygtk. Your package manager will take care of the rest for you.
|
If you use a package management system (e.g. if you have GNU/Linux or *BSD) just check that you have mysql, mysql-python and pygtk or postgresql, pygresql and pygtk. Your package manager will take care of the rest for you.
|
||||||
|
|
||||||
|
|
||||||
Make new entries in this format:
|
Make new entries in this format:
|
||||||
X. Program Name
|
X. Program Name
|
||||||
|
@ -91,8 +90,8 @@ c. Project Webpage
|
||||||
d. License
|
d. License
|
||||||
LGPL2
|
LGPL2
|
||||||
|
|
||||||
7. PyGObject
|
7. PyCairo
|
||||||
============
|
==========
|
||||||
a. Optional?
|
a. Optional?
|
||||||
Required.
|
Required.
|
||||||
b. Required Version and Why
|
b. Required Version and Why
|
||||||
|
@ -102,8 +101,8 @@ c. Project Webpage
|
||||||
d. License
|
d. License
|
||||||
LGPL2.1
|
LGPL2.1
|
||||||
|
|
||||||
8. PyCairo
|
8. PyGObject
|
||||||
==========
|
============
|
||||||
a. Optional?
|
a. Optional?
|
||||||
Required.
|
Required.
|
||||||
b. Required Version and Why
|
b. Required Version and Why
|
||||||
|
|
|
@ -241,43 +241,33 @@ class fpdb:
|
||||||
self.profile=filename
|
self.profile=filename
|
||||||
|
|
||||||
self.bulk_import_default_path="/work/poker-histories/wine-ps/" #/todo: move this to .conf
|
self.bulk_import_default_path="/work/poker-histories/wine-ps/" #/todo: move this to .conf
|
||||||
|
self.settings={'db-host':"localhost", 'db-backend':2, 'db-databaseName':"fpdb", 'db-user':"fpdb"}
|
||||||
found_backend, found_host, found_database, found_user, found_password=False, False, False, False, False
|
if (os.sep=="/"):
|
||||||
|
self.settings['os']="linuxmac"
|
||||||
|
else:
|
||||||
|
self.settings['os']="windows"
|
||||||
for i in range(len(lines)):
|
for i in range(len(lines)):
|
||||||
if lines[i].startswith("backend="):
|
if lines[i].startswith("db-backend="):
|
||||||
backend=int(lines[i][8:-1])
|
self.settings['db-backend']=int(lines[i][11:-1])
|
||||||
found_backend=True
|
elif lines[i].startswith("db-host="):
|
||||||
elif lines[i].startswith("host="):
|
self.settings['db-host']=lines[i][8:-1]
|
||||||
host=lines[i][5:-1]
|
elif lines[i].startswith("db-databaseName="):
|
||||||
#self.host=host
|
self.settings['db-database']=lines[i][16:-1]
|
||||||
found_host=True
|
elif lines[i].startswith("db-user="):
|
||||||
elif lines[i].startswith("database="):
|
self.settings['db-user']=lines[i][8:-1]
|
||||||
database=lines[i][9:-1]
|
elif lines[i].startswith("db-password="):
|
||||||
#self.database=database
|
self.settings['db-password']=lines[i][12:-1]
|
||||||
found_database=True
|
elif lines[i].startswith("tv-combinedPostflop="):
|
||||||
elif lines[i].startswith("user="):
|
if lines[i].find("True")!=-1:
|
||||||
user=lines[i][5:-1]
|
self.settings['tv-combinedPostflop']=True
|
||||||
found_user=True
|
else:
|
||||||
elif lines[i].startswith("password="):
|
self.settings['tv-combinedPostflop']=False
|
||||||
password=lines[i][9:-1]
|
|
||||||
found_password=True
|
|
||||||
|
|
||||||
if not found_backend:
|
|
||||||
raise fpdb_simple.FpdbError("failed to read backend from settings file:"+filename)
|
|
||||||
elif not found_host:
|
|
||||||
raise fpdb_simple.FpdbError("failed to read host from settings file:"+filename)
|
|
||||||
elif not found_database:
|
|
||||||
raise fpdb_simple.FpdbError("failed to read database from settings file:"+filename)
|
|
||||||
elif not found_user:
|
|
||||||
raise fpdb_simple.FpdbError("failed to read user from settings file:"+filename)
|
|
||||||
elif not found_password:
|
|
||||||
raise fpdb_simple.FpdbError("failed to read password from settings file:"+filename)
|
|
||||||
|
|
||||||
if self.db!=None:
|
if self.db!=None:
|
||||||
self.db.disconnect()
|
self.db.disconnect()
|
||||||
|
|
||||||
self.db = fpdb_db.fpdb_db()
|
self.db = fpdb_db.fpdb_db()
|
||||||
self.db.connect(backend, host, database, user, password)
|
self.db.connect(self.settings['db-backend'], self.settings['db-host'], self.settings['db-databaseName'], self.settings['db-user'], self.settings['db-password'])
|
||||||
#end def load_profile
|
#end def load_profile
|
||||||
|
|
||||||
def not_implemented(self):
|
def not_implemented(self):
|
||||||
|
@ -320,15 +310,16 @@ class fpdb:
|
||||||
"""Displays a tab with the main fpdb help screen"""
|
"""Displays a tab with the main fpdb help screen"""
|
||||||
#print "start of tab_main_help"
|
#print "start of tab_main_help"
|
||||||
mh_tab=gtk.Label("""Welcome to Fpdb!
|
mh_tab=gtk.Label("""Welcome to Fpdb!
|
||||||
For howto information please see docs/readme-user.txt
|
For howto information please see docs"""+os.sep+"""readme-user.txt
|
||||||
This program is licensed under the AGPL3, see docs/agpl-3.0.txt""")
|
The abbrevations in the table viewer are explained in docs"""+os.sep+"""abbrevations.txt
|
||||||
|
This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
|
||||||
self.add_and_display_tab(mh_tab, "main help")
|
self.add_and_display_tab(mh_tab, "main help")
|
||||||
#end def tab_main_help
|
#end def tab_main_help
|
||||||
|
|
||||||
def tab_table_viewer(self, widget, data):
|
def tab_table_viewer(self, widget, data):
|
||||||
"""opens a table viewer tab"""
|
"""opens a table viewer tab"""
|
||||||
#print "start of tab_table_viewer"
|
#print "start of tab_table_viewer"
|
||||||
new_tv_thread=table_viewer.table_viewer(self.db)
|
new_tv_thread=table_viewer.table_viewer(self.db, self.settings)
|
||||||
self.threads.append(new_tv_thread)
|
self.threads.append(new_tv_thread)
|
||||||
tv_tab=new_tv_thread.get_vbox()
|
tv_tab=new_tv_thread.get_vbox()
|
||||||
self.add_and_display_tab(tv_tab, "table viewer")
|
self.add_and_display_tab(tv_tab, "table viewer")
|
||||||
|
|
|
@ -57,12 +57,11 @@ class table_viewer (threading.Thread):
|
||||||
"""prepares the data for display by refresh_clicked, returns a 2D array"""
|
"""prepares the data for display by refresh_clicked, returns a 2D array"""
|
||||||
#print "start of prepare_data"
|
#print "start of prepare_data"
|
||||||
arr=[]
|
arr=[]
|
||||||
combinedPostflop=True #todo: export as option
|
|
||||||
#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", "AF", "FF", "AT", "FT", "AR", "FR", "SD/F", "W$wsF", "W$@SD")
|
tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "AF", "FF", "AT", "FT", "AR", "FR", "SD/F", "W$wsF", "W$@SD")
|
||||||
if (combinedPostflop):
|
if self.settings['tv-combinedPostflop']:
|
||||||
tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "F-R Aggr", "F-R Fold", "SD/F", "W$wsF", "W$@SD")
|
tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "Postf A", "Postf F", "SD/F", "W$wsF", "W$@SD")
|
||||||
else:
|
else:
|
||||||
raise fpdb_simple.FpdbError("reimplement stud")
|
raise fpdb_simple.FpdbError("reimplement stud")
|
||||||
tmp=("Name", "Hands", "VPI3", "A3", "3B4B_3" "A4", "F4", "A5", "F5", "A6", "F6", "A7", "F7", "SD/4")
|
tmp=("Name", "Hands", "VPI3", "A3", "3B4B_3" "A4", "F4", "A5", "F5", "A6", "F6", "A7", "F7", "SD/4")
|
||||||
|
@ -108,7 +107,7 @@ 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
|
||||||
if (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]
|
||||||
foldCount=row[17]+row[19]+row[21]
|
foldCount=row[17]+row[19]+row[21]
|
||||||
|
@ -222,12 +221,13 @@ class table_viewer (threading.Thread):
|
||||||
return self.main_vbox
|
return self.main_vbox
|
||||||
#end def get_vbox
|
#end def get_vbox
|
||||||
|
|
||||||
def __init__(self, db, debug=True):
|
def __init__(self, db, settings, debug=True):
|
||||||
"""Constructor for table_viewer"""
|
"""Constructor for table_viewer"""
|
||||||
self.debug=debug
|
self.debug=debug
|
||||||
#print "start of table_viewer constructor"
|
#print "start of table_viewer constructor"
|
||||||
self.db=db
|
self.db=db
|
||||||
self.cursor=db.cursor
|
self.cursor=db.cursor
|
||||||
|
self.settings=settings
|
||||||
|
|
||||||
self.main_vbox = gtk.VBox(False, 0)
|
self.main_vbox = gtk.VBox(False, 0)
|
||||||
self.main_vbox.show()
|
self.main_vbox.show()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user