Commit Graph

86 Commits

Author SHA1 Message Date
Matt Turnbull
76e467a5d4 get rid of thread 2009-03-12 12:24:23 +00:00
Matt Turnbull
cd3d4ef835 no longer 'safely' appends -- will now overwrite out_path. 2009-03-12 03:58:42 +00:00
Matt Turnbull
22df50327a Everleaf stud hands are passed if not instantiated with debugging=True
(this is default from cmdline but not from fpdb_import)
Eerleaf gametype tests... added one.
Everleaf action fixed to capture bet amounts, I hope. The 'complete to'
has a problematic . at the end, so we must handle
[ $ 1.40 USD ]
[ $ 1 USD ]
$1.40.
$1. (haven't seen this one yet)
Sorry I've kind of destroyed the sanityCheck thing, some of it belongs
in fpdb_simple where the paths are made. I've retained check for
in_path!=out_path.
2009-03-10 21:49:23 +00:00
Matt Turnbull
2c2d912c6e Merge branch 'master' of git://git.assembla.com/fpdboz
Conflicts:

	pyfpdb/EverleafToFpdb.py
	pyfpdb/Hand.py
	pyfpdb/HandHistoryConverter.py
2009-03-10 16:52:18 +00:00
Matt Turnbull
2c44d634f9 commit, time to pull carl's ftp stud stuff 2009-03-10 16:17:54 +00:00
Worros
88cadd36ad Fix Everleaf to start parsing 7 Card Stud games
Still missing readAntes
2009-03-11 00:57:13 +09:00
Worros
e87118e9ae Make PLO work on Everleaf again 2009-03-11 00:14:23 +09: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
d6b5f5d019 Merge branch 'master' of git://git.assembla.com/fpdb-eric
Conflicts:

	pyfpdb/Configuration.py
2009-03-09 19:22:54 +09: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
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
eblade
4f1697d390 HHC: fix missing second arg to determineGameType 2009-03-05 10:17:17 -05:00
Matt Turnbull
75dcf002f9 Configuration: _getframe(0) so that GuiAutoImport can run standalone
(stack not deep enough to go one deeper)
fpdb_import: Everleaf plumbing back in place.
GuiAutoImport.py: run standalone.
2009-03-05 01:12:15 +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
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
703fa40073 Merge branch 'master' of git://git.assembla.com/fpdboz
Conflicts:

	pyfpdb/Hand.py
2009-03-03 12:24:42 +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
Matt Turnbull
5c26bb028d Merge branch 'master' into monkeyfutz
Everleaf converts hands
Moved process hand logic into the hand subclass that knows what it
wants, it calls back to the hhc (which knows about the format) to populate itself

Conflicts:

	pyfpdb/EverleafToFpdb.py
	pyfpdb/Hand.py
	pyfpdb/HandHistoryConverter.py
2009-03-01 23:22:47 +00:00
Worros
3cf8239cc9 Fix bug inmporting Everleaf PLO 2009-03-01 23:05:21 +09:00
Matt Turnbull
7087ede374 temp commit 2009-02-27 18:42:53 +00:00
Matt Turnbull
da602b2908 temp 2009-02-26 15:36:23 +00:00
Matt Turnbull
0986e36648 work in progress!
- command line options
  Try the following
  ./Everleaf --help
  cat everleaf.txt | ./Everleaf -i - -o -
  Try using -i -, and pasting in a hand. Be aware it needs an EOF
<ctrl>-d (unless you specify --follow, which isn't done yet)
- HHC is a thread
- hand gametypes per hand
- lots of stupid little things just to cause trouble
- added logging

Not yet done:
- tail -f mode
- integration into fpdb_import. Two options for grand plan here:
  1)  recently modified files get a HHC filter attached
      when the HHC runs out of pipe it waits
      runUpdated finds modified files and notifies the thread
  2)  the thread follows independently, when it runs out of input it
sleeps and then tries again at intervals
I like both, 1) involves bigger changes to fpdb_import whilst with 2) we
just point the existing fpdb_import code at the filter output (the way
we currently do filtering has to be altered though)

Comments welcome of course.
2009-02-26 00:59:36 +00: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
Worros
8b9b77edb9 Merge branch 'master' of git://git.assembla.com/fpdb-eric 2009-02-25 20:40:55 +09:00
eblade
cda897608c EverleafToFpdb: should at least recognise Stud, once the HandInfo regex is fixed. Not that it'll do anything good with it.
HHC: return doing nothing but printing a warning message to output, if determineGameType() returns None
2009-02-25 06:01:44 -05:00
Worros
3d9026da2c More razz updates 2009-02-25 19:32:12 +09:00
Worros
dd6c23ad85 Move markStreets outside of if statement in main processing loop 2009-02-25 02:12:45 +09:00
Worros
b38c62367a Preliminary razz support for Fulltilt
Breaks stuff
2009-02-25 01:17:25 +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
5c6793d373 Add sanity check to HHC
Make sure input file and output file are different so we dont overwrite
the source.
2009-02-21 22:06:10 +09:00
eblade
824f6a3129 Merge branch 'master' of git://git.assembla.com/mctfpdb.git
Conflicts:
	pyfpdb/HandHistoryConverter.py
2009-02-20 15:58:00 -05:00
Matt Turnbull
483e177346 Explicit matching of player names
About the only place where we are guaranteed to get all the players'
names correctly is in the seating plan in the hand header. We extract
the names and build a regex that matches only the names. We only do this
if the current regex is out of date, to avoid recompiling them too
often.
I also did away with self.rexx because it seemed unnecessary and was
difficult to work with.
2009-02-20 16:29:52 +00:00
eblade
f0dc69250c Merge branch 'master' of git://git.assembla.com/fpdboz.git 2009-02-20 02:30:41 -05:00
Worros
e5ab933659 Fix major bug in fpdb_import
Hat tip to Eric
2009-02-20 16:06:22 +09:00
eblade
71b47c237a Merge branch 'master' of git://git.assembla.com/fpdboz.git
Conflicts:
	pyfpdb/HandHistoryConverter.py
2009-02-19 16:59:28 -05:00
eblade
14cf64f81b HHC will return without generating python errors if given an empty input, commented out echoing the input 2009-02-19 16:56:37 -05:00
Worros
08a4d568cc Fix parseHandStartTime for FullTilt
Doesn't come close to fixing Full Tilt tourneys as far as i can tell.
2009-02-20 02:26:29 +09:00
Worros
bc8f1b56b6 Remove Unicode mode from file read.
Hope this fixes the issue with Erics source file getting nuked
2009-02-19 22:58:29 +09:00
eblade
d2159b6430 changes to make auto-import recursive, and to get the converter thingee kind of working 2009-02-19 05:38:51 -05:00
Worros
6214131713 Small change - note we should error check 2009-02-05 18:50:50 +09:00
Worros
315d010311 Make Everleaf converter actually function.
Makes HandHistoryConverter actually write out a file to
$hhArchiveBase/sitename/

Adds code in importer call the functions in EverleafToFpdb
2009-02-05 18:28:18 +09:00
Matt Turnbull
58411a1ae3 use python datetime handling functions : strptime strftime 2008-12-16 23:23:33 +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
8bd58e849e some generality changes for FTP support 2008-12-16 17:14:37 +00:00
Matt Turnbull
988a7e3eb5 Added 'and is all-in' logic.
Altered to read actions in correct street order. hand.streetList must be
set correctly for different types of games.
2008-12-16 04:29:11 +00:00
Matt Turnbull
9c5d0f4598 Writes hands to stderr, miscellanous crap to stdout; usuable as cmdline
filter: ./Everleaf 'hhfile' 1>/dev/null 2>outfile

Holecards are sets -- should work on Omaha hi hands also.

Successfully imported Speed_Kuala_full.txt to fpdb.

Added gettext.

cards strings are handled a little better (one fewer regex)

Testfile can be supplied as first cmd line arg.
2008-12-15 23:56:19 +00:00