diff --git a/pyfpdb/AbsoluteToFpdb.py b/pyfpdb/AbsoluteToFpdb.py index 6b57b1e4..c30f4544 100755 --- a/pyfpdb/AbsoluteToFpdb.py +++ b/pyfpdb/AbsoluteToFpdb.py @@ -2,12 +2,12 @@ # -*- coding: utf-8 -*- # # Copyright 2008-2010, Carl Gherardi -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -36,31 +36,55 @@ class Absolute(HandHistoryConverter): codepage = "cp1252" siteid = 8 HORSEHand = False - - # Static regexes - re_SplitHands = re.compile(r"\n\n\n+") - re_TailSplitHands = re.compile(r"(\n\n\n+)") -#Stage #1571362962: Holdem No Limit $0.02 - 2009-08-05 15:24:06 (ET) -#Table: TORONTO AVE (Real Money) Seat #6 is the dealer -#Seat 6 - FETS63 ($0.75 in chips) -#Board [10s 5d Kh Qh 8c] - re_GameInfo = re.compile(ur"""^Stage #(C?[0-9]+):\s+ - (?PHoldem|Seven\sCard\sHi\/L|HORSE) - (?:\s\(1\son\s1\)|)?\s+? - (?PNo Limit|Pot\sLimit|Normal|)?\s? - (?P\$|\s€|) - (?P[.0-9]+)/?(?:\$|\s€|)(?P[.0-9]+)? - """, re.MULTILINE|re.VERBOSE) - re_HorseGameInfo = re.compile(ur"^Game Type: (?PLimit) (?PHoldem)", re.MULTILINE) - # TODO: can set max seats via (1 on 1) to a known 2 .. - re_HandInfo = re.compile(ur"^Stage #C?(?P[0-9]+): .*(?P\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d).*\n(Table: (?P.*) \(Real Money\))?", re.MULTILINE) - re_TableFromFilename = re.compile(ur".*IHH([0-9]+) (?P
.*) -") # on HORSE STUD games, the table name isn't in the hand info! - re_Button = re.compile(ur"Seat #(?P
.*?)\ \(Real\ Money\))? + """, re.MULTILINE|re.VERBOSE|re.DOTALL) + + re_HorseGameInfo = re.compile( + ur"^Game Type: (?PLimit) (?PHoldem)", + re.MULTILINE) + + re_HandInfo = re_GameInfo + + # on HORSE STUD games, the table name isn't in the hand info! + re_RingInfoFromFilename = re.compile(ur".*IHH([0-9]+) (?P
.*) -") + re_TrnyInfoFromFilename = re.compile( + ur".*IHH ([0-9]+) (?P.*) "\ + ur"ID (?P\d+) \((?P
\d+)\) .* "\ + ur"(?:\$|\s€|)(?P[0-9.]+)\s*\+\s*(?:\$|\s€|)(?P[0-9.]+)" + ) + + # TODO: that's not the right way to match for "dead" dealer is it? + re_Button = re.compile(ur"Seat #(?P
[- a-zA-Z]+)\'(?P.+?$)?", re.MULTILINE) - re_Button = re.compile('Seat #(?P
[ a-zA-Z]+) - \$?(?P[.0-9]+)/\$?(?P[.0-9]+) - (?P.*) - (?P
[0-9]+):(?P[0-9]+) ET - (?P[0-9]+)/(?P[0-9]+)/(?P[0-9]+)Table (?P
[ a-zA-Z]+)\nSeat (?P