Merge branch 'master' of git://git.assembla.com/fpdboz into carl
This commit is contained in:
commit
3c60c8d68d
|
@ -84,7 +84,7 @@ class Fulltilt(HandHistoryConverter):
|
||||||
(\s\((?P<TURBO>Turbo)\))?)|(?P<UNREADABLE_INFO>.+))
|
(\s\((?P<TURBO>Turbo)\))?)|(?P<UNREADABLE_INFO>.+))
|
||||||
''' % substitutions, re.VERBOSE)
|
''' % substitutions, re.VERBOSE)
|
||||||
re_Button = re.compile('^The button is in seat #(?P<BUTTON>\d+)', re.MULTILINE)
|
re_Button = re.compile('^The button is in seat #(?P<BUTTON>\d+)', re.MULTILINE)
|
||||||
re_PlayerInfo = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.{2,15}) \([%(LS)s](?P<CASH>[,.0-9]+)\)(, is sitting out)?$' % substitutions, re.MULTILINE)
|
re_PlayerInfo = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.{2,15}) \([%(LS)s](?P<CASH>[,.0-9]+)\)$' % substitutions, re.MULTILINE)
|
||||||
re_TourneysPlayerInfo = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.{2,15}) \([%(LS)s]?(?P<CASH>[,.0-9]+)\)(, is sitting out)?$' % substitutions, re.MULTILINE)
|
re_TourneysPlayerInfo = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.{2,15}) \([%(LS)s]?(?P<CASH>[,.0-9]+)\)(, is sitting out)?$' % substitutions, re.MULTILINE)
|
||||||
re_Board = re.compile(r"\[(?P<CARDS>.+)\]")
|
re_Board = re.compile(r"\[(?P<CARDS>.+)\]")
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
#Copyright 2008-2010 Carl Gherardi
|
||||||
|
#This program is free software: you can redistribute it and/or modify
|
||||||
|
#it under the terms of the GNU Affero General Public License as published by
|
||||||
|
#the Free Software Foundation, version 3 of the License.
|
||||||
|
#
|
||||||
|
#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 Affero General Public License
|
||||||
|
#along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#In the "official" distribution you can find the license in agpl-3.0.txt.
|
||||||
|
|
||||||
import os, pygame
|
import os, pygame
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -71,12 +71,13 @@ class iPoker(HandHistoryConverter):
|
||||||
sitename = "iPoker"
|
sitename = "iPoker"
|
||||||
filetype = "text"
|
filetype = "text"
|
||||||
codepage = "cp1252"
|
codepage = "cp1252"
|
||||||
siteID = 11
|
siteID = 13
|
||||||
|
|
||||||
# Static regexes
|
# Static regexes
|
||||||
re_SplitHands = re.compile(r'</game>\n+(?=<game)')
|
re_SplitHands = re.compile(r'</game>\n+(?=<game)')
|
||||||
re_TailSplitHands = re.compile(r'(</game>)')
|
re_TailSplitHands = re.compile(r'(</game>)')
|
||||||
re_GameInfo = re.compile(r'<description type="(?P<GAME>[a-zA-Z ]+)" stakes="(?P<LIMIT>[a-zA-Z ]+) \(\$(?P<SB>[.0-9]+)/\$(?P<BB>[.0-9]+)\)"/>', re.MULTILINE)
|
re_GameInfo = re.compile(r'<gametype>(?P<GAME>[a-zA-Z0-9 ]+) \$(?P<SB>[.0-9]+)/\$(?P<BB>[.0-9]+)</gametype>', re.MULTILINE)
|
||||||
|
# \$(?P<SB>[.0-9]+)\/\$(?P<BB>[.0-9]+)<\/gametype>', re.MULTILINE)
|
||||||
re_HandInfo = re.compile(r'<game id="(?P<HID1>[0-9]+)-(?P<HID2>[0-9]+)" starttime="(?P<DATETIME>[0-9]+)" numholecards="2" gametype="2" realmoney="true" data="[0-9]+\|(?P<TABLE>[^\(]+)', re.MULTILINE)
|
re_HandInfo = re.compile(r'<game id="(?P<HID1>[0-9]+)-(?P<HID2>[0-9]+)" starttime="(?P<DATETIME>[0-9]+)" numholecards="2" gametype="2" realmoney="true" data="[0-9]+\|(?P<TABLE>[^\(]+)', re.MULTILINE)
|
||||||
re_Button = re.compile(r'<players dealer="(?P<BUTTON>[0-9]+)">')
|
re_Button = re.compile(r'<players dealer="(?P<BUTTON>[0-9]+)">')
|
||||||
re_PlayerInfo = re.compile(r'<player seat="(?P<SEAT>[0-9]+)" nickname="(?P<PNAME>.+)" balance="\$(?P<CASH>[.0-9]+)" dealtin="(?P<DEALTIN>(true|false))" />', re.MULTILINE)
|
re_PlayerInfo = re.compile(r'<player seat="(?P<SEAT>[0-9]+)" nickname="(?P<PNAME>.+)" balance="\$(?P<CASH>[.0-9]+)" dealtin="(?P<DEALTIN>(true|false))" />', re.MULTILINE)
|
||||||
|
@ -146,11 +147,12 @@ or None if we fail to get the info """
|
||||||
|
|
||||||
limits = { 'No Limit':'nl', 'Limit':'fl' }
|
limits = { 'No Limit':'nl', 'Limit':'fl' }
|
||||||
games = { # base, category
|
games = { # base, category
|
||||||
'Holdem' : ('hold','holdem'),
|
'7 Card Stud L' : ('stud','studhilo'),
|
||||||
'Holdem Tournament' : ('hold','holdem') }
|
}
|
||||||
|
|
||||||
if 'LIMIT' in mg:
|
if 'LIMIT' in mg:
|
||||||
self.info['limitType'] = limits[mg['LIMIT']]
|
self.info['limitType'] = limits[mg['LIMIT']]
|
||||||
|
self.info['limitType'] = 'fl'
|
||||||
if 'GAME' in mg:
|
if 'GAME' in mg:
|
||||||
(self.info['base'], self.info['category']) = games[mg['GAME']]
|
(self.info['base'], self.info['category']) = games[mg['GAME']]
|
||||||
if 'SB' in mg:
|
if 'SB' in mg:
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user