From 1a462301766791b3ec3d741137f2e2c72ac3da5a Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 16 Dec 2008 23:45:58 +0900 Subject: [PATCH] Add first pass Full Tilt converter --- pyfpdb/FulltiltToFpdb.py | 219 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100755 pyfpdb/FulltiltToFpdb.py diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py new file mode 100755 index 00000000..a77b129e --- /dev/null +++ b/pyfpdb/FulltiltToFpdb.py @@ -0,0 +1,219 @@ +#!/usr/bin/env python +# Copyright 2008, Carl Gherardi +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +######################################################################## + +import sys +import Configuration +from HandHistoryConverter import * + +# FullTilt HH Format + +#Full Tilt Poker Game #9403951181: Table CR - tay - $0.05/$0.10 - No Limit Hold'em - 9:40:20 ET - 2008/12/09 +#Seat 1: rigoise ($15.95) +#Seat 2: K2dream ($6.70) +#Seat 4: ravens2216 ($10) +#Seat 5: rizkouner ($4) +#Seat 6: Sorrowful ($8.35) +#rigoise posts the small blind of $0.05 +#K2dream posts the big blind of $0.10 +#5 seconds left to act +#rizkouner posts $0.10 +#The button is in seat #6 +#*** HOLE CARDS *** +#Dealt to Sorrowful [8h Qc] +#ravens2216 folds +#rizkouner checks +#Sorrowful has 15 seconds left to act +#Sorrowful folds +#rigoise folds +#K2dream checks +#*** FLOP *** [9d Kc 5c] +#K2dream checks +#rizkouner checks +#*** TURN *** [9d Kc 5c] [5h] +#K2dream has 15 seconds left to act +#K2dream bets $0.20 +#rizkouner calls $0.20 +#*** RIVER *** [9d Kc 5c 5h] [6h] +#K2dream checks +#rizkouner has 15 seconds left to act +#rizkouner bets $0.20 +#K2dream folds +#Uncalled bet of $0.20 returned to rizkouner +#rizkouner mucks +#rizkouner wins the pot ($0.60) +#*** SUMMARY *** +#Total pot $0.65 | Rake $0.05 +#Board: [9d Kc 5c 5h 6h] +#Seat 1: rigoise (small blind) folded before the Flop +#Seat 2: K2dream (big blind) folded on the River +#Seat 4: ravens2216 didn't bet (folded) +#Seat 5: rizkouner collected ($0.60), mucked +#Seat 6: Sorrowful (button) didn't bet (folded) + + +class FullTilt(HandHistoryConverter): + def __init__(self, config, file): + print "Initialising FullTilt converter class" + HandHistoryConverter.__init__(self, config, file, sitename="FullTilt") # Call super class init. + self.sitename = "FullTilt" + self.setFileType("text", "cp1252") + self.rexx.setGameInfoRegex('.*- \$?(?P[.0-9]+)/\$?(?P[.0-9]+)') + self.rexx.setSplitHandRegex('\n\n+') + self.rexx.setHandInfoRegex('.*#(?P[0-9]+): Table (?P[- a-zA-Z]+) - \$?(?P[.0-9]+)/\$?(?P[.0-9]+) - (?P[a-zA-Z\' ]+) - (?P
[0-9]+):(?P[0-9]+):(?P[0-9]+) ET - (?P[0-9]+)/(?P[0-9]+)/(?P[0-9]+)') +# self.rexx.setHandInfoRegex('.*#(?P[0-9]+): Table (?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