diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 20ba4319..7f746e9e 100755 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -29,9 +29,11 @@ class PokerStars(HandHistoryConverter): ############################################################ # Class Variables + mixes = { 'HORSE': 'horse', '8-Game': '8game', 'HOSE': 'hose'} # Legal mixed games + sym = {'USD': "\$", 'CAD': "\$", 'T$': ""} # ADD Euro, Sterling, etc HERE substitutions = { 'LEGAL_ISO' : "USD|EUR|GBP|CAD", # legal ISO currency codes - 'LS' : "\$" # legal currency symbols + 'LS' : "\$" # legal currency symbols ADD Euro, Sterling, etc HERE } # Static regexes @@ -54,19 +56,26 @@ class PokerStars(HandHistoryConverter): \)\s-\s # close paren of the stakes (?P.*$)""" % substitutions, re.MULTILINE|re.VERBOSE) + + re_PlayerInfo = re.compile(""" + ^Seat\s(?P[0-9]+):\s + (?P.*)\s + \(%(LS)s?(?P[.0-9]+)\sin\schips\)""" % substitutions, + re.MULTILINE|re.VERBOSE) + + re_HandInfo = re.compile(""" + ^Table\s\'(?P[-\ a-zA-Z\d]+)\'\s + ((?P\d+)-max\s)? + (?P\(Play\sMoney\)\s)? + (Seat\s\#(?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