changed the currency substitutions to byte stream AND unicode -- i.e. u'$|\xe2\x82\xac|\u20ac|'

This commit is contained in:
Chaz Littlejohn 2011-03-29 20:15:21 +00:00
parent b00c30cbbf
commit c19549b3da
5 changed files with 12 additions and 12 deletions

View File

@ -44,10 +44,10 @@ class FullTiltPokerSummary(TourneySummary):
} }
substitutions = { substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes 'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : "\$|\xe2\x82\xac|", # legal currency symbols - Euro(cp1252, utf-8) 'LS' : u"\$|\xe2\x82\xac|\u20ac|", # legal currency symbols - Euro(cp1252, utf-8)
'TAB' : u"-\u2013'\s\da-zA-Z", # legal characters for tablename 'TAB' : u"-\u2013'\s\da-zA-Z", # legal characters for tablename
'NUM' : u".,\d", # legal characters in number format 'NUM' : u".,\d", # legal characters in number format
} }
re_SplitTourneys = re.compile("^Full Tilt Poker Tournament Summary") re_SplitTourneys = re.compile("^Full Tilt Poker Tournament Summary")

View File

@ -41,8 +41,8 @@ class PacificPoker(HandHistoryConverter):
mixes = { 'HORSE': 'horse', '8-Game': '8game', 'HOSE': 'hose'} # Legal mixed games mixes = { 'HORSE': 'horse', '8-Game': '8game', 'HOSE': 'hose'} # Legal mixed games
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3", "play": ""} # ADD Euro, Sterling, etc HERE sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3", "play": ""} # ADD Euro, Sterling, etc HERE
substitutions = { substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes 'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : "\$|\xe2\x82\xac|" # legal currency symbols - Euro(cp1252, utf-8) 'LS' : u"\$|\xe2\x82\xac|\u20ac|" # legal currency symbols - Euro(cp1252, utf-8)
} }
# translations from captured groups to fpdb info strings # translations from captured groups to fpdb info strings

View File

@ -41,8 +41,8 @@ class PokerStars(HandHistoryConverter):
mixes = { 'HORSE': 'horse', '8-Game': '8game', 'HOSE': 'hose'} # Legal mixed games mixes = { 'HORSE': 'horse', '8-Game': '8game', 'HOSE': 'hose'} # Legal mixed games
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3", "play": ""} # ADD Euro, Sterling, etc HERE sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3", "play": ""} # ADD Euro, Sterling, etc HERE
substitutions = { substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes 'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : u"\$|\xe2\x82\xac|" # legal currency symbols - Euro(cp1252, utf-8) 'LS' : u"\$|\xe2\x82\xac|\u20ac|" # legal currency symbols - Euro(cp1252, utf-8)
} }
# translations from captured groups to fpdb info strings # translations from captured groups to fpdb info strings

View File

@ -44,8 +44,8 @@ class WinamaxSummary(TourneySummary):
} }
substitutions = { substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes 'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : u"\$|\xe2\x82\xac|\u20AC|" # legal currency symbols 'LS' : u"\$|\xe2\x82\xac|\u20ac|" # legal currency symbols
} }
re_GameType = re.compile("""<h1>((?P<LIMIT>No Limit|Pot Limit) (?P<GAME>Hold\'em))</h1>""") re_GameType = re.compile("""<h1>((?P<LIMIT>No Limit|Pot Limit) (?P<GAME>Hold\'em))</h1>""")

View File

@ -54,8 +54,8 @@ class Winamax(HandHistoryConverter):
mixes = { } # Legal mixed games mixes = { } # Legal mixed games
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3"} # ADD Euro, Sterling, etc HERE sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3"} # ADD Euro, Sterling, etc HERE
substitutions = { substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes 'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : "\$|\xe2\x82\xac|" # legal currency symbols - Euro(cp1252, utf-8) 'LS' : u"\$|\xe2\x82\xac|\u20ac|" # legal currency symbols - Euro(cp1252, utf-8)
} }
limits = { 'no limit':'nl', 'pot limit' : 'pl','LIMIT':'fl'} limits = { 'no limit':'nl', 'pot limit' : 'pl','LIMIT':'fl'}