diff --git a/pyfpdb/AbsoluteToFpdb.py b/pyfpdb/AbsoluteToFpdb.py old mode 100644 new mode 100755 index e8a77d2b..b1cf7ded --- a/pyfpdb/AbsoluteToFpdb.py +++ b/pyfpdb/AbsoluteToFpdb.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008, Carl Gherardi @@ -32,6 +32,7 @@ class Absolute(HandHistoryConverter): filetype = "text" codepage = "cp1252" siteid = 8 + HORSEHand = False # Static regexes re_SplitHands = re.compile(r"\n\n\n+") @@ -41,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|Pot Limit|Normal) (?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