Commit Graph

216 Commits

Author SHA1 Message Date
Worros
ac728fffb2 FTP and Timezone fix.
Error reported with the following hand hostory from FTP France:

Full Tilt Poker.fr Game #22632637058: Daily Euro (174599326), Table 3 - 10/20 - No Limit Hold'em - 20:15:39 CET - 2010/07/27

The existing FTP parser crashed on CET times.

1) Fixed parser to accept CET
2) Added timezone offset into HHC

Not happy with TZ1/TZ2 solution.
2010-07-29 19:59:45 +08:00
steffen123
522a745ead REFACTOR: move timezone changing method to HHC so it can used by other parsers 2010-07-13 20:37:06 +02:00
steffen123
178b528d3b change calls to python2 back to python 2010-07-08 20:01:03 +02:00
steffen123
c6b6f8a788 many not really separable changes for IMAP import and associated cleaning
- deactivated use of TourneySummary (short: TS) from HHC and subclasses
- menu entry for IMAP import
- converted ImapSummaries (short: IS) to use the config file
- IS now optionally supports non-SSL and can run on folders other than INBOX
- removed gametypes and getGameTypeAsString from TS method as identical one is in Hand
- some other stuff
2010-07-08 19:46:25 +02:00
steffen123
3b24fd18b2 some cleanups:
- updated copyright notices
- added copyright notices that were missing
- changed python to python2
- added gpl-2/3 license texts
- removed THANKS.txt file as the wiki version is more up to date
- removed empty fpdb_db.py
- added GPL2 to debian license file
2010-07-04 03:05:16 +02:00
Worros
0c3cdb12f8 General cleanup - Exception messages and improved logging.
Stars HHC, HHC itself and Hand.

Should not get the first 100 characters of an failing hand in the log, which contains the handid for later reference.

Played around with the number of characters a while ago - 100 chars is about the sweet spot.
2010-06-04 15:59:47 +08:00
Worros
6e60314926 First part of making FTP archive files work 2010-04-23 11:49:57 +08:00
Eratosthenes
a9ec972ba5 Clean some pylint errors and obsolete TODOs. 2010-02-19 20:14:34 -05:00
Eratosthenes
c33575911d Don't make folders or files for Stars format HHs. 2010-02-19 17:50:45 -05:00
Eratosthenes
97ec91c165 Revert fix removing the creation of folders for converted HHs. 2010-02-18 16:00:12 -05:00
Eratosthenes
51e88dbadd Don't make empty files for Stars format HH. 2010-02-13 18:23:59 -05:00
Eric Blade
e88d745e7d Merge branch 'master' of git://git.assembla.com/fpdb-sql.git 2010-02-02 10:51:22 -05:00
Eric Blade
6e30bb2067 Merge branch 'master' of git://git.assembla.com/fpdboz.git 2010-02-02 10:48:17 -05:00
sqlcoder
d4248706e4 remove surplus get_logger calls, tidy up log messages some more 2010-02-01 22:31:00 +00:00
Eric Blade
27f95c51b2 whitespace 2010-02-01 08:48:28 -05:00
sqlcoder
f7b402bcdb remove execute from permissions on some files in last commit 2010-01-31 11:27:37 +00:00
sqlcoder
5e9486aa3d config changes for logging: logs rotate and go to APPDATA, hud_config now goes in /fpdb/ if they must use it but logging.conf stays in /pyfpdb/. TODO: Some logging still into /fpdb/log/ 2010-01-31 11:25:24 +00:00
Eratosthenes
7d7ba94da1 Fix problem with finding HHs for utf-16 files. 2010-01-26 10:56:07 -05:00
Worros
29e705f337 Remove NEWIMPORT variable.
No going back now :)
2010-01-23 13:37:41 +08:00
Gerko de Roo
3553bdaf71 search string for table detect changed 2009-12-28 10:14:04 +08:00
Worros
4d8d678d64 [NEWIMPORT] Make seek into autoimport function
Now that the legacy import path is gone, enable the index for HHC
2009-12-22 21:40:37 +08:00
Worros
26fc0b5928 Add ability to import Stars archive files.
PokerStars support can provide a HH archive. The format is similar but not the same as a a standard hh format as it contains an additional line "Hand #X" between each hand.

Patch adds an option -s to GuiBulkImport, which when specified will strip these lines out and continue parsing.
2009-12-17 18:42:50 +08:00
Worros
ee205c3b29 [NEWIMPORT] Partially fix number of hands parsed reporting 2009-12-04 17:56:56 +08:00
Worros
fc20330f2b [NEWIMPORT] Don't actually writeHand on NEWIMPORT 2009-11-30 15:11:00 +08:00
Worros
a6a3217bbc Fix draw parsing finally? 2009-11-29 16:54:15 +08:00
Worros
ef9abd2948 Force all output from HHCs to by utf8 2009-11-24 11:21:55 +08:00
Eratosthenes
4e78dd8d93 Merge branch 'master' of git://github.com/grindi/fpdb-grindi 2009-11-13 22:02:16 -05:00
Eratosthenes
5021cae297 Clean up logging changes. 2009-11-09 19:30:23 -05:00
grindi
dbaf4dbdbc Make msgs about parse errors more verbose
+ fix small bug in FpdbParseError
2009-11-07 22:01:30 +03:00
grindi
9dd600702a Moved window title re to HHC classes
Just redefine function getTableTitleRe in coresponding hhc for custom re
2009-11-07 20:30:47 +03:00
unknown
a5de7c9b6b cleanup 2009-11-03 15:14:20 -05:00
unknown
a6b7292943 mostly None checkings fixed (== to is != to is not) 2009-11-03 14:30:52 -05:00
unknown
64ee502239 here's the HHC patch i forgot to add on last commit 2009-10-31 21:25:27 -04:00
Mika Bostrom
b8f19741e0 Fix packaging issues
Affected files:
* Configuration.py
* Database.py
* HandHistoryConverter.py
* fpdb_import.py

and setup.py to a lesser extent.

Logging requires a configuration file when initialising the class. If we
are executing from outside the source tree, this file is not present.
Catch config parser's error and try to provide the logging config file
from debian package path.

Update symlink target to match python-support from latest Debian and the
oncoming Ubuntu versions.
2009-10-21 20:24:46 +03:00
Eric Blade
7283d09b4d replace "trying *codepage*" message to console with an error message only if none of our specified codepages is successful 2009-09-11 00:38:20 -05:00
Eric Blade
1f9dd8f8e9 HHC/fpdb_import: throw in some calls to gtk.main_iteration(False)
GuiBulkImport: replace "Importing" label with actual progressbar (does not use percentages, simply an activity bar)
2009-09-09 22:10:55 -05:00
Eric Blade
2397a59483 add warning_box func to fpdb, add validate_config func, checks existence of hhArchiveBase, pops up warnings if not present
hhc traps errors creating folders, need to learn how to make it fail properly afterwards.
2009-09-09 18:20:50 -05:00
Worros
4f98b29b26 Merge branch 'master' of git://git.assembla.com/fpt_fpdb
Conflicts:
	pyfpdb/Database.py
2009-09-04 12:45:49 +08:00
PassThePeas
91ebbe79e1 Last part of core tourney import
Database.py : tStoreTourneyPlayers and tUpdateTourneysHandsPlayers implemented
HandHistoryConverter.py : fix for 0-byte summary files
SQL.py : new queries
Tourney.py : cleanup stdout
2009-09-04 02:01:41 +02:00
Eric Blade
bd7f3de3d7 Conflicts:
pyfpdb/fpdb_import.py
2009-08-29 06:54:20 -05:00
Matt Turnbull
d2380ba738 merge from futz2 branch 2009-08-28 18:24:51 +01:00
Ray
cb8bc13ceb Allow self.codepage to be a list of codecs to try. 2009-08-23 19:40:39 -04:00
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
Matt Turnbull
29a0ad85c7 full path to logging.config, small fix in Configuration.Database string repr 2009-08-15 22:36:14 +01:00
Worros
0baabb0368 Merge branch 'master' of git://github.com/grindi/fpdb-grindi
Conflicts:
	pyfpdb/HandHistoryConverter.py
2009-08-12 22:51:49 +08:00
Worros
cfd7b40ab6 Merge branch 'master' of git://repo.or.cz/fpbd-bostik
Conflicts:
	pyfpdb/HandHistoryConverter.py
2009-08-12 22:49:18 +08:00
grindi
dd17155aa9 Fixed bug 7 ( http://trac-git.assembla.com/free_poker_tools/ticket/7 ) 2009-08-12 12:47:18 +04:00
grindi
70e8a49b10 Merge branch 'master' of git://git.assembla.com/free_poker_tools
Conflicts:
	pyfpdb/HandHistoryConverter.py
2009-08-12 02:39:33 +04:00
Ray
d69ab83ee5 Fix encoding problem in the written Stars HHs. 2009-08-11 17:43:28 -04:00
Matt Turnbull
9f2834488c merged with carl, fixed conflict in hhc 2009-08-09 20:10:14 +01: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
Ray
0a1e6e57b5 Merge branch 'master' of git://git.assembla.com/fpdboz 2009-08-08 09:29:41 -04:00
grindi
25be578e7d Fixed imported hands accounting 2009-08-06 21:26:55 +04:00
grindi
30ae9da2df Fixed hung up on incorrect hand history 2009-08-06 19:15:55 +04:00
Worros
a37adde67e Catch up to Eric - fix markStreets regex 2009-08-06 11:30:21 +08:00
Ray
71aaf62c40 Fix my last fix of previous commit. 2009-08-05 23:25:43 -04:00
Ray
ee01deb852 Fix problem with previous commit. 2009-08-05 23:20:28 -04:00
Ray
74d64eca9b Uncomment the new lines to calculate some stats. 2009-08-05 19:11:46 -04: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
ba42a7c453 Get rid of debuggin output. 2009-07-22 19:27:12 -04:00
Ray
9d803957cb Detect mixed games in FTP HH. Fix typos. 2009-07-22 10:24:29 -04:00
Ray
10f454ae77 Guess maxseats when not supplied by SiteToFpdb. 2009-07-20 10:01:51 -04: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
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
0d5af4c974 Make Win2day client use updated readHeroCards api 2009-07-16 12:58:39 +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
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
Matt Turnbull
b252e350d6 fix my breakage.. 2009-07-14 23:34:47 +01:00
Ray
21d2276679 Get rid of intermediate hand obj print. 2009-07-06 12:01:39 -04:00
sqlcoder
0a7c340656 Added timing info for index drop/create. Some small mods to output during import (obviously just change any you don't like) 2009-06-07 22:21:58 +01:00
Matt Turnbull
b2ac60de82 tailhands also had the wrong regex. Corrected. 2009-04-02 21:20:41 +01:00
Matt Turnbull
d81627da3f Really fix handcount bug? 2009-04-02 21:16:36 +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
Matt Turnbull
51444f2ac4 print a showdown section if anyone showed any kind of hand (obv logic
not 100%, people can show cards without a showdown, but legacy importer
expects cards there, right?)

slight change to get through the horse test file
2009-03-14 15:02:23 +00:00
Worros
2d849c69e7 Refactor HHC call a bit, make sure out_fh gets closed 2009-03-13 00:31:29 +09:00
Worros
c523fce123 Merge branch 'master' of git://git.assembla.com/mctfpdb
Conflicts:

	pyfpdb/fpdb_import.py
2009-03-12 22:57:43 +09:00
Matt Turnbull
76e467a5d4 get rid of thread 2009-03-12 12:24:23 +00:00
Worros
2bb4593672 Compare determineGameType to readSupportedGames
Allows us to parse the header (and test it) and still skip the file.

May produce empty files in autoimport...
2009-03-12 19:43:28 +09: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