p57 - added optional call to hud into importer
changed config file to windows line endings started updating print_hand to new tables
This commit is contained in:
@@ -54,7 +54,7 @@ class GuiAutoImport (threading.Thread):
|
||||
print "AutoImport is not recursive - please select the final directory in which the history files are"
|
||||
else:
|
||||
self.inputFile=self.path+os.sep+file
|
||||
fpdb_import.import_file_dict(self)
|
||||
fpdb_import.import_file_dict(self, self.settings)
|
||||
print "GuiBulkImport.import_dir done"
|
||||
|
||||
interval=int(self.intervalTBuffer.get_text(self.intervalTBuffer.get_start_iter(), self.intervalTBuffer.get_end_iter()))
|
||||
|
||||
@@ -32,7 +32,7 @@ class GuiBulkImport (threading.Thread):
|
||||
print "BulkImport is not recursive - please select the final directory in which the history files are"
|
||||
else:
|
||||
self.inputFile=self.path+os.sep+file
|
||||
fpdb_import.import_file_dict(self)
|
||||
fpdb_import.import_file_dict(self, self.settings)
|
||||
print "GuiBulkImport.import_dir done"
|
||||
|
||||
def load_clicked(self, widget, data=None):
|
||||
|
||||
+7
-1
@@ -248,6 +248,7 @@ class fpdb:
|
||||
self.settings['os']="windows"
|
||||
self.settings['tv-combinedStealFold']=True
|
||||
self.settings['tv-combined2B3B']=True
|
||||
self.settings['imp-callFpdbHud']=True
|
||||
|
||||
if self.settings['os']=="windows":
|
||||
self.settings['bulkImport-defaultPath']="C:\\Program Files\\PokerStars\\HandHistory\\filename.txt"
|
||||
@@ -269,6 +270,11 @@ class fpdb:
|
||||
self.settings['db-user']=lines[i][8:-1]
|
||||
elif lines[i].startswith("db-password="):
|
||||
self.settings['db-password']=lines[i][12:-1]
|
||||
elif lines[i].startswith("imp-callFpdbHud="):
|
||||
if lines[i].find("True")!=-1:
|
||||
self.settings['imp-callFpdbHud']=True
|
||||
else:
|
||||
self.settings['imp-callFpdbHud']=False
|
||||
elif lines[i].startswith("tv-combinedPostflop="):
|
||||
if lines[i].find("True")!=-1:
|
||||
self.settings['tv-combinedPostflop']=True
|
||||
@@ -370,7 +376,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: alpha1+, p56")
|
||||
self.window.set_title("Free Poker DB - version: alpha1+, p57")
|
||||
self.window.set_border_width(1)
|
||||
self.window.set_size_request(1020,400)
|
||||
self.window.set_resizable(True)
|
||||
|
||||
+10
-10
@@ -34,9 +34,10 @@ def import_file(server, database, user, password, inputFile):
|
||||
self.user=user
|
||||
self.password=password
|
||||
self.inputFile=inputFile
|
||||
import_file_dict(self)
|
||||
self.settings={'imp-callFpdbHud':False}
|
||||
import_file_dict(self, settings)
|
||||
|
||||
def import_file_dict(options):
|
||||
def import_file_dict(options, settings):
|
||||
last_read_hand=0
|
||||
if (options.inputFile=="stdin"):
|
||||
inputFile=sys.stdin
|
||||
@@ -99,15 +100,14 @@ def import_file_dict(options):
|
||||
hand=fpdb_simple.filterCrap(site, hand, isTourney)
|
||||
|
||||
try:
|
||||
if (category=="holdem" or category=="omahahi" or category=="omahahilo" or category=="razz" or category=="studhi" or category=="studhilo"):
|
||||
if (category=="razz" or category=="studhi" or category=="studhilo"):
|
||||
raise fpdb_simple.FpdbError ("stud/razz currently out of order")
|
||||
last_read_hand=fpdb_parse_logic.mainParser(db, cursor, site, category, hand)
|
||||
db.commit()
|
||||
else:
|
||||
raise fpdb_simple.FpdbError ("invalid category")
|
||||
|
||||
if (category=="razz" or category=="studhi" or category=="studhilo"):
|
||||
raise fpdb_simple.FpdbError ("stud/razz currently out of order")
|
||||
last_read_hand=fpdb_parse_logic.mainParser(db, cursor, site, category, hand)
|
||||
db.commit()
|
||||
|
||||
stored+=1
|
||||
if settings['imp-callFpdbHud']:
|
||||
print "call to HUD here"
|
||||
db.commit()
|
||||
except fpdb_simple.DuplicateError:
|
||||
duplicates+=1
|
||||
|
||||
Reference in New Issue
Block a user