From 4baa9835f9c96e7a7180a4a2affe1c6e9bcd2423 Mon Sep 17 00:00:00 2001 From: eblade Date: Sat, 21 Feb 2009 06:25:12 -0500 Subject: [PATCH 1/5] fix my last patch to use os.path.sep instead of hardcoded "\\" --- pyfpdb/EverleafToFpdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 28c75aaf..9d438abe 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -79,7 +79,7 @@ class Everleaf(HandHistoryConverter): self.re_Board = re.compile(r"\[ (?P.+) \]") try: - self.ofile = os.path.join(self.hhdir, file.split("\\")[-2]+"-"+os.path.basename(file)) + self.ofile = os.path.join(self.hhdir, file.split(os.path.sep)[-2]+"-"+os.path.basename(file)) except: self.ofile = os.path.join(self.hhdir, "x"+strftime("%d-%m-%y")+os.path.basename(file)) From 89fde673e2dd9765df26d1c49e4f767ea2adc173 Mon Sep 17 00:00:00 2001 From: eblade Date: Sun, 22 Feb 2009 18:03:19 -0500 Subject: [PATCH 2/5] should detect FL games (need to implement way to actually not continue processing FL since we don't support it currently) --- pyfpdb/EverleafToFpdb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index d3437bbc..0df5e440 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -73,6 +73,8 @@ class Everleaf(HandHistoryConverter): structure = "nl" elif m.group('LTYPE') == "PL": structure = "pl" + else: + structure = "fl" # we don't support it, but there should be how to detect it at least. if m.group('GAME') == "Hold\'em": game = "hold" From b2ee8fa0ce5cabb13a8c36c9df5e3d428671523a Mon Sep 17 00:00:00 2001 From: eblade Date: Mon, 23 Feb 2009 07:56:33 -0500 Subject: [PATCH 3/5] add a couple of missing commas --- pyfpdb/EverleafToFpdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 0df5e440..4f8748f3 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -55,8 +55,8 @@ class Everleaf(HandHistoryConverter): self.re_SitsOut = re.compile(r"^%s sits out" % player_re, re.MULTILINE) def readSupportedGames(self): - return [["ring", "hold", "nl"] - ["ring", "hold", "pl"] + return [["ring", "hold", "nl"], + ["ring", "hold", "pl"], ["ring", "omaha", "pl"] ] From cda897608c01222cac476ae0874ffacf3f6af6b3 Mon Sep 17 00:00:00 2001 From: eblade Date: Wed, 25 Feb 2009 06:01:44 -0500 Subject: [PATCH 4/5] EverleafToFpdb: should at least recognise Stud, once the HandInfo regex is fixed. Not that it'll do anything good with it. HHC: return doing nothing but printing a warning message to output, if determineGameType() returns None --- pyfpdb/EverleafToFpdb.py | 18 +++++++++++++----- pyfpdb/HandHistoryConverter.py | 5 ++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 4f8748f3..33ae0cd3 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -31,7 +31,7 @@ class Everleaf(HandHistoryConverter): self.sitename = "Everleaf" self.setFileType("text", "cp1252") - self.re_GameInfo = re.compile(r".*Blinds \$?(?P[.0-9]+)/\$?(?P[.0-9]+) (?P(NL|PL)) (?P(Hold\'em|Omaha))") + self.re_GameInfo = re.compile(r".*Blinds \$?(?P[.0-9]+)/\$?(?P[.0-9]+) (?P(NL|PL)) (?P(Hold\'em|Omaha|7 Card Stud))") self.re_SplitHands = re.compile(r"\n\n+") self.re_HandInfo = re.compile(r".*#(?P[0-9]+)\n.*\nBlinds \$?(?P[.0-9]+)/\$?(?P[.0-9]+) (?P.*) - (?P\d\d\d\d/\d\d/\d\d - \d\d:\d\d:\d\d)\nTable (?P[- a-zA-Z]+)\nSeat (?P