diff --git a/docs/known-bugs-and-planned-features.txt b/docs/known-bugs-and-planned-features.txt index bcbac127..93cae5ba 100644 --- a/docs/known-bugs-and-planned-features.txt +++ b/docs/known-bugs-and-planned-features.txt @@ -1,8 +1,12 @@ todolist (db=database, imp=importer, tv=tableviewer) before alpha -=========== -add back turn, river and stud functionality to hud and import-HudData +============ +PrintPlayerFlag +imp/tv bug: PFR is blatantly crazy +imp(?) bug: handcount is only about 1/2 of what it should be +verify at least one PrintPlayerFlags +and stud functionality to hud and import-HudData db+imp+tv WtSD (went to showdown) db+imp+tv W$SD (won $ when seeing showdown - partial win counts partially here) db+imp+tv WwSF (Won when seen flop - partial taken into account) @@ -17,12 +21,14 @@ tourney bug: fails with tuple error in recogniseplayerid config wizard catch index error, type error, file not found error update install instructions +split python requirements, get deep links for windows DL for everything implement error file in importer remove mysql/myisam support. before beta =========== +file permission script, use games group change stud street storage from 3-7 to 0-4 throughout make bulk importer display a grand total in the GUI change save_to_db into one method and probably move into parse_logic diff --git a/docs/tabledesign.html b/docs/tabledesign.html index 3cfa5c48..018ae40b 100644 --- a/docs/tabledesign.html +++ b/docs/tabledesign.html @@ -7,42 +7,21 @@

see commit comments for version info

Direct suggestions, praise and animal names to steffen@sycamoretest.info

-

TODO clean all the crap out of this like i did in HudData

-

I decided to be generous on the sizes of the types - if computing -experience shows one thing then its that it will come back to bite -you in the ass if you save 2 bits in the wrong place. If performance -and/or db size are too bad we can still shrink some fields.

-

Relationships -are noted in the comment (need to double check that all are listed)

-

If -you want more comments or if anything is confusing or bad let me -know.

-


-

-

All -money/cash amounts are stored in cents/pennies/whatever (e.g. $4.27 -would be stored a 427). Chips are stored as-is (e.g. 3675 chips would -be stored as 3675).

-


-

-

Support -for ringgames in Holdem, Omaha, Razz and Stud complete. Support for -SnG/MTT is alpha

-


-

-

Notes -on use/editing:

-

Any -change to this must be carried to to the table creation code unless it -is clearly noted in appropriate places.

-

If the code (in particular the importer) and this document disagree then this document is to be considered authorative. Please report such mismatches to steffen@sycamoretest.org or through sourceforge.

+

TODO clean all the crap out of this like i did in HudData, line39 onwards

+

I decided to be generous on the sizes of the types - if computing experience shows one thing then its that it will come back to bite you in the ass if you save 2 bits in the wrong place. If performance and/or db size are too bad we can still shrink some fields.

+

Relationships are noted in the comment (need to double check that all are listed)

+

If you want more comments or if anything is confusing or bad let me know.

+

All money/cash amounts are stored in cents/pennies/whatever (e.g. $4.27 would be stored a 427). Chips are stored as-is (e.g. 3675 chips would be stored as 3675).

+

Support for ringgames in Holdem, Omaha, Razz and Stud complete. Support for SnG/MTT is alpha

+

Notes on use/editing:

+

Any change to this must be carried to to the table creation code in fpdb_db.py or at least an entry to known bugs is to be made.

+

If the code (in particular the importer) and this document disagree then this document is to be considered authorative. Please report such mismatches to steffen@sycamoretest.org or through an assembla ticket.

License
Trademarks of third parties have been used under Fair Use or similar laws.
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

+

See readme.txt for copying


Table @@ -54,16 +33,9 @@ players

Comment

- -

id

- - -

int

- - -


-

- +

id

+

int

+


@@ -266,18 +238,12 @@ gametypes

+

type

+

char(4)

-

type

- - -

char(4)

- - -

valid - entries:

-

cash - - aka ringgames

-

tour - tournament

+

valid entries:

+

ring - ringgames aka cash games

+

tour - tournament incl SnG

diff --git a/utils/PrintPlayerFlags.py b/utils/PrintPlayerFlags.py new file mode 100755 index 00000000..c77a6296 --- /dev/null +++ b/utils/PrintPlayerFlags.py @@ -0,0 +1,61 @@ +#!/usr/bin/python + +#Copyright 2008 Steffen Jobbagy-Felso +#This program is free software: you can redistribute it and/or modify +#it under the terms of the GNU Affero General Public License as published by +#the Free Software Foundation, version 3 of the License. +# +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. +# +#You should have received a copy of the GNU Affero General Public License +#along with this program. If not, see . +#In the "official" distribution you can find the license in +#agpl-3.0.txt in the docs folder of the package. + +#This is intended mostly for regression testing + +import sys +import MySQLdb +from optparse import OptionParser +import fpdb_util_lib as ful + +parser = OptionParser() +parser.add_option("-b", "--bigblind", default="2", type="int", help="big blinds in cent") +parser.add_option("-c", "--cat", "--category", default="holdem", help="Category, e.g. holdem or studhilo") +parser.add_option("-g", "--gameType", default="ring", help="Whether its a ringgame (ring) or a tournament (tour)") +parser.add_option("-l", "--limit", "--limitType", default="fl", help="Limit Type, one of: nl, pl, fl, cn, cp") +parser.add_option("-n", "--name", "--playername", default="Player_1", help="Name of the player to print") +parser.add_option("-p", "--password", help="The password for the MySQL user") +parser.add_option("-s", "--site", default="PokerStars", help="Name of the site (as written in the history files)") + +(options, sys.argv) = parser.parse_args() + +db = MySQLdb.connect("localhost", "fpdb", options.password, "fpdb") +cursor = db.cursor() +print "Connected to MySQL on localhost. Print Player Flags Utility" + + +print "Basic Data" +print "==========" +print "bigblind:",options.bigblind, "category:",options.cat, "limitType:", options.limit, "name:", options.name, "gameType:", options.gameType, "site:", options.site + +cursor.execute("SELECT id FROM sites WHERE name=%s", (options.site,)) +siteId=cursor.fetchone()[0] + +cursor.execute("SELECT id FROM gametypes WHERE big_blind=%s AND category=%s AND site_id=%s AND limit_type=%s AND type=%s", (options.bigblind, options.cat, siteId, options.limit, options.gameType)) +gametypeId=cursor.fetchone()[0] + +cursor.execute("SELECT id FROM players WHERE name=%s", (options.name,)) +playerId=cursor.fetchone()[0] + +print "siteId:", siteId, "gametypeId:", gametypeId, "playerId:", playerId + + + + +cursor.close() +db.close() +sys.exit(0) diff --git a/utils/regression-test.sh b/utils/regression-test.sh index 252db6ce..c4011f1f 100755 --- a/utils/regression-test.sh +++ b/utils/regression-test.sh @@ -15,6 +15,8 @@ #In the "official" distribution you can find the license in #agpl-3.0.txt in the docs folder of the package. +echo "Please note for this to really work you need to work on an empty database" + rm ../testdata/*.found.txt ../pyfpdb/fpdb_import.py -p$1 --file=../testdata/ps-holdem-ring-001to003.txt -x ../pyfpdb/fpdb_import.py -p$1 --file=../testdata/ps-holdem-ring-001to003.txt -x @@ -28,6 +30,8 @@ echo "it should've reported first that it stored 3, then that it had 3 duplicate ./print_hand.py -p$1 --hand=14519420999 > ../testdata/ps.14519420999.found.txt && colordiff ../testdata/ps.14519420999.found.txt ../testdata/ps.14519420999.expected.txt ./print_hand.py -p$1 --hand=14519433154 > ../testdata/ps.14519433154.found.txt && colordiff ../testdata/ps.14519433154.found.txt ../testdata/ps.14519433154.expected.txt +./PrintPlayerFlags.py -p$1 > ../testdata/ps-flags-3hands.found.txt && colordiff ../testdata/ps-flags-3hands.found.txt ../testdata/ps-flags-3hands.expected.txt + #./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6367428246 > ../testdata/ftp.6367428246.found.txt && colordiff ../testdata/ftp.6367428246.found.txt ../testdata/ftp.6367428246.expected.txt #./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929537410 > ../testdata/ftp.6929537410.found.txt && colordiff ../testdata/ftp.6929537410.found.txt ../testdata/ftp.6929537410.expected.txt