diff --git a/docs/abbreviations.txt b/docs/abbreviations.txt
index 9e7edd16..115baaa8 100644
--- a/docs/abbreviations.txt
+++ b/docs/abbreviations.txt
@@ -1,6 +1,5 @@
-In utility output and HUD
-=========================
-CLI=Command Line Interface (Shell, Terminal, "DOS-window")
+HUD/table viewer
+================
A3-7=3rd-7th street Complete/Raise percentage
AF=Flop Bet/Raise percentage
AT=River Bet/Raise percentage
@@ -9,17 +8,25 @@ F3-7=3rd-7th street Fold percentage
FF=Flop Fold percentage
FR=River Fold percentage
FT=Turn Fold percentage
-FTP=Full Tilt Poker
-GUI=Graphical User Interface (normal interface with buttons and menus)
HD=Hands
-HUD=Heads-Up Display (shows stats directly in the poker software)
-MTT=Multi Table Tournament
+PF3B4B=Pre Flop 3Bet or 4Bet
PFR=Pre Flop Raise
-PS=PokerStars
-SnG=Sit and Go
+SD/F=Showdown/Flop=WtSD=How often player went to showdown when he saw the flop
+W$wsF=Won $ when he saw flop
+W$@SD=Won $ at showdown
VPI3=Voluntary Put In on 3rd Street (ie. call+complete+raise)
VPIP=Voluntary Put In Preflop (ie. call+raise)
+Other
+=====
+CLI=Command Line Interface (Shell, Terminal, "DOS-window")
+FTP=Full Tilt Poker
+GUI=Graphical User Interface (normal interface with buttons and menus)
+HUD=Heads-Up Display (shows stats directly in the poker software)
+PS=PokerStars
+MTT=Multi Table Tournament
+SnG=Sit and Go
+
License
=======
Trademarks of third parties have been used under Fair Use or similar laws.
diff --git a/docs/codingstyle.txt b/docs/codingstyle.txt
index 2fc578e9..31c113f9 100644
--- a/docs/codingstyle.txt
+++ b/docs/codingstyle.txt
@@ -1,6 +1,6 @@
This is just a loose collection of things so far, but might as well make a start :)
-A word on wrapping: Please avoid making manual line breaks, the computer can and therefore should do it. Whether people use a phone or a 40" super-uber-HD screen, they should be allowed to use as much of it as they wish to.
+A word on wrapping: Please avoid making manual line breaks, the computer can and therefore should do it. Whether people use a phone or a 40" super-uber-HD screen, they should be allowed to use as much of it as they wish/can. Incidentially, if anyone knows how to activate line wrap in Eclipse I'd really appreciate if you let me know.
Comments (or prints) with todo are things that are missing, bugs, or just messy code.
@@ -11,6 +11,8 @@ If you don't mind make names in java style, ie.:
Classes, files or tables like this: MyClassName
Methods and variables like this: myMethodName
+I'll eventually change all my code to that style, too.
+
License
=======
Trademarks of third parties have been used under Fair Use or similar laws.
diff --git a/docs/filelist.txt b/docs/filelist.txt
index bf65ca39..15e9361a 100644
--- a/docs/filelist.txt
+++ b/docs/filelist.txt
@@ -1,13 +1,13 @@
-todo: update filelist.txt
+This is partially outdated
File list
=========
.:
docs/ Documentation files
-importer/ Directory with the importer (in python)
+pyfpdb/ The main program (in python)
setup/ Directory with files for setting up this program
-testdata/ Directory with test data
-utils/ A good abbreviation for "all the crap that doesn't fit in anywhere else"
+regression-test/ Directory with test data, query scripts (in python) and the regression test script (in bash)
+utils/ A couple of things that will migrate to the main prog soon
viewer/ Directory with the GUI (in Java)
./docs:
@@ -20,12 +20,13 @@ filelist.txt This file
howto-import.txt Instructions on how to run the importer
install-in-gentoo.txt Installation instructions for Gentoo GNU/Linux
install-in-windows.txt Installation instructions for Windows
-readme.txt This file
-status.txt Details of support for poker sites
-tabledesign.odt The table design master (OpenDocument file, MS Office needs plugin)
-tabledesign.html Table design copy (HTML file)
+readme-dev.txt Some notes, pointers and such for developers or anyone else interested in changing fpdb
+readme-overview.txt Some general info about this program - read that first
+readme-user.txt Instructions on how to use fpdb
+status.txt Details of support for poker types and sites
+tabledesign.html Table design with comments
-./importer:
+./pyfpdb:
fpdb.py The main GUI. This is what the user will start and use to access the other things.
fpdb_import.py Main import program. Calls methods in the other files.
Takes one hand history file as input. This is the file
diff --git a/docs/install-in-gentoo.txt b/docs/install-in-gentoo.txt
index b9f646e2..684ccacd 100644
--- a/docs/install-in-gentoo.txt
+++ b/docs/install-in-gentoo.txt
@@ -28,7 +28,7 @@ Copy the .conf file from this directory to ~/.fpdb/profiles/default.conf and edi
3. Guided installation steps
Run the GUI as described in readme-user and click the menu database -> recreate tables
-That's it!
+That's it! Now see readme-user.txt for usage instructions.
License
diff --git a/docs/install-in-windows.txt b/docs/install-in-windows.txt
index b7939f94..69267fb8 100644
--- a/docs/install-in-windows.txt
+++ b/docs/install-in-windows.txt
@@ -13,17 +13,18 @@ As of this writing the latest binary version is 5.0.51b whilst the latest versio
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.
Make sure to DEACTIVATE TCP/IP networking, unless you want that and know how to secure it
- Activate "include bin directory in windows PATH"
Set a root password. Note that this is not the account/pw that fpdb will use.
Once finished it shold confirm "service started successfully"
+Then configure a user and create a database.
+
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.
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-1.2.2.win32-py2.5.exe
+Go to http://sourceforge.net/project/showfiles.php?group_id=22307 and get the latest version of MySQL-python-*.win32-py2.5.exe
Double click to install.
@@ -49,13 +50,7 @@ Right click on "My Computer" ("Arbeitsplatz" in German Windows) on the Desktop o
Now edit the file, in particular you will always have to type in the correct password (insecure, I know) and if you differ from the default setup you may need to change host, database or user.
-8. Open a shell (aka command prompt, aka DOS window) and go to the fpdb-python folder and run fpdb.py, e.g.:
-c:
-cd \fpdb\fpdb-python
-python fpdb.py
-
-You can run this by double click, but then any error message would be lost.
-
+8. Double click fpdb.py in the pyfpdb folder of where you downloaded/unpacked it to.
When the program started open the menu Database and click "Create or Recreate Tables".
That's it! Now you can use the bulk importer and the table viewer, more's coming. See readme-user.txt
diff --git a/docs/known-bugs-and-planned-features.txt b/docs/known-bugs-and-planned-features.txt
index 3c0186ab..c7488f17 100644
--- a/docs/known-bugs-and-planned-features.txt
+++ b/docs/known-bugs-and-planned-features.txt
@@ -3,27 +3,32 @@ todolist (db=database, imp=importer, tv=tableviewer)
before alpha
============
fix default pathes up to sensible ones
-catch index error, type error, file not found error
-update install instructions, include how to adapt default config and where to put it
-add instructions how to reimport
-split python requirements, get deep links for windows DL for everything
+get deep links for windows DL for everything
GUI license info
-
-add fpdb version string into db to detect outdated db format and importer bugs
update regression testing to take into account everything new, make sure it passes all tests
-implement error file in importer
next
====
-ST, CB, 2B, 3B, fold to these
-optionally show single postflop agg/fold rate
+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
+CB, 2nd/3rd Barrel, fold to these
+
+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.
+figure out what slowed it down so much between git19 and git21 (8/9aug)
auto-import
+why do we have to reconnect in tv.read_names_clicked?
+implement error file in importer
+catch index error, type error, file not found error
+finish updating filelist
+optionally show single postflop agg/fold rate
use different colours according to classification.
-add stud, razz and tourney back to imp/tv but with less seperate codepathes
table with data for graphs for SD/F, W$wSF, W$@SD
before beta
===========
+add stud, razz and tourney back to imp/tv but with less seperate codepathes
+offer not storing db password
change definition of bet to exclude bring in?
in tv, select from hud table using named fields rather than the current *
remove remains of mysql/myisam support.
@@ -49,7 +54,8 @@ verify at least 2 or 3 sng hands
no rush but before 1.0RC
========================
-In many places there are unnecessary database accesses or it regenerates information it already had before or just generally does things in obscenely inefficient ways. It's great to have a total of 3 CPUs with a combined 5.6GHz working for you isn't it... ;) In any case, these should be optimised to leave more power for other things, such as dropping to lower power states
+In many places there are unnecessary database accesses or it regenerates information it already had before or just generally does things in obscenely inefficient ways. Optimise this
+multi-select in bulk importer
move version into seperate file
make option to use "traditional" labels, e.g. WtSD instead of SD/F
HTMLify docs and validate them
@@ -68,9 +74,6 @@ select range of stakes and sng/mtt values and types for tv
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
gentoo ebuild
-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.
-why do we have to reconnect in tv.read_names_clicked?
can wait till 1.x
=================
diff --git a/docs/readme-dev.txt b/docs/readme-dev.txt
index ee578f46..6a346dda 100644
--- a/docs/readme-dev.txt
+++ b/docs/readme-dev.txt
@@ -10,7 +10,8 @@ What to do?
- There's a list of various bugs, deficiencies and important missing features in known_bugs_and_planned_features.txt.
- In the main GUI there's various menu points marked with todo - all of these will have to be done eventually.
-If you want to take a look at coding-style.txt and git-instructions.txt or feel free to send patches or even just changed file in whatever code layout or naming convention you like best. I will, of course, still give you full credit.
+If you want to take a look at coding-style.txt.
+Ideally use git (see git-instructions.txt for some commands) and let me know where to pull from, alternatively feel free to send patches or even just changed file in whatever code layout or naming convention you like best. I will, of course, still give you full credit.
Contact/Communication
=====================
@@ -18,16 +19,17 @@ Please see readme-overview
Dependencies
============
-Since all real OS' have easy built in handling for dependencies feel free to add requirements on new libraries etc. Unfortunately due to the reality of the online poker market (namely the complete absence of clients for free/libre systems) it doesn't make sense to write this without supporting Windows so all dependencies must have a source-compatible Windows version. Please ensure to list any new deps in requirements.txt or let me know.
+Since all real OSs have easy built in handling for dependencies feel free to add requirements on new libraries etc. Unfortunately due to the reality of the online poker market (namely the complete absence of clients for free/libre systems) it doesn't make sense to write this without supporting Windows so all dependencies must have a source-compatible Windows version. Please ensure to list any new deps in requirements.txt or let me know.
Code/File/Class Structure
=========================
Basically the code runs like this
fpdb.py -> bulk importer tab (import_threaded.py) -> fpdb_import.py -> fpdb_parse_logic.py -> fpdb_save_to_db.py
- -> table viewer tab (table_viewer.py)
+or
+fpdb.py -> table viewer tab (table_viewer.py) (todo: -> libTableViewer)
-All files can call the simple methods that I just collected in fpdb_simple.py, in essence to reduce the other files mostly to high-level calls that direct the execution flow.
+All files call the simple methods that I just collected in fpdb_simple.py, to abstract the other files off the nitty gritty details as I was learning python.
I'm currently working on (amongst other things) integrating everything into the fpdb.py GUI with a view to allow easy creation of a CLI client, too.
Also see filelist.txt.
@@ -48,7 +50,7 @@ Preferred: Where possible simple text-based formats, e.g. plain text (with Unix
Also good: Other free and open formats, e.g. ODF.
-Not good: Any format that doesn't have full documentation freely and publicly available with a full license for anyone to implement it. Sadly, Microsoft has chosen not fulfil these requirements for ISO MS OOXML to become a truly open standard.
+Not good: Any format that doesn't have full documentation freely and publicly available with a proper license for anyone to implement it. Sadly, Microsoft has chosen not fulfil these requirements for ISO MS OOXML to become a truly open standard.
License (of this file)
=======
diff --git a/docs/readme-overview.txt b/docs/readme-overview.txt
index 56e97f14..5d610325 100644
--- a/docs/readme-overview.txt
+++ b/docs/readme-overview.txt
@@ -17,7 +17,7 @@ At the end of the day this comes down to a question of trust, but unlike Windows
- Verify the source code yourself.
- Convince or pay someone to verify the source code for you.
- Use a personal firewall to completely block fpdb from the Internet
-- (for the uber-paranoid) Get yourself the virtualisation software VirtualBox, set up a VM (virtual machine) to run fpdb but run the poker software on your real PC. Then cut the VM off the Internet, fpdb doesn't need it. If you have a PC made in the last few years this should run fast enough as well. Note that most Windows licenses do NOT permit you to use two Windows installations at once, even if they are on the same PC.
+- (for the uber-paranoid) Get yourself the free virtualisation software VirtualBox, set up a VM (virtual machine) to run fpdb but run the poker software on your real PC. Then cut the VM off the Internet, fpdb doesn't need it. If you have a PC made in the last few years this should run fast enough as well. Note that most Windows licenses do NOT permit you to use two Windows installations at once, even if they are on the same PC.
Installing
==========
@@ -42,11 +42,11 @@ its too slow let me know and I'll see what I can do :)
Contact
=======
-Please contact me directly using one of the below (quickest response will be by jabber/xmpp/google talk) until I have setup Savannah.
-mail: steffen(at)sycamoretest.info
-jabber/xmpp/Google Talk: as above
-ICQ: 7806355
-MSN: steffenjf@gmx.de (don't email that)
+- email steffen@sycamoretest.info
+- jabber/xmpp/google talk to steffen@sycamoretest.info
+- create a ticket in the ticketing system of assembla
+- ICQ 7806355
+- MSN steffenjf@gmx.de (don't email here)
Why Free Software?
==================
@@ -58,8 +58,8 @@ With free/libre software (also known as open source software, or short FOSS or F
(note: the legally binding terms are in the license text, this is merely an amateur summary so normal people don't have to read pages of legalese)
Freedom 0: The freedom to use: To run the program, for any purpose. Free of Charge.
-Freedom 1: The freedom to study and help yourself. This freedom guarantees your right to study and learn from the source code of the program, and to fix it if it is broken. If you're not a programmer yourself the developers will generally be happy to fix it for you. Failing that you can always pay someone from the money you saved on not having to pay for it.
-Freedom 2: The freedom to be a decent human being and help your neighbour: I don't threaten you with criminal charges or jail time if you share with your friends and neighbours, subject to the very modest restrictions of the AGPL3.
+Freedom 1: The freedom to study and help yourself. This freedom guarantees your right to study and learn from the source code of the program, and to fix it if it is broken. If you're not a programmer yourself the developers will generally be happy to fix it for you, often even for free. Failing that you can always pay someone from the money you saved on not having to pay for it.
+Freedom 2: The freedom to be a decent human being and help your neighbour: I don't threaten you with lawsuits or jail time if you share with your friends and neighbours, subject to the very modest restrictions of the AGPL3.
Freedom 3: The freedom to improve the program and release your improvements to the public (or parts thereof) so that the whole community benefits. Note that you are PERMITTED, but not REQUIRED to distribute your changes. If you do distribute your changes you must do so under the terms of the AGPL3 however.
Note that this is the license - I retain full copyright over my code, including the right to change the license for future versions. I do not intend to do this however. In any case, any version I released under AGPL3 remains available under that license forever, or more accurately until my copyright expires at which point it goes into the public domain.
diff --git a/docs/readme-user.txt b/docs/readme-user.txt
index 7ae81cb6..6d3d1f76 100644
--- a/docs/readme-user.txt
+++ b/docs/readme-user.txt
@@ -2,31 +2,32 @@ Before you do this make sure you setup the dependencies, the database, user, tab
Running it
==========
-If you have python setup properly you can execute it by double clicking fpdb-python/fpdb.py.
+If you have python setup properly you can execute it by double clicking pyfpdb/fpdb.py.
-Note however that all error messages are currently only printed if you call it from a shell. It'll be much easier to diagnose possible problems (which are likely in alpha stage) if you run it from a shell. To do that open a shell (aka command prompt aka DOS window aka terminal) and run the following commands.
-For *nix, e.g. if its in /home/sycamore/fpdb/:
-cd /home/sycamore/fpdb/fpdb-python
+Note however that all error messages are currently only printed if you call it from a shell. It'll be much easier to diagnose possible problems (which are likely in alpha stage) if you run it from a shell. In Windows XP it seems to automatically open a shell window with the fpdb window where you can see the command line output.
+
+In Linux/MacOS/*BSD, e.g. if its in /home/sycamore/fpdb/, do this:
+cd /home/sycamore/fpdb/pyfpdb
python fpdb.py
-In Windows, e.g. if its in C:\Program Files\fpdb
-C:
-cd "\Program Files\fpdb\fpdb-python\"
-python fpdb.py
That will start the main GUI.
-Have a look at the menues, the stuff that is marked todo is not yet implemented.
+Have a look at the menus, the stuff that is marked todo is not yet implemented.
The main things are the bulk importer and the table viewer. To use the importer open it from the menu (import files and directories). You can set a few options at the bottom, then select a folder or single file in the main are and click Import. Please report any errors by one of the contacts listed in readme-overview.txt.
Currently this will block the interface, but you can open another instance of this program e.g. if you wanna play whilst a big import is running.
-To use the table viewer open it from the menu, select the hand history file of the table you're at, and click the Import&Read&Refresh button. The abbreviations there are explained in abbreviations.txt, but feel free to ask.
-
Please check the output at the shell for errors, if there are any please get in touch by one of the methods listed in readme-overview.txt
-Please let us know whether you like this software :)
-Contacts are listed in readme-overview or email steffen@sycamoretest.info
+Table Viewer (tv)
+=================
+To use the table viewer open it from the menu, select the hand history file of the table you're at, and click the Import&Read&Refresh button. The abbreviations there are explained in abbreviations.txt, but feel free to ask. Note that most poker software will only create the file once the first hand you payed to play is finished.
+In each column there is either just the number (hand count for current stake, range of seats and type of game) or a percentage and the number of hands that this percentage is based on. For example, in W$@SD (won $ at shodown) the number in brackets is how many showdowns that player has seen.
+
+Reimporting
+===========
+Currently on most updates a reimport of the whole database is required. To do this open fpdb, click the menu Database and select Create/Recreate tables. Then import all your history files again.
License
=======
diff --git a/docs/release-notes.txt b/docs/release-notes.txt
index 58d800b0..f8de5bcb 100644
--- a/docs/release-notes.txt
+++ b/docs/release-notes.txt
@@ -1,30 +1,27 @@
-v0.01(alpha) draft (ie. minimum requirements for alpha1)
+alpha1 draft (ie. minimum requirements for alpha1)
Hi everyone,
-we are proud to announce the first release of our new poker tracking software fpdb (freepokerdb, very imaginative I know ;) ). You may wonder why we 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.
Three main reasons:
-1. Fpdb is free/libre open source software. In short, this means you don't depend on us if sth. is wrong or you want something more in this program as you can freely change it yourself. You also don't have to pay anything for it. If you like it and think we deserve to be paid contact us :)
-2. HM and PT3 only support holdem. Fpdb (initially) supports Holdem, Omaha, Razz and Stud including Hi/Lo versions.
-3. HM and PT3 run on Windows only, and for me at least did not work in wine even after installing Mono. Fpdb runs natively on any plattform that has the required software, which will cover roundabout 99.9% of PCs that are in use ;)
+1. Fpdb is free/libre open source software. In short, this means you don't depend on me if sth. is wrong or you want something more in this program as you can freely change it yourself. You also don't have to pay anything for it. If you like it and think I deserve to be paid just drop me a mail ;)
+2. HM and PT3 only support holdem. Fpdb (initially) supports Holdem and Omaha, with Stud and Razz mostly implemented
+3. HM and PT3 run on Windows only, and for me at least did not work in wine even after installing Mono. Fpdb runs natively on any plattform that has the required software, which will cover roundabout 99.9% of PCs.
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, e.g. HM will require re-activation after some types of partition change. To be fair I should add that the support is fast, friendly and helpful. Nevertheless I just don't appreciate being hassled AFTER I pay.
+4. Fpdb won't irritate you with copy prevention measures, e.g. HM will require re-activation after some types of partition change. To be fair I should add that the support is fast, friendly and helpful. Nevertheless I for one just don't appreciate being hassled AFTER I pay.
-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 altogether. However the difficult bit (getting it all to work nicely together) for v1 is done, now we "just" need to add lots and lots of options, testing and output.
+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. Except for the HUD most of the infrastructure is in place though, now I "just" need to add all the bells and whistles and tune it.
Current feature list:
Interface
=========
- Central interface programs with tabs (similar to Azureus classic)
-- Follows convention on how things are arranged and what they look like.
+- Follows (ish) convention on how things are arranged and what they look like.
- Works equally in *nix and Windows (tested on Gentoo GNU/Linux, MacOSX and WinXP)
-- Command line interface planned
-- DB setup from inside the GUI
- Bulk importer for single files, multiple files, or directories (incl recursion)
- Auto-importer
-- Multi-threaded - running the importer doesn't freeze the view tabs and they don't freeze each other either (blocker for beta)
-- Profiles (to store different settings)
-- HUD (would be nice for alpha but not a blocker for release)
+- Profiles (to store different settings - profile path currently hardcoded as the load_profile function is broken)
+- Interface freezes whilst importing, but if you want to start using it whilst a big import is running just start another instance.
Backend, Distribution
=====================
@@ -33,26 +30,27 @@ Backend, Distribution
Site/Game Support
=================
-- Initially only full support for PS, ring games also work in FTP.
-- Supports Holdem, Omaha, Razz and Stud including Hi/Lo split where applicable
+- Initially only full support for PS, FTP will be supported soon
+- Supports Holdem, Omaha Hi and Omaha Hi/Lo
- Supports No Limit, Pot Limit, Fixed Limit NL, Cap NL and Cap PL
Note that currently it does not display extra stats for NL/PL so usefulness is limited for these limit types. Suggestions welcome, I don't play these.
-- Supports ring/cash games as well as SnG and MTT tourneys
+- Supports ring/cash games, SnG/MTT will be supported soon
-- Tableviewer (tv) interface to the database. The application is currently single-threaded (though the backend DB doesn't have to be) but I will fix that. Until then you can just open the interface twice, once for import and once for tv. Tv takes a history filename and loads the appropriate players' stats and displays them in a tabular format. These stats currently are:
- - VPIP, PFR, Steal from SB, Steal from BTN, Steal from CO, Avg Steal
- - average bet size for NL/PL (blocker for beta)
- - 3/4B, 2B, Raise and Fold % on flop, turn and river.
- - Aggr % if everyone folded to player in final position of round
- - Number of hands this is based on.
- - Equivalent functions for Razz/Stud
+- Tableviewer (tv) interface to the database. The application is currently single-threaded but I will fix that, in the meantime just start the interface multiple times. Tv takes a history filename and loads the appropriate players' stats and displays them in a tabular format. These stats currently are:
+ - VPIP, PFR and Preflop 3B/4B (3B/4B is not quite correct I think)
+ - Raise and Fold % on flop, turn and river. Fold only counts hands when someone raised.
+ - Number of hands this is based on.
+ - SD/F (aka WtSD, proportion of hands where player went to showdown after seeing flop)
+ - W$wSF (Won $ when seen Flop)
+ - W$@SD (Won $ at showdown)
+ For all stats it also displays how many hands this particular is based on
- You can edit/add whatever you like, it's all python and SQL. The code should be fairly straightforward I think and I put some notes into readme-dev.txt but feel free to ask.
-If you can live with alpha/beta software please give this a go and send any feedback, feature requests, bug reports and animal names to steffen@sycamoretest.info. Of course support and feature requests with patches or payment offers will be prioritised.
+If you can live with alpha software please give this a go and send any feedback, feature requests/suggestions, bug reports and animal names to steffen@sycamoretest.info or pick one of the contact methods listed in readme-overview.txt or reply to this post.
-IMPORTANT: The database format will undergo more changes and at this point I am not planning to write a converter so please keep your history files so you can re-import when necessary. Independent of this you should always keep the original raw files in a save place with any tracking software.
+IMPORTANT: The database format will undergo more changes and at this point I am not planning to write a converter so please keep your history files so you can re-import when necessary. Independent of this you should always keep the original raw files in a safe place with any tracking software.
License
diff --git a/docs/requirements.txt b/docs/requirements.txt
index a28b3ff7..7f066744 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -6,6 +6,8 @@ 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).
+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:
X. Program Name
@@ -89,15 +91,36 @@ c. Project Webpage
d. License
LGPL2
-7. PyGTK
+7. PyGObject
+============
+a. Optional?
+ Required.
+b. Required Version and Why
+ ?
+c. Project Webpage
+ main: http://www.pygtk.org
+d. License
+ LGPL2.1
+
+8. PyCairo
+==========
+a. Optional?
+ Required.
+b. Required Version and Why
+ ?
+c. Project Webpage
+ main: http://www.pygtk.org
+d. License
+ LGPL2.1
+
+9. PyGTK
========
a. Optional?
Required.
b. Required Version and Why
- I use 2.12.0 but it should run with 2.10. That is needed as I used AccelMap.
+ ?
c. Project Webpage
main: http://www.pygtk.org
- Note for Windows: Due to the lack of package management you have to manually get PyGTK's dependencies (PyCairo and PyGobject).
d. License
LGPL2.1
diff --git a/docs/tabledesign.html b/docs/tabledesign.html
index dff5e003..9b66579c 100644
--- a/docs/tabledesign.html
+++ b/docs/tabledesign.html
@@ -22,8 +22,19 @@ Copyright 2008 Steffen Jobbagy-Felso
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 as published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license can be found in fdl-1.2.txt
The program itself is licensed under AGPLv3, see agpl-3.0.txt
See readme.txt for copying
-
-
Table settings
+Field name |
+ Type |
+ Comment |
+
version |
+ smallint |
+ the git version of the database (ie. table design changes and major bugfixes require a bump) |
+
Table players
references sites.id |
|||||
- comment - |
-
- text - |
-
-
|
+ comment |
+ text |
+ |
comment_ts |
@@ -65,75 +69,35 @@ players
-
Table autorates
-An -autorating is a computer-"recognised" label/category for a -player. Examples could include "Calling Station" if a -player has <20% each for aggression and folding postflop. Or -"Tight-Aggressive/Aggressive" for players with <20% -VPIP, >10% PFR and >40% postflop aggression.
+An autorating is a computer-"recognised" label/category for a player. Examples could include "Calling Station" if a player has <20% each for aggression and folding postflop. Or "Tight-Aggressive/Aggressive" for players with <20% VPIP, >10% PFR and >40% postflop aggression.
- Field name - |
-
- Type - |
-
- Comment - |
+ Field name |
+ Type |
+ Comment |
- id - |
-
- bigint - |
-
-
|
+ id |
+ bigint |
+ |
- player_id - |
-
- int - |
-
- references players.id - |
+ player_id |
+ int |
+ references players.id |
- gametype_id - |
-
- smallint - |
-
- references gametypes.id - |
+ gametype_id |
+ smallint |
+ references gametypes.id |
- description - |
-
- varchar(50) - |
-
- autorating description - |
+ description |
+ varchar(50) |
+ autorating description |
@@ -143,8 +107,7 @@ VPIP, >10% PFR and >40% postflop aggression.
char(8) |
- short description e.g. for - display in HUD +short description e.g. for display in HUD |
||||
- number of hands rating is - based on +number of hands rating is based on |
-
-
-
Table -gametypes
+Table gametypes
Field name @@ -290,70 +243,33 @@ gametypes |
-
Table -sites
+Table sites
- Field name - |
-
- Type - |
-
- Comment - |
+ Field name |
+ Type |
+ Comment |
- id - |
-
- smallint - |
-
-
|
+ id |
+ smallint |
+ |
- name - |
-
- varchar(32) - |
-
-
|
+ name |
+ varchar(32) |
+ |
- currency - |
-
- char(3) - |
-
- currency code, e.g. USD, - GBP, EUR - |
+ currency |
+ char(3) |
+ currency code, e.g. USD, GBP, EUR |
-
Table -hands
+Table hands
Field Name @@ -519,145 +435,24 @@ board_cards |
-
-
-
Table -hands_players
-cardX: -can be 1 through 7, one for each card. In holdem/omaha this stores -the hole cards so 3-7 or 5-7 are empty
-I -did not separate this into an extra table because I felt the lost -space is not sufficiently large. Also the benefit for searching is -far less relevant.
+Table hands_players
+cardX: can be 1 through 7, one for each card. In holdem/omaha this stores the hole cards so 3-7 or 5-7 are empty
+I did not separate this into an extra table because I felt the lost space is not sufficiently large. Also the benefit for searching is far less relevant.
- Field Name - |
-
- Type - |
-
- Comment - |
-
- id - |
-
- bigint - |
-
-
|
-
- hand_id - |
-
- bigint - |
-
- references hands_stud.id - |
-
- player_id - |
-
- int - |
-
- references players.id - |
-
- player_startcash - |
-
- int - |
-
-
|
-
- position - |
-
- char(1) - |
-
- BB=B, - SB=S, Button=0, Cutoff=1, etc. -This is used in - holdem/omaha only. - |
-
- ante - |
-
- int - |
-
- note: for cash this could - be boolean, but in tourneys you may enter a hand with less than - the full ante - |
-
- cardX_value - |
-
- smallint - |
-
- 2-10=2-10, - J=11, Q=12, K=13, A=14 (even in razz), unknown/no card=x -see note above table - |
-
- cardX_suit - |
-
- char(1) - |
-
- h=hearts, s=spades, - d=diamonds, c=clubs, unknown/no card=x - |
-
- winnings - |
-
- int - |
-
- winnings in this hand - (bets, antes, etc. are NOT deducted, but rake already is) - |
-
Field Name | Type | Comment |
id | bigint | |
hand_id | bigint | references hands_stud.id |
player_id | int | references players.id |
player_startcash | int | |
position | char(1) |
+ BB=B, SB=S, Button=0, Cutoff=1, etc. +This is used in holdem/omaha only. |
ante | int | note: for cash this couldbe boolean, but in tourneys you may enter a hand with less thanthe full ante |
cardX_value | smallint |
+ 2-10=2-10, J=11, Q=12, K=13, A=14 (even in razz), unknown/no card=x +see note above table |
cardX_suit | char(1) | h=hearts, s=spades, d=diamonds, c=clubs, unknown/no card=x |
winnings | int | winnings in this hand (bets, antes, etc. are NOT deducted, but rake already is) |
rake @@ -837,6 +632,36 @@ far less relevant. | float |
As wonWhenSeenFlop, but for showdown. |
stealAttemptChance |
+ int |
+ Player was in CO, BTN or SB and nobody has called yet |
+
stealAttempted |
+ int |
+ Player took a chance per the above condition |
+
foldBbToStealChance |
+ int |
+ Somebody tried to steal BB from player |
+
foldedBbToSteal |
+ int |
+ Player folded BB to steal attempt |
+
foldSbToStealChance |
+ int |
+ Somebody tried to steal SB from player |
+
foldedSbToSteal |
+ int |
+ Player folded SB to steal attempt |
+
Table hands_actions
diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index 9f6e7c10..a1705200 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -343,7 +343,7 @@ blabla""") self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect("delete_event", self.delete_event) self.window.connect("destroy", self.destroy) - self.window.set_title("Free Poker DB - version: pre-alpha, git20") + self.window.set_title("Free Poker DB - version: pre-alpha, git21") self.window.set_border_width(1) self.window.set_size_request(950,400) self.window.set_resizable(True) diff --git a/pyfpdb/fpdb_db.py b/pyfpdb/fpdb_db.py index 7e6f5970..dc95a957 100755 --- a/pyfpdb/fpdb_db.py +++ b/pyfpdb/fpdb_db.py @@ -34,10 +34,8 @@ class fpdb_db: self.database=database self.user=user self.password=password - #print "fpdb_db.connect, password:",password,"/end" if backend==self.MYSQL_INNODB: import MySQLdb - #print "fpdb_db.connect, host:", host, " user:", user, " passwd:", password, " db:", database self.db=MySQLdb.connect(host = host, user = user, passwd = password, db = database) elif backend==self.PGSQL: import pgdb @@ -45,6 +43,13 @@ class fpdb_db: else: raise fpdb_simple.FpdbError("unrecognised database backend:"+backend) self.cursor=self.db.cursor() + #try: + # self.cursor.execute("SELECT * FROM settings") + # settings=self.cursor.fetchone() + # if settings[0]!=21: + # print "outdated database version - please recreate tables" + #except:# _mysql_exceptions.ProgrammingError: + # print "failed to read settings table - please recreate tables" #end def connect def create_table(self, string): @@ -80,8 +85,9 @@ class fpdb_db: def drop_tables(self): """Drops the fpdb tables from the current db""" + self.cursor.execute("DROP TABLE IF EXISTS settings;") + self.cursor.execute("DROP TABLE IF EXISTS HudDataHoldemOmaha;") - #self.cursor.execute("DROP TABLE IF EXISTS hands_players_flags;") self.cursor.execute("DROP TABLE IF EXISTS autorates;") self.cursor.execute("DROP TABLE IF EXISTS board_cards;") self.cursor.execute("DROP TABLE IF EXISTS hands_actions;") @@ -113,6 +119,9 @@ class fpdb_db: """(Re-)creates the tables of the current DB""" self.drop_tables() + self.create_table("""settings ( + version SMALLINT)""") + self.create_table("""sites ( id SMALLINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id), name varchar(32), @@ -263,9 +272,16 @@ class fpdb_db: otherRaisedRiver INT, otherRaisedRiverFold INT, wonWhenSeenFlop FLOAT, - wonAtSD FLOAT)""") + wonAtSD FLOAT, + stealAttemptChance INT, + stealAttempted INT, + foldBbToStealChance INT, + foldedBbToSteal INT, + foldSbToStealChance INT, + foldedSbToSteal INT)""") - self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"Full Tilt Poker\", 'USD');") + self.cursor.execute("INSERT INTO settings VALUES (21);") + self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"Full Tilt Poker\", 'USD');") self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"PokerStars\", 'USD');") self.db.commit() print "finished recreating tables" diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index a7610a8c..d8ee4500 100644 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -1247,6 +1247,12 @@ def calculateHudImport(player_ids, category, action_types, actionTypeByNo, winni otherRaisedRiverFold=[] wonWhenSeenFlop=[] wonAtSD=[] + stealAttemptChance=[] + stealAttempted=[] + foldBbToStealChance=[] + foldedBbToSteal=[] + foldSbToStealChance=[] + foldedSbToSteal=[] firstPfRaise=-1 for i in range(len(actionTypeByNo[0])): @@ -1275,6 +1281,12 @@ def calculateHudImport(player_ids, category, action_types, actionTypeByNo, winni myOtherRaisedRiverFold=False myWonWhenSeenFlop=0.0 myWonAtSD=0.0 + myStealAttemptChance=False + myStealAttempted=False + myFoldBbToStealChance=False + myFoldedBbToSteal=False + myFoldSbToStealChance=False + myFoldedSbToSteal=False #calculate VPIP and PFR street=0 @@ -1394,6 +1406,12 @@ def calculateHudImport(player_ids, category, action_types, actionTypeByNo, winni otherRaisedRiverFold.append(myOtherRaisedRiverFold) wonWhenSeenFlop.append(myWonWhenSeenFlop) wonAtSD.append(myWonAtSD) + stealAttemptChance.append(myStealAttemptChance) + stealAttempted.append(myStealAttempted) + foldBbToStealChance.append(myFoldBbToStealChance) + foldedBbToSteal.append(myFoldedBbToSteal) + foldSbToStealChance.append(myFoldSbToStealChance) + foldedSbToSteal.append(myFoldedSbToSteal) #add each array to the to-be-returned dictionary result={'VPIP':VPIP} @@ -1415,6 +1433,12 @@ def calculateHudImport(player_ids, category, action_types, actionTypeByNo, winni result['otherRaisedRiverFold']=otherRaisedRiverFold result['wonWhenSeenFlop']=wonWhenSeenFlop result['wonAtSD']=wonAtSD + result['stealAttemptChance']=stealAttemptChance + result['stealAttempted']=stealAttempted + result['foldBbToStealChance']=foldBbToStealChance + result['foldedBbToSteal']=foldedBbToSteal + result['foldSbToStealChance']=foldSbToStealChance + result['foldedSbToSteal']=foldedSbToSteal return result #end def calculateHudImport @@ -1467,17 +1491,23 @@ def storeHudData(cursor, category, gametypeId, playerIds, hudImportData): if hudImportData['otherRaisedRiverFold'][player]: row[21]+=1 if hudImportData['wonWhenSeenFlop'][player]!=0.0: row[22]+=hudImportData['wonWhenSeenFlop'][player] if hudImportData['wonAtSD'][player]!=0.0: row[23]+=hudImportData['wonAtSD'][player] + if hudImportData['stealAttemptChance'][player]: row[24]+=1 + if hudImportData['stealAttempted'][player]: row[25]+=1 + if hudImportData['foldBbToStealChance'][player]: row[26]+=1 + if hudImportData['foldedBbToSteal'][player]: row[27]+=1 + if hudImportData['foldSbToStealChance'][player]: row[28]+=1 + if hudImportData['foldedSbToSteal'][player]: row[29]+=1 if doInsert: #print "playerid before insert:",row[2] 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) - VALUES (%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])) + (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) + 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])) else: #print "storing updated hud data line" 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 - 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[1], row[2], row[3])) + 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 + 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])) else: raise FpdbError("todo") #end def storeHudData diff --git a/pyfpdb/table_viewer.py b/pyfpdb/table_viewer.py index ebdf4d76..0f0dd71d 100755 --- a/pyfpdb/table_viewer.py +++ b/pyfpdb/table_viewer.py @@ -59,7 +59,7 @@ class table_viewer (threading.Thread): arr=[] #first prepare the header row 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") else: raise fpdb_simple.FpdbError("reimplement stud") tmp=("Name", "Hands", "VPI3", "A3", "3B4B_3" "A4", "F4", "A5", "F5", "A6", "F6", "A7", "F7", "SD/4") diff --git a/regression-test/ps-flags-3hands.expected.txt b/regression-test/ps-flags-3hands.expected.txt index cf491638..d3af95d0 100644 --- a/regression-test/ps-flags-3hands.expected.txt +++ b/regression-test/ps-flags-3hands.expected.txt @@ -28,3 +28,13 @@ otherRaisedTurn: 1 otherRaisedTurnFold: 0 otherRaisedRiver: 1 otherRaisedRiverFold: 1 + +wonWhenSeenFlop: +wonAtSD: + +stealAttemptChance: +stealAttempted: +foldBbToStealChance: +foldedBbToSteal: +foldSbToStealChance: +foldedSbToSteal: