From ca6f6e513bcf59f8ef318847aae3868448254c74 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Fri, 6 Mar 2009 18:10:04 +0000 Subject: [PATCH] message --- pyfpdb/EverleafToFpdb.py | 67 ++++++++++++++++++++++++---------- pyfpdb/FulltiltToFpdb.py | 6 ++- pyfpdb/Hand.py | 22 +++++------ pyfpdb/HandHistoryConverter.py | 11 ++++-- pyfpdb/PokerStarstoFpdb.py | 5 ++- pyfpdb/fpdb_import.py | 2 +- pyfpdb/test_Everleaf.py | 36 ++++++++++++++++++ 7 files changed, 110 insertions(+), 39 deletions(-) create mode 100644 pyfpdb/test_Everleaf.py diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index ec8bc410..37a1eb60 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# -*- coding: iso-8859-15 -*- +# -*- coding: utf-8 -*- # Copyright 2008, Carl Gherardi # # This program is free software; you can redistribute it and/or modify @@ -27,16 +27,16 @@ class Everleaf(HandHistoryConverter): # Static regexes re_SplitHands = re.compile(r"\n\n+") - re_GameInfo = re.compile(r"^(Blinds )?\$?(?P[.0-9]+)/\$?(?P[.0-9]+) ((?PNL|PL) )?(?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) - re_HandInfo = re.compile(r".*#(?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[- a-zA-Z]+)") + re_GameInfo = re.compile(u"^(Blinds )?(?P\$| €|)(?P[.0-9]+)/(?:\$| €)?(?P[.0-9]+) (?PNL|PL|) (?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) + re_HandInfo = re.compile(u".*#(?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
[- a-zA-Z]+)") # re_GameInfo = re.compile(r".*Blinds \$?(?P[.0-9]+)/\$?(?P[.0-9]+) (?P(NL|PL)) (?P(Hold\'em|Omaha|7 Card Stud))") #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]+)", re.MULTILINE) re_Button = re.compile(r"^Seat (?P
[ a-zA-Z]+) - \$?(?P[.0-9]+)/\$?(?P[.0-9]+) - (?P.*) - (?P
[0-9]+):(?P[0-9]+) ET - (?P[0-9]+)/(?P[0-9]+)/(?P[0-9]+)Table (?P
[ a-zA-Z]+)\nSeat (?P