From 0dc1bafdeb81c59c72e0b722c77b3a8af1e917ca Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Mon, 9 Mar 2009 23:03:17 +0000 Subject: [PATCH] gameinfo changes to fit db spec in docs/ some temporary bits, broken commit do not use. --- pyfpdb/EverleafToFpdb.py | 72 +++++++++++++++++++++++---------- pyfpdb/FulltiltToFpdb.py | 59 +++++++++++++++------------ pyfpdb/HandHistoryConverter.py | 73 +++++++++++++++++++++++++++++----- pyfpdb/PokerStarstoFpdb.py | 57 ++++++++++++++------------ pyfpdb/test_Everleaf.py | 44 ++++++++++---------- 5 files changed, 203 insertions(+), 102 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 37a1eb60..ac61e7f2 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# # Copyright 2008, Carl Gherardi # # This program is free software; you can redistribute it and/or modify @@ -27,13 +28,11 @@ class Everleaf(HandHistoryConverter): # Static regexes re_SplitHands = re.compile(r"\n\n+") - 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
.+$)") + re_Button = re.compile(ur"^Seat (?P
[- a-zA-Z]+) (\((?P.+)\) )?- \$?(?P[.0-9]+)/\$?(?P[.0-9]+) (Ante \$(?P[.0-9]+) )?- (?P[a-zA-Z\' ]+) - (?P.*)') re_Button = re.compile('^The button is in seat #(?P
[- a-zA-Z]+)\'(?P.+?$)?", re.MULTILINE) re_Button = re.compile('Seat #(?P