From 91e6783869b47c085cf25311ff93483d109b7115 Mon Sep 17 00:00:00 2001 From: eblade Date: Tue, 4 Aug 2009 21:36:30 -0400 Subject: [PATCH 1/2] GuiBulkImport: bump max thread counter to 32 .. --- pyfpdb/GuiBulkImport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py index 3871c4d6..84a8e3bf 100755 --- a/pyfpdb/GuiBulkImport.py +++ b/pyfpdb/GuiBulkImport.py @@ -155,7 +155,7 @@ class GuiBulkImport(): self.lab_threads.set_alignment(1.0, 0.5) # spin button - threads - threads_adj = gtk.Adjustment(value=0, lower=0, upper=10, step_incr=1, page_incr=1, page_size=0) #not sure what upper value should be! + threads_adj = gtk.Adjustment(value=0, lower=0, upper=32, step_incr=1, page_incr=1, page_size=0) #not sure what upper value should be! self.spin_threads = gtk.SpinButton(adjustment=threads_adj, climb_rate=0.0, digits=0) self.table.attach(self.spin_threads, 4, 5, 0, 1, xpadding = 10, ypadding = 0, yoptions=gtk.SHRINK) self.spin_threads.show() From 34c469ab3a156b14222b420360eb30912179d948 Mon Sep 17 00:00:00 2001 From: eblade Date: Wed, 5 Aug 2009 21:07:16 -0400 Subject: [PATCH 2/2] Add AbsoluteToFpdb.py Database: Add Absolute to sites GuiPlayerStats: set avgseats to False Hand: Add Absolute to SITEIDS list fpdb_import: check for presence of settings['dropHudCache'] before testing it, to keep command line import from erroring --- pyfpdb/AbsoluteToFpdb.py | 328 +++++++++++++++++++++++++++++++++++++++ pyfpdb/Database.py | 1 + pyfpdb/GuiPlayerStats.py | 2 +- pyfpdb/Hand.py | 2 +- pyfpdb/fpdb_import.py | 4 +- 5 files changed, 333 insertions(+), 4 deletions(-) create mode 100644 pyfpdb/AbsoluteToFpdb.py diff --git a/pyfpdb/AbsoluteToFpdb.py b/pyfpdb/AbsoluteToFpdb.py new file mode 100644 index 00000000..4b3aea2a --- /dev/null +++ b/pyfpdb/AbsoluteToFpdb.py @@ -0,0 +1,328 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# 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 +######################################################################## + +# TODO: I have no idea if AP has multi-currency options, i just copied the regex out of Everleaf converter for the currency symbols.. weeeeee - Eric +import sys +import logging +from HandHistoryConverter import * + +# Class for converting Absolute HH format. + +class Absolute(HandHistoryConverter): + + # Static regexes + re_SplitHands = re.compile(r"\n\n\n+") + re_TailSplitHands = re.compile(r"(\n\n\n+)") +#Stage #1571362962: Holdem No Limit $0.02 - 2009-08-05 15:24:06 (ET) +#Table: TORONTO AVE (Real Money) Seat #6 is the dealer +#Seat 6 - FETS63 ($0.75 in chips) +#Board [10s 5d Kh Qh 8c] + + re_GameInfo = re.compile(ur"^Stage #([0-9]+): (?PHoldem|) (?PNo Limit|) (?P\$| €|)(?P[0-9]*[.0-9]+)", re.MULTILINE) + re_HandInfo = re.compile(ur"^Stage #(?P[0-9]+): .*(?P\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d).*\nTable: (?P.*) \(Real Money\)", re.MULTILINE) + re_Button = re.compile(ur"Seat #(?P
.+$)", re.MULTILINE) +# re_Button = re.compile(ur"^Seat (?P