From b85f8ec155060a7dbc9c7868f559b2820329ccca Mon Sep 17 00:00:00 2001 From: PassThePeas Date: Wed, 26 Aug 2009 01:13:34 +0200 Subject: [PATCH 01/10] Some fixes in FTP summary parsing and preparations for summary import in DB. No behaviour change expected modified: FulltiltToFpdb.py * Tourney Summary File parsing : add support for Madness tourneys * HH file parsing : enhance Tourney topline parsing to retrieve some info (HU, Rebuy, KO, Turbo, ...) and store it into Hand object modified: Hand.py * Some attributes added to store tourney specific info modified: SQL.py * Add a new request (getTourneyTypeIdByTourneyNo) to help finding a tourney already in db (preparation for Tourney Summary import) modified: Tourney.py * Attribute tourneyComment added modified: fpdb_parse_logic.py * Change parameters in call of fpdb_simple.recogniseTourneyTypeId modified: fpdb_simple.py * recogniseTourneyTypeId : signature changed to allow for the search of a tourney id already in db prior to searching for tourneyTypeId --- pyfpdb/FulltiltToFpdb.py | 45 ++++++++++++++++++++++++++++---------- pyfpdb/Hand.py | 9 ++++++++ pyfpdb/SQL.py | 6 +++++ pyfpdb/Tourney.py | 7 +++--- pyfpdb/fpdb_parse_logic.py | 3 ++- pyfpdb/fpdb_simple.py | 23 ++++++++++++++----- 6 files changed, 71 insertions(+), 22 deletions(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 30b9cb2d..b8ea378b 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -57,6 +57,13 @@ class Fulltilt(HandHistoryConverter): (?P\(partial\))?\n (?:.*?\n(?PHand\s\#(?P=HID)\shas\sbeen\scanceled))? ''', re.VERBOSE|re.DOTALL) + re_TourneyExtraInfo = re.compile('''(((?P[^$]+)? + (?P\$)?(?P[.0-9]+)?\s*\+\s*\$?(?P[.0-9]+)? + (\s(?P(KO|Heads\sUp|Matrix\s\dx|Rebuy|Madness)))? + (\s(?PShootout))? + (\s(?PSit\s&\sGo))? + (\s\((?PTurbo)\))?)|(?P.+)) + ''', re.VERBOSE) re_Button = re.compile('^The button is in seat #(?P