From 672d2d70afdb4aed3673d7b2c99d11f4fd3c3a05 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Thu, 18 Sep 2008 01:23:38 +0100 Subject: [PATCH] p86 - ftp: read maxSeats rather than making an assumption. included new ebuild this time but obviously untried (can only try it after making the file release..). removed old ebuilds. --- docs/known-bugs-and-planned-features.txt | 6 +- packaging/fpdb-1.0_alpha2_p68.ebuild | 59 ------------------- ..._p80.ebuild => fpdb-1.0_alpha4_p86.ebuild} | 4 +- pyfpdb/fpdb.py | 2 +- pyfpdb/fpdb_parse_logic.py | 4 +- pyfpdb/fpdb_simple.py | 17 +++++- 6 files changed, 22 insertions(+), 70 deletions(-) delete mode 100644 packaging/fpdb-1.0_alpha2_p68.ebuild rename packaging/{fpdb-1.0_alpha3_p80.ebuild => fpdb-1.0_alpha4_p86.ebuild} (95%) diff --git a/docs/known-bugs-and-planned-features.txt b/docs/known-bugs-and-planned-features.txt index 830c4297..86453039 100644 --- a/docs/known-bugs-and-planned-features.txt +++ b/docs/known-bugs-and-planned-features.txt @@ -2,12 +2,11 @@ todolist (db=database, imp=importer, tv=tableviewer) Everything is subject to change and the order does not indicate priority. Patches for any of these or other features are very welcome, see readme-overview.txt for contacts. Please also see db-todo.txt -alpha4 (release 22-29Sep) +alpha4 (release 25Sep-2Oct) ====== newsletter&mailing list update requirements to include new pgsql interface lib and rename to dependencies.txt ebuild: support pgsql -find correct sf logo link fix HUD config location and update release script accordingly windows integrated installer @@ -15,7 +14,6 @@ update install-in-gentoo on website update ebuild and ubuntu guide for HUD_config.xml store raw hand in db and write reimport function using the raw hand field -ftp: read maxSeats rather than making an assumption make sure totalProfit shows actual profit rather than winnings. update abbreviations.txt export settings[hud-defaultInterval] to conf @@ -44,6 +42,8 @@ Many STTs won't import before beta =========== +make linux use /etc/fpdb for config first, then ~/.fpdb. +FTP file with only one partial hand causes error No Full Tilt support in HUD HUD stat windows are too big on Windows HUD task bar entries on Windows won't go away diff --git a/packaging/fpdb-1.0_alpha2_p68.ebuild b/packaging/fpdb-1.0_alpha2_p68.ebuild deleted file mode 100644 index 30304eeb..00000000 --- a/packaging/fpdb-1.0_alpha2_p68.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-util/fpdb/fpdb-1.0_alpha2_p68.ebuild,v 1.0 2008/08/31 23:00:00 steffen@sycamoretest.info Exp $ - -NEED_PYTHON=2.3 - -#inherit distutils - -MY_P="fpdb-${PV}" -DESCRIPTION="A database program to track your online poker games" -HOMEPAGE="https://sourceforge.net/projects/fpdb/" -#SRC_URI="mirror://sourceforge/fpdb/${MY_P}.tar.bz2" -SRC_URI="mirror://sourceforge/fpdb/fpdb-alpha2-p68.tar.bz2" - -LICENSE="AGPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -#note: this should work on other architectures too, please send me your experiences -IUSE="" - -RDEPEND="virtual/mysql - dev-python/mysql-python - >=x11-libs/gtk+-2.10 - dev-python/pygtk" -DEPEND="${RDEPEND}" - -src_install() { - DIRINST="${D}usr/share/games/fpdb/" - mkdir -p "${DIRINST}" - cp -R * "${DIRINST}" || die - - DIRBIN="${D}usr/games/bin/" - mkdir -p "${DIRBIN}" - echo "pathes" - echo "${DIRINST}pyfpdb/fpdb.py" - echo "${DIRBIN}fpdb.py" - echo - echo "cd /usr/share/games/fpdb/pyfpdb/ && python fpdb.py" > "${DIRBIN}fpdb" || die - chmod 755 "${DIRBIN}fpdb" || die -} - -#src_test() { -#} - -pkg_postinst() { - elog "Fpdb has been installed and can be called by executing /usr/games/bin/fpdb.py" - elog "You need to perform a couple more steps manually." - elog "Please also make sure you followed instructions from previous emerges, in particular make sure you configured mysql and set a root pw for it" - elog "Now run this command to connect to MySQL: mysql --user=root --password=yourPassword" - elog "In the mysql command line interface you need to type these two lines (make sure you get the ; at the end)" - elog "In the second line replace \"newPassword\" with a password of your choice" - elog "CREATE DATABASE fpdb;" - elog "GRANT ALL PRIVILEGES ON fpdb.* TO 'fpdb'@'localhost' IDENTIFIED BY 'newPassword' WITH GRANT OPTION;" - elog "Finally copy the default config file from ${DIRINST}docs/default.conf to ~/.fpdb/ for every user that is to use fpdb." - elog "You will need to edit the default.conf, in particular you need to replace the password with what you entered in the \"GRANT ALL...\"" - elog "Finally run the GUI and click the menu database -> recreate tables" - elog "That's it! See our webpage at http://fpdb.sourceforge.net for more documentation" - elog " " -} diff --git a/packaging/fpdb-1.0_alpha3_p80.ebuild b/packaging/fpdb-1.0_alpha4_p86.ebuild similarity index 95% rename from packaging/fpdb-1.0_alpha3_p80.ebuild rename to packaging/fpdb-1.0_alpha4_p86.ebuild index 0abc47b7..839f578e 100644 --- a/packaging/fpdb-1.0_alpha3_p80.ebuild +++ b/packaging/fpdb-1.0_alpha4_p86.ebuild @@ -9,8 +9,8 @@ NEED_PYTHON=2.3 MY_P="fpdb-${PV}" DESCRIPTION="A database program to track your online poker games" HOMEPAGE="https://sourceforge.net/projects/fpdb/" -#SRC_URI="mirror://sourceforge/fpdb/${MY_P}.tar.bz2" -SRC_URI="mirror://sourceforge/fpdb/fpdb-1.0_alpha3-p80.tar.bz2" +SRC_URI="mirror://sourceforge/fpdb/${MY_P}.tar.bz2" +#SRC_URI="mirror://sourceforge/fpdb/fpdb-1.0_alpha3-p80.tar.bz2" LICENSE="AGPL-3" SLOT="0" diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index da426dfb..94e1165e 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -407,7 +407,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt") self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect("delete_event", self.delete_event) self.window.connect("destroy", self.destroy) - self.window.set_title("Free Poker DB - version: alpha3+, p84") + self.window.set_title("Free Poker DB - version: alpha4, p86") self.window.set_border_width(1) self.window.set_size_request(1020,400) self.window.set_resizable(True) diff --git a/pyfpdb/fpdb_parse_logic.py b/pyfpdb/fpdb_parse_logic.py index 6696f64e..a79b9de4 100644 --- a/pyfpdb/fpdb_parse_logic.py +++ b/pyfpdb/fpdb_parse_logic.py @@ -93,11 +93,11 @@ def mainParser(db, cursor, site, category, hand): elif (lineTypes[i]=="ante"): fpdb_simple.parseAnteLine(hand[i], site, names, antes) elif (lineTypes[i]=="table"): - tableResult=fpdb_simple.parseTableLine(site, hand[i]) + tableResult=fpdb_simple.parseTableLine(site, base, hand[i]) else: raise fpdb_simple.FpdbError("unrecognised lineType:"+lineTypes[i]) if site=="ftp": - tableResult=fpdb_simple.parseTableLine(site, hand[0]) + tableResult=fpdb_simple.parseTableLine(site, base, hand[0]) maxSeats=tableResult['maxSeats'] tableName=tableResult['tableName'] diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index 30fe52c1..aed7cf1d 100644 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -884,7 +884,7 @@ def parseSiteHandNo(topline): return topline[pos1:pos2] #end def parseSiteHandNo -def parseTableLine(site, line): +def parseTableLine(site, base, line): """returns a dictionary with maxSeats and tableName""" if site=="ps": pos1=line.find('\'')+1 @@ -897,8 +897,19 @@ def parseTableLine(site, line): elif site=="ftp": pos1=line.find("Table ")+6 pos2=line.find("-")-1 - #print "table:",line[pos1:pos2]+"end" - return {'maxSeats':9, 'tableName':line[pos1:pos2]} + if base=="hold": + maxSeats=9 + elif base=="stud": + maxSeats=8 + + if line.find("6 max")!=-1: + maxSeats=6 + elif line.find("4 max")!=-1: + maxSeats=4 + elif line.find("heads up")!=-1: + maxSeats=2 + + return {'maxSeats':maxSeats, 'tableName':line[pos1:pos2]} else: raise FpdbError("invalid site ID") #end def parseTableLine