From 3759af49023b1b956bb2273b1a0a55ff088acc01 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Thu, 22 Jul 2010 22:59:53 +0200 Subject: [PATCH 1/6] GUI: update version indicator to include "plus git" again --- pyfpdb/fpdb.pyw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/fpdb.pyw b/pyfpdb/fpdb.pyw index a51ef932..67262ba7 100755 --- a/pyfpdb/fpdb.pyw +++ b/pyfpdb/fpdb.pyw @@ -117,7 +117,7 @@ import Configuration import Exceptions import Stats -VERSION = "0.20.901" +VERSION = "0.20.901 plus git" class fpdb: From de8b9e89c54ba02f5ab0a1bbb37941d3761a4d1e Mon Sep 17 00:00:00 2001 From: steffen123 Date: Fri, 23 Jul 2010 02:07:49 +0200 Subject: [PATCH 2/6] FTP: fix import --- pyfpdb/FulltiltToFpdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 290f2f42..93b6fe00 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -203,9 +203,9 @@ class Fulltilt(HandHistoryConverter): hand.tablename = m.group('TABLE') try: - hand.starttime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M:%S ET - %Y/%m/%d") + hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M:%S ET - %Y/%m/%d") except: - hand.starttime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M ET - %a, %B %d, %Y") + hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M ET - %a, %B %d, %Y") hand.startTime = HandHistoryConverter.changeTimezone(hand.startTime, "ET", "UTC") From a2243c854202cd117a491f937f445780df3607fd Mon Sep 17 00:00:00 2001 From: steffen123 Date: Fri, 23 Jul 2010 03:55:45 +0200 Subject: [PATCH 3/6] EVERLEAF: remove comment about converting to ET - we do not want to do that! --- pyfpdb/EverleafToFpdb.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index b16980ed..32b22a93 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -152,7 +152,6 @@ or None if we fail to get the info """ # or : 2008/11/07 12:38:49 ET # Not getting it in my HH files yet, so using # 2008/11/10 3:58:52 ET - #TODO: Do conversion from GMT to ET #TODO: Need some date functions to convert to different timezones (Date::Manip for perl rocked for this) hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%Y/%m/%d - %H:%M:%S") return From 7f25cf6da89ebe3f007b8a132574673dda303c1c Mon Sep 17 00:00:00 2001 From: steffen123 Date: Fri, 23 Jul 2010 04:00:25 +0200 Subject: [PATCH 4/6] DB: allow NULL for TT.currency/buyin/fee for when this info is not available --- pyfpdb/Database.py | 2 +- pyfpdb/SQL.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index c0115bd9..028097dd 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -74,7 +74,7 @@ except ImportError: use_numpy = False -DB_VERSION = 137 +DB_VERSION = 138 # Variance created as sqlite has a bunch of undefined aggregate functions. diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 041ae981..4a0bde21 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -392,9 +392,9 @@ class Sql: self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY (id), siteId SMALLINT UNSIGNED NOT NULL, FOREIGN KEY (siteId) REFERENCES Sites(id), - currency varchar(4) NOT NULL, - buyIn INT NOT NULL, - fee INT NOT NULL, + currency varchar(4), + buyIn INT, + fee INT, category varchar(9) NOT NULL, limitType char(2) NOT NULL, buyInChips INT, @@ -423,9 +423,9 @@ class Sql: self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id SERIAL, PRIMARY KEY (id), siteId INT NOT NULL, FOREIGN KEY (siteId) REFERENCES Sites(id), - currency varchar(4) NOT NULL, - buyin INT NOT NULL, - fee INT NOT NULL, + currency varchar(4), + buyin INT, + fee INT, category varchar(9), limitType char(2), buyInChips INT, @@ -453,9 +453,9 @@ class Sql: self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id INTEGER PRIMARY KEY, siteId INT NOT NULL, - currency VARCHAR(4) NOT NULL, - buyin INT NOT NULL, - fee INT NOT NULL, + currency VARCHAR(4), + buyin INT, + fee INT, category TEXT, limitType TEXT, buyInChips INT, From 1f933563ee05422f3e42eaae67c65acda2fee532 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Fri, 23 Jul 2010 04:03:35 +0200 Subject: [PATCH 5/6] EVERLEAF: add comment where to get tourney info --- pyfpdb/EverleafToFpdb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 32b22a93..a069d89c 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -146,6 +146,8 @@ or None if we fail to get the info """ tourno = t.group('TOURNO') hand.tourNo = tourno hand.tablename = t.group('TABLE') + #TODO we should fetch info including buyincurrency, buyin and fee from URL: + # https://www.poker4ever.com/tourney/%TOURNEY_NUMBER% # Believe Everleaf time is GMT/UTC, no transation necessary # Stars format (Nov 10 2008): 2008/11/07 12:38:49 CET [2008/11/07 7:38:49 ET] From 71df9b06ddd2cb174cea5cf13142a7392663cf4c Mon Sep 17 00:00:00 2001 From: steffen123 Date: Fri, 23 Jul 2010 04:45:57 +0200 Subject: [PATCH 6/6] HUD: make it work again after my previous overzealous removal of HP.TTid --- pyfpdb/DerivedStats.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyfpdb/DerivedStats.py b/pyfpdb/DerivedStats.py index f0f1f834..7aab6c98 100644 --- a/pyfpdb/DerivedStats.py +++ b/pyfpdb/DerivedStats.py @@ -59,6 +59,7 @@ class DerivedStats(): self.handsplayers[player[1]]['foldSbToStealChance'] = False self.handsplayers[player[1]]['foldedSbToSteal'] = False self.handsplayers[player[1]]['foldedBbToSteal'] = False + self.handsplayers[player[1]]['tourneyTypeId'] = None for i in range(5): self.handsplayers[player[1]]['street%dCalls' % i] = 0 @@ -142,6 +143,7 @@ class DerivedStats(): self.handsplayers[player[1]]['startCash'] = int(100 * Decimal(player[2])) self.handsplayers[player[1]]['sitout'] = False #TODO: implement actual sitout detection if hand.gametype["type"]=="tour": + self.handsplayers[player[1]]['tourneyTypeId']=hand.tourneyTypeId self.handsplayers[player[1]]['tourneysPlayersIds'] = hand.tourneysPlayersIds[player[1]] else: self.handsplayers[player[1]]['tourneysPlayersIds'] = None