Revert "changed all of the currency substitutions from byte stream (i.e. \xe2\x82\xac for EURO) to unicode (u'\u20AC') as it was throwing unicode errors when attempting to format the string in the various regex statements. I am aware that I may be the only one to encounter this problem."

This reverts commit d0ae2a155d.

Conflicts:

	pyfpdb/FulltiltToFpdb.py
This commit is contained in:
Worros 2011-03-29 15:46:15 +08:00
parent efa1a9e6cf
commit 684689c9db
10 changed files with 16 additions and 16 deletions

View File

@ -35,7 +35,7 @@ class Everest(HandHistoryConverter):
siteID = 15 siteID = 15
substitutions = { substitutions = {
'LS' : u"\$|\u20ac|", 'LS' : u"\$|\xe2\x82\xac|\u20ac|",
'TAB' : u"-\u2013'\s\da-zA-Z", # legal characters for tablename 'TAB' : u"-\u2013'\s\da-zA-Z", # legal characters for tablename
} }

View File

@ -45,7 +45,7 @@ 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' : u"\$|\u20AC|", # legal currency symbols - Euro(cp1252, utf-8) 'LS' : "\$|\xe2\x82\xac|", # 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
} }

View File

@ -42,12 +42,12 @@ class OnGame(HandHistoryConverter):
siteId = 5 # Needs to match id entry in Sites database siteId = 5 # Needs to match id entry in Sites database
mixes = { } # Legal mixed games mixes = { } # Legal mixed games
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": u"\u20ac", "GBP": u"\xa3"} # ADD Euro, Sterling, etc HERE sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": u"\u20ac", "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' : u"\$|\\u20AC" # legal currency symbols - Euro(cp1252, utf-8) 'LS' : u"\$|\xe2\x82\xac|\u20ac" # legal currency symbols - Euro(cp1252, utf-8)
} }
currencies = { u'\u20AC':'EUR', '$':'USD', '':'T$' } currencies = { u'\u20ac':'EUR', u'\xe2\x82\xac':'EUR', '$':'USD', '':'T$' }
limits = { 'NO_LIMIT':'nl', 'POT_LIMIT':'pl', 'LIMIT':'fl'} limits = { 'NO_LIMIT':'nl', 'POT_LIMIT':'pl', 'LIMIT':'fl'}

View File

@ -39,10 +39,10 @@ class PacificPoker(HandHistoryConverter):
siteId = 13 # Needs to match id entry in Sites database siteId = 13 # Needs to match id entry in Sites database
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": u"\u20AC", "GBP": u"\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"\$|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8) 'LS' : "\$|\xe2\x82\xac|" # 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

@ -46,10 +46,10 @@ class PartyPoker(HandHistoryConverter):
siteId = 9 siteId = 9
filetype = "text" filetype = "text"
sym = {'USD': "\$", 'EUR': u"\u20ac", 'T$': ""} sym = {'USD': "\$", 'EUR': u"\u20ac", 'T$': ""}
currencies = {"\$": "USD", "$": "USD", u"\u20ac": "EUR", '': "T$"} currencies = {"\$": "USD", "$": "USD", u"\xe2\x82\xac": "EUR", u"\u20ac": "EUR", '': "T$"}
substitutions = { substitutions = {
'LEGAL_ISO' : "USD|EUR", # legal ISO currency codes 'LEGAL_ISO' : "USD|EUR", # legal ISO currency codes
'LS' : u"\$|\u20ac|", # Currency symbols - Euro(cp1252, utf-8) 'LS' : u"\$|\u20ac|\xe2\x82\xac|", # Currency symbols - Euro(cp1252, utf-8)
'NUM' : u".,\d", 'NUM' : u".,\d",
} }

View File

@ -45,7 +45,7 @@ class PokerStarsSummary(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"\$|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8) 'LS' : u"\$|\xe2\x82\xac|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8)
} }
re_SplitTourneys = re.compile("PokerStars Tournament ") re_SplitTourneys = re.compile("PokerStars Tournament ")

View File

@ -39,10 +39,10 @@ class PokerStars(HandHistoryConverter):
siteId = 2 # Needs to match id entry in Sites database siteId = 2 # Needs to match id entry in Sites database
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": u"\u20AC", "GBP": u"\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"\$|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8) 'LS' : "\$|\xe2\x82\xac|" # 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

@ -45,7 +45,7 @@ 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"\$|\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

@ -52,10 +52,10 @@ class Winamax(HandHistoryConverter):
siteId = 14 # Needs to match id entry in Sites database siteId = 14 # Needs to match id entry in Sites database
mixes = { } # Legal mixed games mixes = { } # Legal mixed games
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": u"\u20AC", "GBP": u"\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' : u"\$|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8) 'LS' : "\$|\xe2\x82\xac|" # 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'}