Merge branch 'sorrow' into chazdazzle

This commit is contained in:
Chaz Littlejohn 2011-03-30 03:25:58 +00:00
commit faaca41b5a
2 changed files with 4 additions and 12 deletions

View File

@ -96,8 +96,6 @@ class Everleaf(HandHistoryConverter):
'bigBet' 'bigBet'
'currency' in ('USD', 'EUR', 'T$', <countrycode>) 'currency' in ('USD', 'EUR', 'T$', <countrycode>)
or None if we fail to get the info """ or None if we fail to get the info """
#(TODO: which parts are optional/required?)
# Blinds $0.50/$1 PL Omaha - 2008/12/07 - 21:59:48 # Blinds $0.50/$1 PL Omaha - 2008/12/07 - 21:59:48
# Blinds $0.05/$0.10 NL Hold'em - 2009/02/21 - 11:21:57 # Blinds $0.05/$0.10 NL Hold'em - 2009/02/21 - 11:21:57
# $0.25/$0.50 7 Card Stud - 2008/12/05 - 21:43:59 # $0.25/$0.50 7 Card Stud - 2008/12/05 - 21:43:59
@ -169,11 +167,6 @@ or None if we fail to get the info """
# https://www.poker4ever.com/tourney/%TOURNEY_NUMBER% # https://www.poker4ever.com/tourney/%TOURNEY_NUMBER%
# Believe Everleaf time is GMT/UTC, no transation necessary # Believe Everleaf time is GMT/UTC, no transation necessary
# Stars format (Nov 10 2008): 2008/11/07 12:38:49 CET [2008/11/07 7:38:49 ET]
# or : 2008/11/07 12:38:49 ET
# Not getting it in my HH files yet, so using
# 2008/11/10 3:58:52 ET
#TODO: Need some date functions to convert to different timezones (Date::Manip for perl rocked for this)
hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%Y/%m/%d - %H:%M:%S") hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%Y/%m/%d - %H:%M:%S")
return return
@ -192,9 +185,6 @@ or None if we fail to get the info """
def markStreets(self, hand): def markStreets(self, hand):
# PREFLOP = ** Dealing down cards **
# This re fails if, say, river is missing; then we don't get the ** that starts the river.
#m = re.search('(\*\* Dealing down cards \*\*\n)(?P<PREFLOP>.*?\n\*\*)?( Dealing Flop \*\* \[ (?P<FLOP1>\S\S), (?P<FLOP2>\S\S), (?P<FLOP3>\S\S) \])?(?P<FLOP>.*?\*\*)?( Dealing Turn \*\* \[ (?P<TURN1>\S\S) \])?(?P<TURN>.*?\*\*)?( Dealing River \*\* \[ (?P<RIVER1>\S\S) \])?(?P<RIVER>.*)', hand.handText,re.DOTALL)
if hand.gametype['base'] == 'hold': if hand.gametype['base'] == 'hold':
m = re.search(r"\*\* Dealing down cards \*\*(?P<PREFLOP>.+(?=\*\* Dealing Flop \*\*)|.+)" m = re.search(r"\*\* Dealing down cards \*\*(?P<PREFLOP>.+(?=\*\* Dealing Flop \*\*)|.+)"
r"(\*\* Dealing Flop \*\*(?P<FLOP> \[ \S\S, \S\S, \S\S \].+(?=\*\* Dealing Turn \*\*)|.+))?" r"(\*\* Dealing Flop \*\*(?P<FLOP> \[ \S\S, \S\S, \S\S \].+(?=\*\* Dealing Turn \*\*)|.+))?"

View File

@ -32,6 +32,8 @@ import Options
import datetime import datetime
import pytz import pytz
DEBUG = False
class FpdbError: class FpdbError:
def __init__(self, sitename): def __init__(self, sitename):
@ -172,8 +174,8 @@ def compare(leaf, importer, errors, site):
# Test if this is a hand history file # Test if this is a hand history file
if filename.endswith('.txt'): if filename.endswith('.txt'):
# test if there is a .hp version of the file # test if there is a .hp version of the file
print "Site: %s" % site if DEBUG: print "Site: %s" % site
print "Filename: %s" % filename if DEBUG: print "Filename: %s" % filename
importer.addBulkImportImportFileOrDir(filename, site=site) importer.addBulkImportImportFileOrDir(filename, site=site)
(stored, dups, partial, errs, ttime) = importer.runImport() (stored, dups, partial, errs, ttime) = importer.runImport()