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.

This commit is contained in:
steffen123 2008-09-18 01:23:38 +01:00
parent 1a008b1ac2
commit 672d2d70af
6 changed files with 22 additions and 70 deletions

View File

@ -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

View File

@ -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 " "
}

View File

@ -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"

View File

@ -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)

View File

@ -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']

View File

@ -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