Commit Graph

1615 Commits

Author SHA1 Message Date
Worros
6781d97539 Remove debug message 2009-08-03 09:35:22 +08:00
sqlcoder
745baf139f Sorry guys. Added some error checking and discovered a bug in the mysql index creation - I've fixed it and imports don't degrade anything like they used to now. I've just imported 15K hands at 20+/second when it used to be down at 5/sec after 10K hands or so. 2009-08-03 01:30:51 +01:00
sqlcoder
1a63c62cf1 Merge branch 'master' of git://git.assembla.com/fpdboz 2009-08-02 22:50:31 +01:00
sqlcoder
8e0519708e fix bugs and move hud stat config to HUD_main.py so that GUI can set it 2009-08-02 13:00:55 +01:00
eblade
1bd8419510 merge from carl 2009-08-02 07:14:31 -04:00
Worros
ff2cca361c New insert player function for HHC import
Added getSqlPlayerIDs to Database.py - returns a hash {playername:sqlid}

Function uses a caching hash in Database.py to reduce the number of round trips to the database needed just to fetch the player ids for later inserts.

Need to do a performance comparison on a larger import.
2009-08-02 12:19:33 +08:00
Worros
40a0fe428b Variable name change - hhc is better imho 2009-08-02 11:03:35 +08:00
Worros
129d09796e Fix HUD_config.xml.example to have correct stat names 2009-08-02 10:19:45 +08:00
sqlcoder
d04f0efe94 Merge branch 'master' of git://git.assembla.com/free_poker_tools 2009-08-01 23:29:49 +01:00
sqlcoder
cffe57dfa3 pass sql list through to importer from fpdb.py 2009-08-01 23:29:00 +01:00
sqlcoder
e2dde5c3e3 fix aggregate query and stop hud queries being executed whenever anything created a db connection 2009-08-01 23:15:04 +01:00
Ray
83fbbc6332 Finished prep for Stars HH format change.
All currency symbols are maintained in dicts that are class
variables. The currency symbols are compiled in to the regexs.
I.e., "\$?" no longer appears in any of the regexs. Will have
to be updated with actual Euro symbol and tested against live
HHs when Stars makes the change.
2009-08-01 11:51:37 -04:00
sqlcoder
1d2df984de New helper prog to create batch files in windows. Creates a separate .bat file for each GTK dir on PATH so that user can try each one out 2009-08-01 12:47:07 +01:00
sqlcoder
4dd9a8877d restart python if running an old version and 2.5 or 2.6 is available on PATH (Windows) 2009-08-01 12:45:10 +01:00
sqlcoder
fed180d945 set allow threads option to false 2009-08-01 00:37:13 +01:00
sqlcoder
921812f5e4 add config var at top of file to allow threaded option 2009-08-01 00:08:41 +01:00
sqlcoder
fbab3c7e24 make sure handsid is always returned and show size of queue when threaded 2009-08-01 00:07:31 +01:00
sqlcoder
e9873d38a5 fix sleep() call 2009-08-01 00:06:07 +01:00
sqlcoder
0756345f3e allow nulls in handsplayer fields so that stud can import (but most fields are missing) 2009-07-31 22:49:46 +01:00
sqlcoder
3b9fa3b177 add useful (hopefully) exception handler 2009-07-31 22:34:26 +01:00
sqlcoder
f3a4a8b0d0 fix previous merge 2009-07-31 22:30:41 +01:00
sqlcoder
8d77b961d7 merge from eric @6df03cb... 2009-07-31 22:07:27 +01:00
sqlcoder
36f09ebc82 merge from ray @f5ba0b5b7... 2009-07-31 21:58:39 +01:00
sqlcoder
70b1f5320b Merge branch 'master' of git://git.assembla.com/fpdboz 2009-07-31 21:30:20 +01:00
sqlcoder
b503626c2b add db writer threading 2009-07-31 21:24:21 +01:00
sqlcoder
36de79140c round hands/sec and show some traceback info in exception handler (v useful) 2009-07-31 20:12:29 +01:00
eblade
6df03cb234 HUD_main: if new hand id int is not available, we can't print it, so that generates a second error, double fault
fpdb_import: ok, we're keeping two lists now, one with updated st_size and one with m_time.  grrr.
2009-07-31 01:15:28 -04:00
eblade
6e8232f623 Merge branch 'master' of git://git.assembla.com/free_poker_tools.git 2009-07-31 00:40:46 -04:00
eblade
047b5d94d9 move constant dicts/lists from functions to global vars, so they aren't loaded every time the function is run 2009-07-31 00:40:31 -04:00
eblade
21b859f244 remove error handler on hudcache rebuild menu, if it errors we should know about it 2009-07-31 00:15:25 -04:00
eblade
85c635d1da remove error handler on Load Profile menu opt (menu opt doesn't work anyway, so it doesn't error) 2009-07-31 00:13:51 -04:00
Ray
fd2ad9b192 Merge branch 'master' of git://git.assembla.com/fpdb-eric 2009-07-31 00:06:07 -04:00
Ray
5660b77355 Delete uneeded intermediate prints. 2009-07-30 23:44:59 -04:00
Ray
29366d3bb6 Ugly fix to prevent importing from failing due to undef positions array. 2009-07-30 23:42:57 -04:00
eblade
f5ba0b5b7f Database: insert missing HandToWrite.payin_amounts var
EverleafToFpdb: remove DEBUG XXXXXXX line
FulltiltToFpdb: pass on converting tournament hands
Hand: add Hand.fee var that Database is looking for
fpdb_import: clean up file update scan code, queue files that have changed in the last 60 seconds for the next importer pass, instead of locking it up reading them now (not that this does anything since FT no longer updates the mtime until it closes the table, but maybe it works with Stars or others)
2009-07-30 21:50:08 -04:00
eblade
c400fd9ba7 FTtoFpdb: default buyin to $0.00+$0.00 and level to 0, they don't seem to be in the FT hh 2009-07-30 20:56:39 -04:00
eblade
3ce0f91b27 useless change of a comment just to test my rss output 2009-07-30 19:53:44 -04:00
Ray
4cc3cc2272 Merge branch 'master' of git://git.assembla.com/fpdb-eric 2009-07-30 18:11:14 -04:00
Ray
eafc77ff92 Merge branch 'master' of git://git.assembla.com/fpdboz 2009-07-30 18:11:08 -04:00
Ray
1820e71054 Started on supporting expected HH change--rewrote GameType regex.
This version should work with the expected HH format for $ tables
only. I abstracted the ISO currency codes and currency symbols
out of the regex so they only need to be maintained in 1 place.
I didn't apply the change to everywhere "\$" appears, in case
comments are negative.
2009-07-30 18:06:13 -04:00
eblade
2c7e00f02a fpdb_import: use stat_info.st_size instead of stat_info.st_mtime to determine hh file updates 2009-07-30 17:29:57 -04:00
eblade
98e376a956 Merge branch 'master' of git://git.assembla.com/free_poker_tools.git 2009-07-30 15:28:41 -04:00
Worros
68ac5ff554 Q&D hack to fix FTP file reads after update
Contributed by grindi on 2+2 http://forumserver.twoplustwo.com/showpost.php?p=12156328&postcount=166

Removes u'\xff\xfe' from the end of file if they exist.
2009-07-30 12:13:45 +08:00
Worros
73e6666cbc Add auto folder creation to HHC
Contributed by grindi on 2+2 http://forumserver.twoplustwo.com/showpost.php?p=12156328&postcount=1666

Creates the sub folders of hhArchiveBase for placing the converted files in.
2009-07-30 11:40:16 +08:00
Ray
e36b300271 Merge branch 'master' of git://git.assembla.com/fpdb-sql 2009-07-29 10:35:01 -04:00
Ray
835c4ad0cf Added encodeCard() to Card.py. 2009-07-29 10:33:42 -04:00
sqlcoder
c2f79ddc24 refine mysql index drop/creation, but redundant as have left Erics new commands in - mysql crawls with 10k hands! get postgres :-) 2009-07-29 07:57:18 +01:00
sqlcoder
38ee98e492 pass sql list from fpdb through guibulkimport to fpdb_import 2009-07-29 06:37:06 +01:00
sqlcoder
9c62ecb80e debug move to Database.py and move last part of mainparser into Database.py 2009-07-29 06:17:51 +01:00
sqlcoder
298de5dc15 move most stuff from fpdb_db.py to Database.py and simplify db connections in fpdb_import 2009-07-28 23:58:10 +01:00
sqlcoder
3cc5ed8024 Merge branch 'master' of git://git.assembla.com/fpdb-eric 2009-07-28 21:25:07 +01:00
sqlcoder
12e1da0a5e add lock_for_insert routine but comment out for now (hangs) 2009-07-28 21:19:31 +01:00
eblade
47f27cf31f fpdb.py: Add "Recreate HUD Cache" to Database menu
fpdb_db.py: Junk the dropping of indexes/FKs for MySQL INNODB in favor of just telling MySQL to ignore them.  Not sure if that works for other MySQL engines or other Database softwares.
2009-07-27 17:28:06 -04:00
sqlcoder
5d5a6ed39d comment out a debug message and 1 char change to output message 2009-07-27 22:02:37 +01:00
Ray
2adef78269 Get rid of intermediate prints. 2009-07-27 15:41:42 -04:00
eblade
b27b697ec6 GuiBulkImport: fix indentation error
Hand: fix Pot __str__ to support infinite side pots
2009-07-27 14:25:24 -04:00
eblade
31f8db1788 Long-handed out the logic in twoStartCards, the shortcuts were killing it somewhere, added short-circuit into it for pairs, fixed order cards are returned in for offsuit cards in twoStartCardString.
*Note: I think someone should fix the "Hand Breakdown" chart to not include "Seats" in it's criteria, if "Show Number of Players" is not checked. ?
2009-07-26 18:00:12 -04:00
sqlcoder
f45038673c more moves into Database.py, better exception handling, store hudcache stats for holdem tourneys (some maybe no use? it's a start anyway - need to add NL/FL switch on Filter) 2009-07-26 01:42:09 +01:00
eblade
308cfb1e56 Merge branch 'master' of git://git.assembla.com/free_poker_tools.git 2009-07-25 13:08:21 -04:00
eblade
656792ff5c make command line bulk import not drop indexes. 2009-07-25 13:00:54 -04:00
sqlcoder
859d18734c minor corrections to output messages 2009-07-25 17:39:06 +01:00
Ray
0c36ab0bda Add simple __main__ to Card.py, so I can remember how it works. 2009-07-25 11:58:43 -04:00
Ray
c3a408766d Merge branch 'master' of git://git.assembla.com/fpdb-sql 2009-07-25 11:36:00 -04:00
Ray
8e04ca316d Catch up with recent changes in HHC and Hand. 2009-07-25 11:34:13 -04:00
sqlcoder
495885e49c _x (where x is a single digit) at the end of a stat name in hud_config.xml now indicates the number of decimal places to display in the HUD. Some stats renamed slightly to remove the _ before last character of name. 2009-07-23 23:15:02 +01:00
Ray
ba42a7c453 Get rid of debuggin output. 2009-07-22 19:27:12 -04:00
Ray
9f0d54a1f7 Merge branch 'master' of git://git.assembla.com/fpdb-sql 2009-07-22 19:22:26 -04:00
Ray
94a030922a Clean up handling of mixed games on FTP. 2009-07-22 19:21:00 -04:00
sqlcoder
9c9202b539 remove debug statement 2009-07-22 20:22:20 +01:00
sqlcoder
ab004b8284 only update psycopg2 extensions when using it 2009-07-22 20:19:41 +01:00
Ray
0291fcf489 Fix a problem when there is a comma in the BI for FTP stud games. 2009-07-22 14:43:13 -04:00
Ray
b963ac0a3d Correct detection of hero in FTP stud games. 2009-07-22 14:06:05 -04:00
Ray
e7441021f2 Fix problem with detecting max on FullTilt. 2009-07-22 13:51:48 -04:00
Ray
9d803957cb Detect mixed games in FTP HH. Fix typos. 2009-07-22 10:24:29 -04:00
Ray
3e0b0e0873 Allow parsing of play money tables and fix some typos. 2009-07-22 08:54:30 -04:00
Ray
37a5f2d83b Fix problem when someone times out and folds before posting. 2009-07-22 08:53:03 -04:00
sqlcoder
f69281e2fd finish hudcache rebuild code which speeds up bulk imports nicely - turn off permanently via allow_hudcache_rebuild in fpdb_import.py. Also some more moves into Database.py and cosmetic stuff 2009-07-21 22:26:23 +01:00
sqlcoder
ab413faab9 Merge branch 'master' of git://git.assembla.com/free_poker_tools 2009-07-21 21:34:19 +01:00
Ray
0002043087 Merge branch 'master' of git://git.assembla.com/fpdb-sql 2009-07-21 11:08:15 -04:00
sqlcoder
58957e78e6 fix typo that blew up when 2 side pots present 2009-07-20 22:31:24 +01:00
sqlcoder
0670637abc Merge branch 'master' of git://git.assembla.com/fpdboz 2009-07-20 22:26:40 +01:00
Ray
af19c3f365 Fix a bug in the Action regex. Thanks Carl. 2009-07-20 14:27:03 -04:00
Ray
10f454ae77 Guess maxseats when not supplied by SiteToFpdb. 2009-07-20 10:01:51 -04:00
Ray
00aeda5667 Merge branch 'master' of git://git.assembla.com/fpdboz 2009-07-19 16:50:22 -04:00
sqlcoder
b9d462c175 make graphviewer use Database.py 2009-07-19 21:19:58 +01:00
sqlcoder
0fecdfb2d7 make positional stats use Database.py 2009-07-19 18:28:13 +01:00
sqlcoder
ceaedebcd9 Merge branch 'master' of git://git.assembla.com/free_poker_tools 2009-07-19 14:31:36 +01:00
sqlcoder
fb4ad79803 use someone else's interprocess locking code instead of python locks/semaphores - needs testing in Linux 2009-07-19 12:28:17 +01:00
Worros
d546557ef7 Make new db insert code "usable"
Next step, make the players insert. Function doesn't exist at the moment and crashes when NEWIMPROT set to true
2009-07-19 15:45:18 +08:00
Worros
e113a1e692 Merge branch 'master' of git://git.assembla.com/fpdb-sql 2009-07-19 11:29:18 +08:00
Worros
36f4da0adf Merge branch 'master' of git://git.assembla.com/free_poker_tools 2009-07-19 11:28:59 +08:00
Ray
cbbf820eb5 Add support for tournaments. 2009-07-18 21:33:00 -04:00
Ray
c5cffc2326 Allow add* to take amounts with commas. 2009-07-18 21:31:39 -04:00
sqlcoder
3352f608cf take global lock while doing imports 2009-07-18 23:01:18 +01:00
sqlcoder
6a69bf512e use python locks instead of db locks for global lock 2009-07-18 22:21:29 +01:00
sqlcoder
9d9f850753 use Database.py in GuiPlayerStats 2009-07-18 20:46:50 +01:00
sqlcoder
a1e0e0539a add queries for player stats 2009-07-18 20:41:20 +01:00
sqlcoder
96376e7421 fine tune player stats 2009-07-18 20:39:01 +01:00
sqlcoder
cdd94d512f improve handling of hud_style options 2009-07-18 18:29:06 +01:00
Worros
8386dd594e Add empty function prepInsert 2009-07-18 19:02:55 +08:00
Ray
52ecc64505 Update to work with recent Hand.py changes. 2009-07-17 17:07:53 -04:00
Worros
34932c14ee Add index parameter to Plugins
Change constructor to HHC to accept an index arg, so that file reads can seek
2009-07-17 17:45:22 +08:00
Worros
61b0b8f4fe Prep work for inserting directly from HHC 2009-07-17 17:16:06 +08:00
Ray
26a1996353 Change Pot object to support variable currency symbol. 2009-07-16 12:13:24 -04:00
Worros
152f16c7a0 Make euros print as $ in writeHand.
fpdb_simple avoidance at the moment.
2009-07-16 13:54:41 +08:00
Ray
6cd6b2d1dd Merge branch 'master' of git://git.assembla.com/fpdboz 2009-07-16 01:00:44 -04:00
Worros
0d5af4c974 Make Win2day client use updated readHeroCards api 2009-07-16 12:58:39 +08:00
Ray
2fa3781349 Make euros print as $ in writeHand. 2009-07-16 00:54:09 -04:00
Ray
88d4f2ee05 Merge branch 'master' of git://git.assembla.com/fpdboz 2009-07-16 00:32:29 -04:00
Worros
d8df3ea11a Possible fix for 2.6 versions of Matplotlib
Long standing issue with multiple plots being added to a single canvas.

Calling canvas.draw() appears to be the "correct" way to do this in pythin 2.6

Need someone to test if this still works in python 2.5
2009-07-16 11:46:52 +08:00
Ray
52fcbd7966 Remove completed TODOs(plenty left!). Remove obsolete comments. 2009-07-15 23:40:07 -04:00
Ray
b5b0b6a7b7 Get rid of hard wired $ in writeHand.
Replace with appropriate symbol based on ring, tournament, play,
etc.
2009-07-15 23:04:16 -04:00
Ray
889aea48b6 Make the board in the summary of flop games print in the right order. 2009-07-15 22:30:41 -04:00
Ray
e0dc556a67 Clean up some methods previously commented out. 2009-07-15 22:15:20 -04:00
Ray
3253d5a234 Get stud shown cards right in writeHand(). 2009-07-15 22:11:23 -04:00
Ray
12db3c0d55 Add a space to make stud holecard printing perfect. 2009-07-15 21:46:45 -04:00
Ray
427999b69c Correctly write stud holecards in writeHand(). 2009-07-15 21:22:07 -04:00
Ray
32a1c322d4 Merge branch 'master' of git://git.assembla.com/fpdboz
Conflicts:
	pyfpdb/PokerStarsToFpdb.py
2009-07-15 13:36:00 -04:00
Worros
b92feee021 Revert Matts change for sqlite until fixed.
Previous syntax failed to insert the required line into TourneyTypes
2009-07-15 23:58:34 +08:00
Ray
bd2db98612 Housecleaning. Refactoring writeHand() = not finished. 2009-07-15 11:50:27 -04:00
Ray
0e76c3a676 Fix findHeroCards() for empty streets. 2009-07-15 11:48:58 -04:00
Worros
ec9ce544ca Fix if database hasn't been created yet.
Still broken on my setup, but at least fpdb now starts
2009-07-15 23:32:17 +08:00
Worros
83f21e822d Merge branch 'master' of git://git.assembla.com/mctfpdb
Conflicts:
	pyfpdb/fpdb_db.py
2009-07-15 23:09:25 +08:00
Worros
cd2ec0c74f Merge branch 'master' of git://git.assembla.com/free_poker_tools 2009-07-15 22:52:09 +08:00
Worros
521e17f856 Add some boilerplate stuff for Boss Media/Win2day plugin 2009-07-15 12:22:46 +08:00
Matt Turnbull
35a5cffb77 Working on PS HORSE file now.. 2009-07-15 00:26:53 +01:00
Matt Turnbull
79ca83c95a Merge from ray, minor conflicts 2009-07-15 00:20:26 +01:00
Ray
021b9934ea Fix writing of mixed tournament hands. Other minor changes. 2009-07-14 19:18:38 -04:00
Matt Turnbull
70f271ef78 location of test PS horse hh 2009-07-15 00:15:04 +01:00
Matt Turnbull
806d61ae23 log line 2009-07-15 00:14:25 +01:00
Matt Turnbull
b252e350d6 fix my breakage.. 2009-07-14 23:34:47 +01:00
Ray
599aee6393 Fix parsing of tournaments of mixed games. 2009-07-14 10:55:39 -04:00
Matt Turnbull
dc6a1c45f9 sqlite - connecting and (re)creating some tables 2009-07-14 00:04:10 +01:00
Worros
79d0ba35b0 Initial commit of BossMedia importer.
Contributed by Thomas Wigele (twigele gmail com - star-fox on sourceforge)

Sample HH - http://www.pastebin.ca/1490652
2009-07-14 06:39:49 +08:00
Worros
7683334e36 Merge branch 'master' of git://git.assembla.com/free_poker_tools 2009-07-14 05:00:48 +08:00
Ray
31dd10b5e6 Make writehand() to work for tournament/mixed/play$ games.
Also refactored the writing of the first 2 lines in writehand().
2009-07-13 16:22:23 -04:00
Ray
d79ea0e6e5 Fixes for Mixed and Play Money games. 2009-07-13 16:21:20 -04:00
Ray
dd1b442122 Rationalized holecards for stud and draw games.
Cards are now lists of cards rather than sets. Removed some
game-specific methods and replaced with general methods.
Let the superclass handle some stuff.
2009-07-13 00:37:51 -04:00
Ray
3234f89aad Rationalized hole card format for flop games.
Also updated writehand() so flop hands are written OK.
This breaks stud and draw--fixing them now.
2009-07-12 16:01:02 -04:00
Ray
e294314e25 Fix: hand.maxseats has to be and int. 2009-07-12 13:14:50 -04:00
Ray
d8820ae1f7 Allow parsing of tournaments, draw and play money.
Sorry about the massive commit. There are still numerous bugs
parsing non-holdem hands and writehand() is broken for all
but holdem cash games.
2009-07-11 13:44:32 -04:00
Ray
4e952de825 Remove intermediate print. 2009-07-07 14:15:36 -04:00
Ray
56bd7b37ba Parse Stars tournaments for flop and stud games.
Tournaments are not correctly written in writehand(). Nor are
stud games.
2009-07-07 13:48:43 -04:00
Worros
c3d463b689 Merge branch 'master' of git://git.assembla.com/free_poker_tools 2009-07-07 21:28:54 +08:00
Ray
21d2276679 Get rid of intermediate hand obj print. 2009-07-06 12:01:39 -04:00
Ray
4ae8b123ce Fix game type for non-Mixed games. 2009-07-06 12:00:16 -04:00
Ray
799aa41c1e Correct handling of open/closed stud hole cards. 2009-07-05 23:44:53 -04:00
Ray
8f2350f861 Set dealt flag when reading holdem hero cards. 2009-07-05 11:47:18 -04:00
Ray
c4cc6bd1aa Make WriteHand for holdem report mucked cards. 2009-07-04 15:28:20 -04:00
Ray
a35b1a8b3c Make WriteHand for stud report mucked hand. 2009-07-04 15:19:46 -04:00