p142 - commented tourney summary parsing as it fails on me. this is alpha9

This commit is contained in:
steffen123 2008-11-10 02:02:12 +00:00
parent 28037de7a6
commit 49151a92bf
4 changed files with 66 additions and 6 deletions

View File

@ -0,0 +1,62 @@
# Copyright 1999-2008 Gentoo Foundation
# Gentoo had nothing to do with the production of this ebuild, but I'm pre-emptively transferring all copyrights (as far as legally possible under my local jurisdiction) to them.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-util/fpdb/fpdb-1.0_alpha8_p137.ebuild,v 1.0 2008/10/17 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"
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
dev-python/numpy
dev-python/matplotlib"
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"
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

@ -331,6 +331,7 @@ class fpdb:
#print "start of tab_main_help" #print "start of tab_main_help"
mh_tab=gtk.Label("""Welcome to Fpdb! mh_tab=gtk.Label("""Welcome to Fpdb!
For documentation please visit our website at http://fpdb.sourceforge.net/ or check the docs directory in the fpdb folder. For documentation please visit our website at http://fpdb.sourceforge.net/ or check the docs directory in the fpdb folder.
Please note that default.conf is no longer needed nor used, all configuration now happens in HUD_config.xml
This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt") This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
self.add_and_display_tab(mh_tab, "Help") self.add_and_display_tab(mh_tab, "Help")
#end def tab_main_help #end def tab_main_help
@ -362,7 +363,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 = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("delete_event", self.delete_event) self.window.connect("delete_event", self.delete_event)
self.window.connect("destroy", self.destroy) self.window.connect("destroy", self.destroy)
self.window.set_title("Free Poker DB - version: alpha8+, p137 or higher") self.window.set_title("Free Poker DB - version: alpha9, p142")
self.window.set_border_width(1) self.window.set_border_width(1)
self.window.set_size_request(1020,400) self.window.set_size_request(1020,400)
self.window.set_resizable(True) self.window.set_resizable(True)

View File

@ -174,8 +174,8 @@ class Importer:
if firstline.find("Tournament Summary")!=-1: if firstline.find("Tournament Summary")!=-1:
print "TODO: implement importing tournament summaries" print "TODO: implement importing tournament summaries"
self.faobs = readfile(inputFile) #self.faobs = readfile(inputFile)
self.parseTourneyHistory() #self.parseTourneyHistory()
return 0 return 0
site=fpdb_simple.recogniseSite(firstline) site=fpdb_simple.recogniseSite(firstline)

View File

@ -830,13 +830,11 @@ def parseHandStartTime(topline, site):
pos2 = topline.find("UTC") pos2 = topline.find("UTC")
tmp=topline[pos1:pos2] tmp=topline[pos1:pos2]
isUTC=True isUTC=True
print "UTC tmp:",tmp
else: else:
tmp=topline[-30:] tmp=topline[-30:]
#print "parsehandStartTime, tmp:", tmp #print "parsehandStartTime, tmp:", tmp
pos = tmp.find("-")+2 pos = tmp.find("-")+2
tmp = tmp[pos:] tmp = tmp[pos:]
print "ET tmp:",tmp
#Need to match either #Need to match either
# 2008/09/07 06:23:14 ET or # 2008/09/07 06:23:14 ET or
# 2008/08/17 - 01:14:43 (ET) # 2008/08/17 - 01:14:43 (ET)
@ -849,7 +847,6 @@ def parseHandStartTime(topline, site):
if (site=="ftp" or site=="ps") and not isUTC: #these use US ET if (site=="ftp" or site=="ps") and not isUTC: #these use US ET
result+=datetime.timedelta(hours=5) result+=datetime.timedelta(hours=5)
print "parseHandStartTime result:",result
return result return result
#end def parseHandStartTime #end def parseHandStartTime