Commit Graph

177 Commits

Author SHA1 Message Date
PassThePeas
4a1dd26db3 First attempt to parsing summary files from FTP
modified:   FulltiltToFpdb.py
		* Modified re_HandInfo regex to take into account Matrix Tournament Hands Histories
		* Add Regex for Tourney Summaries files parsing
		* New methods : readSummaryInfo, determineTourneyType, getPlayersPositionsAndWinnings

	modified:   HandHistoryConverter.py
		* Add a Tourney object in the attributes to allow storing the summary info retrieved and the ability to hand it over after parsing
		* Add a new attribut parsedObjectType (string : "HH" or "Summary")
		* In follow = False mode : read the first line to swicth between HH & Summary parsing
		* TO DO : Deal with parsing summary files in follow = True mode
		* New methods added : isSummary, getParsedObjectType (to be called in fpdb_import), readSummaryInfo : abstract (to be implemented in each specific HHC), getTourney (returns the new attribute)

	new file:   Tourney.py
		* New object
		* Lots of attributes regarding the tourney info (buy-in, fee, entries, speed, Rebuy/add-on info, starting chips, KnockOut info, isHeadsUp, isShootout, isMatrix, ...
		* List of players with finishing positions (when available) and winnings (when available)
		* Methods :
		  ** addPlayer(self, rank, name, winnings)
		  ** incrementPlayerWinnings(self, name, additionnalWinnings): used for KO tourneys when KO occured (for Hero only)
		  ** calculatePayinAmount : unused yet, should be necessary for DB storage
		  ** some Hand methods copied that are still to be done including : assemble and insert
		  ** TO DO : write the insert method for the object to be stored in DB. This will have to deal with the fact that the DB write can occur both before (Bulk Import) or after the HH file info has been stored (tourney might or might not already exist)

	modified:   fpdb_import.py
		* import_file_dict modified :
		  ** after the construction of the hhc, it now calls the new getParsedObjectType method of HHC in order to know what has been parsed by the HHC
		  ** If it's a hand history file (actual expected behaviour) : do as before
		  ** If it's a summary file, gets the tourney object that has been built from the hhc and calls the insert method on it (similar to NEWIMPORT=True for HH)
2009-08-22 00:09:34 +02:00
Ray
4a794f7f7a Merge branch 'master' of git://git.assembla.com/fpt_fpdb 2009-08-20 12:21:59 -04:00
PassThePeas
e403c18780 Patch the readPlayerStacks : different behaviours between tourney and ring hands
modified:   FulltiltToFpdb.py
In tourneys, players sitting out are considered as in the hand. That's not the case in ring games.
2009-08-18 21:17:00 +02:00
grindi
b8af93efb5 Merge branch 'master' of git://git.assembla.com/fpt_fpdb
Conflicts:
	pyfpdb/FulltiltToFpdb.py
2009-08-18 13:47:11 +04:00
PassThePeas
c5aedf321f Modification to FulltiltToFpdb.py mostly for tourneys contexts
modified:   FulltiltToFpdb.py
- Sitting out players are no longer considered out of a hand (in a tourney context, they can act even if out at the beggining of the hand)
- re_CollectPot modified to take into account Tournament context (no $ in the pot)
- Try to read buy-in/fee from topline in Tournament context
- Deal with commas in pot size (readCollectPot)
2009-08-16 20:01:36 +02:00
grindi
40b8ce799b Merge branch 'master' of git://git.assembla.com/free_poker_tools 2009-08-15 21:53:34 +04:00
Ray
46085cba5d Repair missing line in regex, comment out skipping tournaments. 2009-08-15 13:30:31 -04:00
grindi
442d96b862 Removed hack in FTP parser 2009-08-12 14:30:54 +04:00
grindi
dd17155aa9 Fixed bug 7 ( http://trac-git.assembla.com/free_poker_tools/ticket/7 ) 2009-08-12 12:47:18 +04:00
Matt Turnbull
a32d4e053a FulltiltToFpdb handles canceled hands
Better exception handling during parsing
FpdbParseEcxeption takes an optional HID
Stripped pointless __init__s from *ToFpdb subclasses
Logging now has logging.conf config - default is to log only INFO to
file but easily changed to DEBUG for devel work
2009-08-09 15:19:43 +01: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
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
Ray
94a030922a Clean up handling of mixed games on FTP. 2009-07-22 19:21:00 -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
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
3c64e67750 Merge branch 'master' of git://git.assembla.com/fpdboz 2009-07-19 00:27:29 -04:00
Ray
cbbf820eb5 Add support for tournaments. 2009-07-18 21:33:00 -04: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
1d6aed3250 Fix datetime.strptime v time.strptime issue 2009-06-09 22:53:09 +08:00
Worros
a261517175 Add additional siteids to db, move player select function 2009-06-01 17:14:31 +08:00
Matt Turnbull
a4ed3a2e68 (No function) Note about matching "FullTiltPoker" 2009-04-04 15:12:45 +01:00
Matt Turnbull
5cd5ad8fa6 Fix bug I introduced that caused empty hands corresponding to splits
between hands (blank lines) to be 'processed' by HHC in Everleaf, PS and
FTP converters.
2009-03-31 07:44:19 +01:00
Matt Turnbull
aca5dc9ed0 Parse another PokerStars datetime.
Make tail work:
  -log instead of print inode # change detected,
  -make sure splitter regexes have groups around them
  -fix a bug
  -increase buffering size to something >> a single hand

Conflicts:

	pyfpdb/HandHistoryConverter.py
2009-03-24 14:58:14 +00:00
Worros
40c17cffaa Recognise deep 6 tables at Full Tilt 2009-03-22 18:52:30 +09:00
Worros
1e788621a5 Merge branch 'master' of git://git.assembla.com/mctfpdb
Conflicts:

	pyfpdb/FulltiltToFpdb.py
2009-03-22 01:35:03 +09:00
Worros
86d350984e Dodgy 6 max fix to FTP converter 2009-03-22 01:31:36 +09:00
Matt Turnbull
e9fd354115 handinfo 2009-03-18 16:52:18 +00:00
Worros
6ebab06981 Make converters dynamically loadable in autoimport
Adds 1 restriction to the HHC sub classes, the classname must be the
same as the filename - ToFpdb.py

FulltiltToFpdb.py must contain a hhc class named Fulltilt
EverleafToFpdb.py must contain a hhc class named Everleaf
2009-03-14 05:00:12 +09:00
Worros
81df5a8919 Add Full Tilt flhe o supported games 2009-03-13 02:21:31 +09:00
Worros
d8a689b9fe Quick fix 2009-03-13 02:18:34 +09:00
Worros
76ca6beab0 Update Betfair importer a bit
No longer crashes on test file, but doesn't actually import anything
yet.
2009-03-12 15:17:46 +09:00
Worros
c582507b9f Quick fix for typo - Fixes FTP Razz import 2009-03-12 10:49:16 +09:00
Matt Turnbull
0058f47775 fulltilt razz. is this complete? can you check whether it imports? 2009-03-11 16:51:58 +00:00
Matt Turnbull
f714b25487 everleaf stud markstreets, antes, bringin
todo: completes
todo: strange pot bug :( maybe go away if we add bringin completes or
something
fulltilt: warning if bringin not found
2009-03-10 17:25:49 +00:00
Matt Turnbull
2c44d634f9 commit, time to pull carl's ftp stud stuff 2009-03-10 16:17:54 +00:00
Matt Turnbull
0dc1bafdeb gameinfo changes to fit db spec in docs/
some temporary bits, broken commit do not use.
2009-03-09 23:03:17 +00:00
Worros
da88e1b20c Merge branch 'master' of git://git.assembla.com/mctfpdb
Conflicts:

	pyfpdb/EverleafToFpdb.py
	pyfpdb/FulltiltToFpdb.py
2009-03-08 14:09:16 +09:00
Worros
b07823b372 Merge branch 'futz' from Matt
Conflicts:

	pyfpdb/EverleafToFpdb.py
	pyfpdb/FulltiltToFpdb.py
	pyfpdb/Hand.py
	pyfpdb/HandHistoryConverter.py
2009-03-08 00:43:33 +09:00
Worros
dee2c63a5d Syntax cleanups and optimisations 2009-03-07 23:35:52 +09:00
Worros
c505e98bcf Player regex interface updates from monkeyfutz 2009-03-07 18:06:52 +09:00
Matt Turnbull
ca6f6e513b message 2009-03-06 18:10:04 +00:00
Matt Turnbull
426b5c2db5 had a go at PokerStars -> PokerStars conversion...
fpt : bugfix
hand : DrawHand class, moved discardCards there
is 'studhi' = '7 Card Stud' in PokerStars string? was playing with
Natalie HORSE file
2009-03-06 01:24:38 +00:00
Worros
50a1ec1ccf Add logging function from futz 2009-03-05 01:46:01 +09:00
Worros
740fe92914 rename hand.string to hand.handText
Few other minor updates to match monkeyfutz
2009-03-05 00:10:08 +09:00
Worros
e8552023da Whitespace and comment updates from monkeyfutz 2009-03-04 23:29:13 +09:00
Matt Turnbull
7049a959ec I attempted to merge monkeyfutz into master.
Let me know how you get on.
I just remembered autoimport probably broken at this point, I have
changed the way HHC is called and only been testing standalone
filtering..
Just try it and then git checkout ^HEAD

Merge branch 'monkeyfutz'

Conflicts:

	pyfpdb/EverleafToFpdb.py
	pyfpdb/FulltiltToFpdb.py
	pyfpdb/Hand.py
2009-03-03 18:45:02 +00:00
Matt Turnbull
36befa43a8 More futzing
- made it so that Hand.__init__ calls the hhc readX methods in the right
  order for that kind of Hand (Stud or Holdem/Omaha)
- hhc.readX methods then callback Hand.addX methods
Why? WHY! I hear you ask. Actually I can see there's very little gain,
sorry about that; but it sort of makes sense. Now you just make the
right kind of Hand, give it the text and the right kind of HHC filter,
and it makes itself.
- apart from that, biggest actual thing done is probably in adding
  player cards for stud hands -- revamped and made it really clear (I
think) whats happening (see FullTilt.readStudPlayerCards)
When I run FullTiltToFpdf.py it goes through all the hands.
- Still have some print statements, have been changing them to
  logging.debug or logging.info as I come across them.
  You may find "tail -f logging.out" useful
Actually I'm not at all convinced about the use of logging except that
you can redirect it to stderr quite easily and then set the threshold
for what gets logged quite easily, so that might be a plus.
- Oh and the subclassing of Hand is getting clearer.
2009-03-02 21:48:30 +00:00
Worros
25ae39d7b5 Minor fixups: set->list and FullTilt lookup table 2009-03-03 00:10:15 +09:00
Worros
3fba85456c Fix button regex 2009-02-27 01:26:50 +09:00
Worros
6d862cff52 addPlayerCards done - now need to print it 2009-02-27 00:35:15 +09:00
Worros
440602198f Fix(?) HeroCards regex for stud 2009-02-26 01:48:41 +09:00
Worros
354a67c0e4 Some bringin code for stud/razz 2009-02-26 01:23:46 +09:00
Worros
a71be6ddd3 Add stud/razz ante for FullTilt converter 2009-02-26 00:45:46 +09:00
Matt Turnbull
65c34a7377 keeping Everleaf uptodate with FullSteamAhead changes
Also, made static regexes class-wide, so compile once on import
2009-02-25 14:35:28 +00:00
Matt Turnbull
abf489f0c6 need re.MULTILINE and not to have syntax errors 2009-02-25 14:14:42 +00:00
Matt Turnbull
bb4eece2f7 Merge branch 'master' of git://git.assembla.com/fpdboz
Only seemed to conflict the [ --> \[ in the HeroCards re

Conflicts:

	pyfpdb/FulltiltToFpdb.py
2009-02-25 12:36:45 +00:00
Worros
d500a9f9c5 More Razz - First pass through hh that doesn't crash 2009-02-25 21:34:05 +09:00
Matt Turnbull
8cccce512d regexs start at start of lines 2009-02-25 12:34:01 +00:00
Worros
3d9026da2c More razz updates 2009-02-25 19:32:12 +09:00
Worros
a4f0e9a1fd Fulltilt nlhe working, more razz stuff
Everleaf still broken - need to create/move button regex to new abstract
method
2009-02-25 02:05:51 +09:00
Worros
7fd90ce760 Thinko - use right regex 2009-02-25 01:27:10 +09:00
Worros
b38c62367a Preliminary razz support for Fulltilt
Breaks stuff
2009-02-25 01:17:25 +09:00
Worros
5aecfb8e30 Oops. fix syntax error 2009-02-23 19:24:21 +09:00
Worros
232c0df33a determineGameType fixed for FTP, PLO working 2009-02-22 18:07:11 +09:00
Worros
baae7af5e0 Remove a tonne of debug, neaten output 2009-02-22 14:37:38 +09:00
Worros
3febe073cc Make FullTilt wrk with new importer 2009-02-22 12:42:16 +09:00
Matt Turnbull
58411a1ae3 use python datetime handling functions : strptime strftime 2008-12-16 23:23:33 +00:00
Matt Turnbull
6f1e335275 FullTilt output is looking good, tried it on a HandHQ history, no crashes!
Hand.py: report summary line only for players who acted preflop (as with
stacks)

bug in a BB calling itself fixed
2008-12-16 21:49:04 +00:00
Matt Turnbull
1f1332b849 a bit more FTP; works? on 7 hand sample. No regression test of Everleaf
:(
2008-12-16 21:08:10 +00:00
Matt Turnbull
f230a82add board cards read
button read
2008-12-16 17:26:58 +00:00
Worros
1a46230176 Add first pass Full Tilt converter 2008-12-16 23:45:58 +09:00