From bbf02c7ee3ae4ccb44fd70aab52a4cb3e7e29c68 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 2 Aug 2009 23:50:44 -0400 Subject: [PATCH 1/2] Added correct cp1252 symbols for Euros and GBP. --- pyfpdb/PokerStarsToFpdb.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 7f746e9e..fcfecb84 100755 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -30,10 +30,10 @@ 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 + sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\x80", "GBP": "\xa3"} # ADD Euro, Sterling, etc HERE substitutions = { 'LEGAL_ISO' : "USD|EUR|GBP|CAD", # legal ISO currency codes - 'LS' : "\$" # legal currency symbols ADD Euro, Sterling, etc HERE + 'LS' : "\$|\x80|\xa3" # legal currency symbols ADD Euro, Sterling, etc HERE } # Static regexes @@ -50,7 +50,7 @@ class PokerStars(HandHistoryConverter): (-\sLevel\s(?P[IVXLC]+)\s)? \(? # open paren of the stakes (?P%(LS)s|)? - (?P[.0-9]+)/%(LS)s? + (?P[.0-9]+)/(%(LS)s)? (?P[.0-9]+) \s?(?P%(LEGAL_ISO)s)? \)\s-\s # close paren of the stakes @@ -60,7 +60,7 @@ class PokerStars(HandHistoryConverter): re_PlayerInfo = re.compile(""" ^Seat\s(?P[0-9]+):\s (?P.*)\s - \(%(LS)s?(?P[.0-9]+)\sin\schips\)""" % substitutions, + \((%(LS)s)?(?P[.0-9]+)\sin\schips\)""" % substitutions, re.MULTILINE|re.VERBOSE) re_HandInfo = re.compile(""" From 5a94f16d16abe9b6dd6c9916dffeeb4b58d0d5e8 Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Mon, 3 Aug 2009 19:15:36 +0100 Subject: [PATCH 2/2] fix typo in column name --- pyfpdb/Database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index a7be2e10..bf3e20dd 100755 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -68,7 +68,7 @@ class Database: , {'tab':'Hands', 'col':'gametypeId', 'drop':0} # mct 22/3/09 , {'tab':'HandsPlayers', 'col':'handId', 'drop':0} # not needed, handled by fk , {'tab':'HandsPlayers', 'col':'playerId', 'drop':0} # not needed, handled by fk - , {'tab':'HandsPlayers', 'col':'tourneysTypeId', 'drop':0} + , {'tab':'HandsPlayers', 'col':'tourneyTypeId', 'drop':0} , {'tab':'HandsPlayers', 'col':'tourneysPlayersId', 'drop':0} , {'tab':'Tourneys', 'col':'siteTourneyNo', 'drop':0} ]