From a11f4f61cd37b9f7092ec518909cb64ff70ab9e6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Jul 2010 17:27:07 -0400 Subject: [PATCH 1/4] store game currency --- pyfpdb/Database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 500dfb0a..c84f4a04 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1822,7 +1822,7 @@ class Database: def getGameTypeId(self, siteid, game): c = self.get_cursor() #FIXME: Fixed for NL at the moment - c.execute(self.sql.query['getGametypeNL'], (siteid, game['type'], game['category'], game['limitType'], + c.execute(self.sql.query['getGametypeNL'], (siteid, game['type'], game['category'], game['limitType'], game['currency'], int(Decimal(game['sb'])*100), int(Decimal(game['bb'])*100))) tmp = c.fetchone() if (tmp == None): @@ -1831,7 +1831,7 @@ class Database: hilo = "s" elif game['category'] in ['razz','27_3draw','badugi']: hilo = "l" - tmp = self.insertGameTypes( (siteid, 'USD', game['type'], game['base'], game['category'], game['limitType'], hilo, + tmp = self.insertGameTypes( (siteid, game['currency'], game['type'], game['base'], game['category'], game['limitType'], hilo, int(Decimal(game['sb'])*100), int(Decimal(game['bb'])*100), 0, 0) ) #FIXME: recognise currency return tmp[0] From 4fa5ce2411e7160f8405b3bf921183adfc7aec6d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Jul 2010 17:27:36 -0400 Subject: [PATCH 2/4] sql.py change for storing currency --- pyfpdb/SQL.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index fcebc5c9..ae088b36 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -3741,6 +3741,7 @@ class Sql: AND type=%s AND category=%s AND limitType=%s + AND currency=%s AND smallBlind=%s AND bigBlind=%s """ From 981dcc632c44fab086b1d6e5df71bb369d0b5023 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Jul 2010 17:52:19 -0400 Subject: [PATCH 3/4] everleaf euro support --- pyfpdb/EverleafToFpdb.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index a069d89c..1fb4381a 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -34,9 +34,9 @@ class Everleaf(HandHistoryConverter): # Static regexes re_SplitHands = re.compile(r"\n\n\n+") re_TailSplitHands = re.compile(r"(\n\n\n+)") - re_GameInfo = re.compile(ur"^(Blinds )?(?P\$| €|)(?P[.0-9]+)/(?:\$| €)?(?P[.0-9]+) (?PNL|PL|) ?(?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) - #re.compile(ur"^(Blinds )?(?P\$| €|)(?P[.0-9]+)/(?:\$| €)?(?P[.0-9]+) (?PNL|PL|) (?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) - re_HandInfo = re.compile(ur".*#(?P[0-9]+)\n.*\n(Blinds )?(?:\$| €|)(?P[.0-9]+)/(?:\$| €|)(?P[.0-9]+) (?P.*) - (?P\d\d\d\d/\d\d/\d\d - \d\d:\d\d:\d\d)\nTable (?P.+$)", re.MULTILINE) + re_GameInfo = re.compile(ur"^(Blinds )?(?P[$€]?)(?P[.0-9]+)/(?:\$|€)?(?P[.0-9]+) (?PNL|PL|) ?(?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) + #re.compile(ur"^(Blinds )?(?P\$| €|)(?P[.0-9]+)/(?:\$| €)?(?P[.0-9]+) (?PNL|PL|) ?(?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) + re_HandInfo = re.compile(ur".*#(?P[0-9]+)\n.*\n(Blinds )?(?P[$€])?(?P[.0-9]+)/(?:[$€])?(?P[.0-9]+) (?P.*) - (?P\d\d\d\d/\d\d/\d\d - \d\d:\d\d:\d\d)\nTable (?P
.+$)", re.MULTILINE) re_Button = re.compile(ur"^Seat (?P