From 49151a92bfbb110b3ba1af104a255cfb7177915c Mon Sep 17 00:00:00 2001 From: steffen123 Date: Mon, 10 Nov 2008 02:02:12 +0000 Subject: [PATCH] p142 - commented tourney summary parsing as it fails on me. this is alpha9 --- packaging/gentoo/fpdb-1.0_alpha9_p142.ebuild | 62 ++++++++++++++++++++ pyfpdb/fpdb.py | 3 +- pyfpdb/fpdb_import.py | 4 +- pyfpdb/fpdb_simple.py | 3 - 4 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 packaging/gentoo/fpdb-1.0_alpha9_p142.ebuild diff --git a/packaging/gentoo/fpdb-1.0_alpha9_p142.ebuild b/packaging/gentoo/fpdb-1.0_alpha9_p142.ebuild new file mode 100644 index 00000000..c55903f3 --- /dev/null +++ b/packaging/gentoo/fpdb-1.0_alpha9_p142.ebuild @@ -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 " " +} diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index ad4d3f3d..660bf089 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -331,6 +331,7 @@ class fpdb: #print "start of tab_main_help" 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. +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") self.add_and_display_tab(mh_tab, "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.connect("delete_event", self.delete_event) 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_size_request(1020,400) self.window.set_resizable(True) diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index ee70a9d3..3b0fb983 100755 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -174,8 +174,8 @@ class Importer: if firstline.find("Tournament Summary")!=-1: print "TODO: implement importing tournament summaries" - self.faobs = readfile(inputFile) - self.parseTourneyHistory() + #self.faobs = readfile(inputFile) + #self.parseTourneyHistory() return 0 site=fpdb_simple.recogniseSite(firstline) diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index 6b532e97..d1b191de 100644 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -830,13 +830,11 @@ def parseHandStartTime(topline, site): pos2 = topline.find("UTC") tmp=topline[pos1:pos2] isUTC=True - print "UTC tmp:",tmp else: tmp=topline[-30:] #print "parsehandStartTime, tmp:", tmp pos = tmp.find("-")+2 tmp = tmp[pos:] - print "ET tmp:",tmp #Need to match either # 2008/09/07 06:23:14 ET or # 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 result+=datetime.timedelta(hours=5) - print "parseHandStartTime result:",result return result #end def parseHandStartTime