diff --git a/pyfpdb/AlchemyMappings.py b/pyfpdb/AlchemyMappings.py
index 53f59a1a..40e7a5e4 100644
--- a/pyfpdb/AlchemyMappings.py
+++ b/pyfpdb/AlchemyMappings.py
@@ -370,6 +370,7 @@ class Site(object):
(10, 'Partouche', 'PA'),
(11, 'Carbon', 'CA'),
(12, 'PKR', 'PK'),
+ (13, 'PacificPoker', 'P8'),
]
INITIAL_DATA_KEYS = ('id', 'name', 'code')
diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py
index 4efc832f..5be34fe3 100644
--- a/pyfpdb/Database.py
+++ b/pyfpdb/Database.py
@@ -1519,6 +1519,7 @@ class Database:
c.execute("INSERT INTO Sites (name,code) VALUES ('Betfair', 'BF')")
c.execute("INSERT INTO Sites (name,code) VALUES ('Absolute', 'AB')")
c.execute("INSERT INTO Sites (name,code) VALUES ('PartyPoker', 'PP')")
+ c.execute("INSERT INTO Sites (name,code) VALUES ('PacificPoker', 'P8')")
c.execute("INSERT INTO Sites (name,code) VALUES ('Partouche', 'PA')")
c.execute("INSERT INTO Sites (name,code) VALUES ('Carbon', 'CA')")
c.execute("INSERT INTO Sites (name,code) VALUES ('PKR', 'PK')")
diff --git a/pyfpdb/HUD_config.test.xml b/pyfpdb/HUD_config.test.xml
index f8a99ee3..dca95cd1 100644
--- a/pyfpdb/HUD_config.test.xml
+++ b/pyfpdb/HUD_config.test.xml
@@ -389,6 +389,49 @@ Left-Drag to Move"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pyfpdb/Options.py b/pyfpdb/Options.py
index 4c67de9a..8f3473e9 100644
--- a/pyfpdb/Options.py
+++ b/pyfpdb/Options.py
@@ -83,6 +83,7 @@ def site_alias(alias):
"""Function for converting various site aliases to the FPDB name"""
tmp = alias
aliases = {
+ "PacificPoker" : "PacificPoker",
"PokerStars" : "PokerStars",
"Full Tilt Poker": "Full Tilt Poker",
"PartyPoker" : "PartyPoker",
diff --git a/pyfpdb/PacificPokerToFpdb.py b/pyfpdb/PacificPokerToFpdb.py
new file mode 100644
index 00000000..34fb2265
--- /dev/null
+++ b/pyfpdb/PacificPokerToFpdb.py
@@ -0,0 +1,467 @@
+#!/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 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 L10n
+_ = L10n.get_translation()
+
+# TODO: straighten out discards for draw games
+
+import sys
+from HandHistoryConverter import *
+from decimal_wrapper import Decimal
+
+# PacificPoker HH Format
+
+class PacificPoker(HandHistoryConverter):
+
+ # Class Variables
+
+ sitename = "PacificPoker"
+ filetype = "text"
+ codepage = ("utf8", "cp1252")
+ siteId = 13 # Needs to match id entry in Sites database
+
+ mixes = { 'HORSE': 'horse', '8-Game': '8game', 'HOSE': 'hose'} # Legal mixed games
+ sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3", "play": ""} # ADD Euro, Sterling, etc HERE
+ substitutions = {
+ 'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
+ 'LS' : "\$|\xe2\x82\xac|" # legal currency symbols - Euro(cp1252, utf-8)
+ }
+
+ # translations from captured groups to fpdb info strings
+# :: TODO 0.02 limit does not seem right
+ Lim_Blinds = { '0.02': ('0.01', '0.02'), '0.04': ('0.01', '0.02'),
+ '0.10': ('0.02', '0.05'), '0.20': ('0.05', '0.10'),
+ '0.40': ('0.10', '0.20'), '0.50': ('0.10', '0.25'),
+ '1.00': ('0.25', '0.50'), '1': ('0.25', '0.50'),
+ '2.00': ('0.50', '1.00'), '2': ('0.50', '1.00'),
+ '4.00': ('1.00', '2.00'), '4': ('1.00', '2.00'),
+ '6.00': ('1.00', '3.00'), '6': ('1.00', '3.00'),
+ '8.00': ('2.00', '4.00'), '8': ('2.00', '4.00'),
+ '10.00': ('2.00', '5.00'), '10': ('2.00', '5.00'),
+ '20.00': ('5.00', '10.00'), '20': ('5.00', '10.00'),
+ '30.00': ('10.00', '15.00'), '30': ('10.00', '15.00'),
+ '40.00': ('10.00', '20.00'), '40': ('10.00', '20.00'),
+ '60.00': ('15.00', '30.00'), '60': ('15.00', '30.00'),
+ '80.00': ('20.00', '40.00'), '80': ('20.00', '40.00'),
+ '100.00': ('25.00', '50.00'), '100': ('25.00', '50.00'),
+ '200.00': ('50.00', '100.00'), '200': ('50.00', '100.00'),
+ '400.00': ('100.00', '200.00'), '400': ('100.00', '200.00'),
+ '800.00': ('200.00', '400.00'), '800': ('200.00', '400.00'),
+ '1000.00': ('250.00', '500.00'),'1000': ('250.00', '500.00')
+ }
+
+ limits = { 'No Limit':'nl', 'Pot Limit':'pl', 'Limit':'fl', 'LIMIT':'fl', 'Fix Limit':'fl' }
+
+ games = { # base, category
+ "Holdem" : ('hold','holdem'),
+ 'Omaha' : ('hold','omahahi'),
+ 'Omaha Hi/Lo' : ('hold','omahahilo'),
+ 'OmahaHL' : ('hold','omahahilo'),
+ 'Razz' : ('stud','razz'),
+ 'RAZZ' : ('stud','razz'),
+ '7 Card Stud' : ('stud','studhi'),
+ '7 Card Stud Hi/Lo' : ('stud','studhilo'),
+ 'Badugi' : ('draw','badugi'),
+ 'Triple Draw 2-7 Lowball' : ('draw','27_3draw'),
+ 'Single Draw 2-7 Lowball' : ('draw','27_1draw'),
+ '5 Card Draw' : ('draw','fivedraw')
+ }
+
+ currencies = { u'€':'EUR', '$':'USD', '':'T$' }
+
+ # Static regexes
+ re_GameInfo = re.compile(u"""
+ \#Game\sNo\s:\s(?P[0-9]+)\\n
+ \*\*\*\*\*\sCassava\sHand\sHistory\sfor\sGame\s[0-9]+\s\*\*\*\*\*\\n
+ (?P%(LS)s)?(?P[.,0-9]+)/(%(LS)s)?(?P[.,0-9]+)\sBlinds\s
+ (?PNo\sLimit|Fix\sLimit|Pot\sLimit)\s
+ (?PHoldem|Omaha|OmahaHL)
+ \s-\s\*\*\*\s
+ (?P.*$)
+ """ % substitutions, re.MULTILINE|re.VERBOSE)
+
+ re_PlayerInfo = re.compile(u"""
+ ^Seat\s(?P[0-9]+):\s
+ (?P.*)\s
+ \(\s(%(LS)s)?(?P[.,0-9]+)\s\)""" % substitutions,
+ re.MULTILINE|re.VERBOSE)
+
+ re_HandInfo = re.compile("""
+ ^Table\s(?P[-\ \#a-zA-Z\d]+)\s
+ (\(Real\sMoney\))?
+ (?P\(Practice\sPlay\))?
+ \\n
+ Seat\s(?P