From cbbf820eb588f2410f4e6fb55125cb2d31644ebd Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 18 Jul 2009 21:33:00 -0400 Subject: [PATCH] Add support for tournaments. --- pyfpdb/FulltiltToFpdb.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index d9cc490d..638f0368 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -23,11 +23,14 @@ import logging from HandHistoryConverter import * # Fulltilt HH Format converter +# TODO: cat tourno and table to make table name for tournaments class Fulltilt(HandHistoryConverter): # Static regexes - re_GameInfo = re.compile('''-\s(?P\$|)? + re_GameInfo = re.compile('''(?:(?P.+)\s\((?P\d+)\),\s)? + .+ + -\s(?P\$|)? (?P[.0-9]+)/ \$?(?P[.0-9]+)\s (Ante\s\$(?P[.0-9]+)\s)?-\s @@ -37,14 +40,15 @@ class Fulltilt(HandHistoryConverter): re_SplitHands = re.compile(r"\n\n+") re_TailSplitHands = re.compile(r"(\n\n+)") re_HandInfo = re.compile('''.*\#(?P[0-9]+):\s - Table\s(?P[-\sa-zA-Z]+)\s + (?:(?P.+)\s\((?P\d+)\),\s)? + Table\s(?P
[-\s\da-zA-Z]+)\s (\((?P.+)\)\s)?-\s \$?(?P[.0-9]+)/\$?(?P[.0-9]+)\s(Ante\s\$(?P[.0-9]+)\s)?-\s (?P[a-zA-Z\/\'\s]+)\s-\s (?P.*) ''', re.VERBOSE) re_Button = re.compile('^The button is in seat #(?P