From 2da7dc84953abf3807c0169a8dc659e102656257 Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 13 Feb 2011 22:04:09 +0800 Subject: [PATCH] OnGame: Modify re_HandInfo to parse SPEED tables --- pyfpdb/OnGameToFpdb.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyfpdb/OnGameToFpdb.py b/pyfpdb/OnGameToFpdb.py index d69170a6..889f2d24 100755 --- a/pyfpdb/OnGameToFpdb.py +++ b/pyfpdb/OnGameToFpdb.py @@ -68,17 +68,19 @@ class OnGame(HandHistoryConverter): # ***** End of hand R5-75443872-57 ***** re_SplitHands = re.compile(u'\*\*\*\*\*\sEnd\sof\shand\s[-A-Z\d]+.*\n(?=\*)') + #TODO: detect play money + # "Play money" rather than "Real money" and set currency accordingly re_HandInfo = re.compile(u""" \*\*\*\*\*\sHistory\sfor\shand\s(?P[-A-Z\d]+).* Start\shand:\s(?P.*) - Table:\s(?P[-\'\w\s]+)\s\[\d+\]\s\( + Table:\s(\[SPEED\]\s)?(?P
[-\'\w\s]+)\s\[\d+\]\s\( ( (?PNO_LIMIT|Limit|LIMIT|Pot\sLimit|POT_LIMIT)\s (?PTEXAS_HOLDEM|OMAHA_HI|SEVEN_CARD_STUD|SEVEN_CARD_STUD_HI_LO|RAZZ|FIVE_CARD_DRAW)\s (?P%(LS)s|)?(?P[.0-9]+)/ (%(LS)s)?(?P[.0-9]+) )? - """ % substitutions, re.MULTILINE|re.DOTALL|re.VERBOSE) #TODO: detect play money (identified by "Play money" rather than "Real money" and set currency accordingly + """ % substitutions, re.MULTILINE|re.DOTALL|re.VERBOSE) re_TailSplitHands = re.compile(u'(\*\*\*\*\*\sEnd\sof\shand\s[-A-Z\d]+.*\n)(?=\*)') re_Button = re.compile('Button: seat (?P