diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py index 83f841e2..abb0c744 100755 --- a/pyfpdb/GuiBulkImport.py +++ b/pyfpdb/GuiBulkImport.py @@ -349,11 +349,11 @@ def main(argv=None): if options.usage == True: #Print usage examples and exit print "USAGE:" - print 'PokerStars converter: ./GuiBulkImport -c PokerStars -f filename' - print 'Full Tilt converter: ./GuiBulkImport -c "Full Tilt Poker" -f filename' - print "Everleaf converter: ./GuiBulkImport -c Everleaf -f filename" - print "Absolute converter: ./GuiBulkImport -c Absolute -f filename" - print "PartyPoker converter: ./GuiBulkImport -c PartyPoker -f filename" + print 'PokerStars converter: ./GuiBulkImport.py -c PokerStars -f filename' + print 'Full Tilt converter: ./GuiBulkImport.py -c "Full Tilt Poker" -f filename' + print "Everleaf converter: ./GuiBulkImport.py -c Everleaf -f filename" + print "Absolute converter: ./GuiBulkImport.py -c Absolute -f filename" + print "PartyPoker converter: ./GuiBulkImport.py -c PartyPoker -f filename" sys.exit(0) config = Configuration.Config() diff --git a/pyfpdb/PartyPokerToFpdb.py b/pyfpdb/PartyPokerToFpdb.py index 9c665bd3..a80810c7 100755 --- a/pyfpdb/PartyPokerToFpdb.py +++ b/pyfpdb/PartyPokerToFpdb.py @@ -96,7 +96,8 @@ class PartyPoker(HandHistoryConverter): re_NoSmallBlind = re.compile( '^There is no Small Blind in this hand as the Big Blind ' 'of the previous hand left the table', re.MULTILINE) - + re_ringSB = re.compile(r"(?P.*) posts small blind \[\$(?P[.,0-9]*) USD\]\.") + re_ringBB = re.compile(r"(?P.*) posts big blind \[\$(?P[.,0-9]*) USD\]\.") def allHandsAsList(self): list = HandHistoryConverter.allHandsAsList(self) @@ -185,6 +186,8 @@ class PartyPoker(HandHistoryConverter): info = {} m = self._getGameType(handText) + m_sb = self.re_ringSB.search(handText) + m_bb = self.re_ringBB.search(handText) if m is None: return None @@ -216,7 +219,8 @@ class PartyPoker(HandHistoryConverter): info['type'] = 'ring' if info['type'] == 'ring': - info['sb'], info['bb'] = ringBlinds(mg['RINGLIMIT']) + info['sb'] = m_sb.group('RINGSB') + info['bb'] = m_bb.group('RINGBB') info['currency'] = currencies[mg['CURRENCY']] else: info['sb'] = clearMoneyString(mg['SB']) @@ -483,13 +487,6 @@ class PartyPoker(HandHistoryConverter): print 'party', 'getTableTitleRe', table_number return table_name - -def ringBlinds(ringLimit): - "Returns blinds for current limit in cash games" - ringLimit = float(clearMoneyString(ringLimit)) - if ringLimit == 5.: ringLimit = 4. - return ('%.2f' % (ringLimit/200.), '%.2f' % (ringLimit/100.) ) - def clearMoneyString(money): "Renders 'numbers' like '1 200' and '2,000'" return money.replace(' ', '').replace(',', '')