p135 - updated tv

This commit is contained in:
steffen123 2008-10-15 18:20:33 +01:00
parent 155b2e93b0
commit bc15025be5
6 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# 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_alpha5_p110.ebuild,v 1.0 2008/09/26 steffen@sycamoretest.info Exp $
# $Header: /var/cvsroot/gentoo-x86/games-util/fpdb/fpdb-1.0_alpha7_p135.ebuild,v 1.0 2008/10/15 steffen@sycamoretest.info Exp $
NEED_PYTHON=2.3

View File

@ -59,6 +59,7 @@ if __name__ == "__main__":
settings['db-password']=options.password
settings['db-databaseName']=options.database
settings['handCount']=options.handCount
settings['failOnError']=options.failOnError
importer = fpdb_import.Importer(options, settings)
importer.addImportFile(options.inputFile)

View File

@ -220,7 +220,7 @@ class GuiTableViewer (threading.Thread):
#print "start of table_viewer.read_names_clicked"
self.db.reconnect()
self.cursor=self.db.cursor
self.hands_id=self.last_read_hand_id
#self.hands_id=self.last_read_hand_id
self.db.cursor.execute("SELECT gametypeId FROM Hands WHERE id=%s", (self.hands_id, ))
self.gametype_id=self.db.cursor.fetchone()[0]
@ -257,7 +257,9 @@ class GuiTableViewer (threading.Thread):
self.importer.setFailOnError(False)
self.importer.setHandCount(0)
self.last_read_hand_id=self.importer.import_file_dict()
self.importer.addImportFile(self.inputFile)
self.importer.runImport()
self.hands_id=self.importer.handsId
#end def table_viewer.import_clicked
def all_clicked(self, widget, data):

View File

@ -426,7 +426,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: alpha6+, p131 or higher")
self.window.set_title("Free Poker DB - version: alpha6+, p135 or higher")
self.window.set_border_width(1)
self.window.set_size_request(1020,400)
self.window.set_resizable(True)

View File

@ -267,6 +267,7 @@ class Importer:
handsId=0
#todo: this will cause return of an unstored hand number if the last hand was error or partial
self.db.commit()
self.handsId=handsId
return handsId
#end def import_file_dict

View File

@ -315,10 +315,12 @@ def filterAnteBlindFold(site,hand):
#removes useless lines as well as trailing spaces
def filterCrap(site, hand, isTourney):
#remove one trailing space at end of line
#remove two trailing spaces at end of line
for i in range (len(hand)):
if (hand[i][-1]==' '):
hand[i]=hand[i][:-1]
if (hand[i][-1]==' '):
hand[i]=hand[i][:-1]
#print "hand after trailing space removal in filterCrap:",hand
#general variable position word filter/string filter