From 483e17734643e4f97bf8e6e9f387037c25b12d1c Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Fri, 20 Feb 2009 16:29:52 +0000 Subject: [PATCH] Explicit matching of player names About the only place where we are guaranteed to get all the players' names correctly is in the seating plan in the hand header. We extract the names and build a regex that matches only the names. We only do this if the current regex is out of date, to avoid recompiling them too often. I also did away with self.rexx because it seemed unnecessary and was difficult to work with. --- pyfpdb/EverleafToFpdb.py | 68 ++++++++++++++++++---------------- pyfpdb/GuiAutoImport.py | 2 +- pyfpdb/HandHistoryConverter.py | 39 +++++++++---------- pyfpdb/fpdb_import.py | 4 ++ 4 files changed, 61 insertions(+), 52 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 7a5344c2..9fbf91d0 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -70,20 +70,24 @@ class Everleaf(HandHistoryConverter): HandHistoryConverter.__init__(self, config, file, sitename="Everleaf") # Call super class init. self.sitename = "Everleaf" self.setFileType("text", "cp1252") - self.rexx.setGameInfoRegex('.*Blinds \$?(?P[.0-9]+)/\$?(?P[.0-9]+)') - self.rexx.setSplitHandRegex('\n\n+') - self.rexx.setHandInfoRegex('.*#(?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
[ a-zA-Z]+)\nSeat (?P