diff --git a/pyfpdb/AbsoluteToFpdb.py b/pyfpdb/AbsoluteToFpdb.py old mode 100644 new mode 100755 index 3fc42665..b1cf7ded --- a/pyfpdb/AbsoluteToFpdb.py +++ b/pyfpdb/AbsoluteToFpdb.py @@ -26,6 +26,13 @@ from HandHistoryConverter import * # Class for converting Absolute HH format. class Absolute(HandHistoryConverter): + + # Class Variables + sitename = "Absolute" + filetype = "text" + codepage = "cp1252" + siteid = 8 + HORSEHand = False # Static regexes re_SplitHands = re.compile(r"\n\n\n+") @@ -35,8 +42,11 @@ class Absolute(HandHistoryConverter): #Seat 6 - FETS63 ($0.75 in chips) #Board [10s 5d Kh Qh 8c] - re_GameInfo = re.compile(ur"^Stage #([0-9]+): (?PHoldem|) (?PNo Limit|) (?P\$| €|)(?P[0-9]*[.0-9]+)", re.MULTILINE) - re_HandInfo = re.compile(ur"^Stage #(?P[0-9]+): .*(?P\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d).*\nTable: (?P.*) \(Real Money\)", re.MULTILINE) + re_GameInfo = re.compile(ur"^Stage #([0-9]+): (?PHoldem|HORSE)(?: \(1 on 1\)|)? ?(?PNo Limit|Pot Limit|Normal|)? ?(?P\$| €|)(?P[.0-9]+)/?(?:\$| €|)(?P[.0-9]+)?", re.MULTILINE) + 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 #(?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
[-\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) + (?P\d+:\d+:\d+\s\w+\s-\s\d+/\d+/\d+)\s? + (?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
[-\ a-zA-Z\d]+)\'\s - #((?P\d+)-max\s)? - #(?P\(Play\sMoney\)\s)? - #(Seat\s\#(?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
[ 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