Merge branch 'master' of git://git.assembla.com/fpdb
This commit is contained in:
commit
bfa5137889
|
@ -1,11 +0,0 @@
|
||||||
db-backend=2
|
|
||||||
db-host=localhost
|
|
||||||
db-databaseName=fpdb
|
|
||||||
db-user=fpdb
|
|
||||||
db-password=enterYourPwHere
|
|
||||||
imp-callFpdbHud=True
|
|
||||||
tv-combinedStealFold=True
|
|
||||||
tv-combined2B3B=True
|
|
||||||
tv-combinedPostflop=True
|
|
||||||
bulkImport-defaultPath=default
|
|
||||||
hud-defaultPath=default
|
|
|
@ -78,21 +78,12 @@ class GuiTableViewer (threading.Thread):
|
||||||
if (self.category=="holdem" or self.category=="omahahi" or self.category=="omahahilo"):
|
if (self.category=="holdem" or self.category=="omahahi" or self.category=="omahahilo"):
|
||||||
tmp=("Name", "HDs", "VPIP", "PFR", "PF3B4B", "ST")
|
tmp=("Name", "HDs", "VPIP", "PFR", "PF3B4B", "ST")
|
||||||
|
|
||||||
if self.settings['tv-combinedStealFold']:
|
|
||||||
tmp+=("FSB", )
|
|
||||||
else:
|
|
||||||
tmp+=("FS", "FB")
|
tmp+=("FS", "FB")
|
||||||
|
|
||||||
tmp+=("CB", )
|
tmp+=("CB", )
|
||||||
|
|
||||||
if self.settings['tv-combined2B3B']:
|
|
||||||
tmp+=("23B", )
|
|
||||||
else:
|
|
||||||
tmp+=("2B", "3B")
|
tmp+=("2B", "3B")
|
||||||
|
|
||||||
if self.settings['tv-combinedPostflop']:
|
|
||||||
tmp+=("Postf A", "Postf F")
|
|
||||||
else:
|
|
||||||
tmp+=("AF", "FF", "AT", "FT", "AR", "FR")
|
tmp+=("AF", "FF", "AT", "FT", "AR", "FR")
|
||||||
|
|
||||||
tmp+=("WtSD", "W$wsF", "W$SD")
|
tmp+=("WtSD", "W$wsF", "W$SD")
|
||||||
|
@ -144,28 +135,14 @@ class GuiTableViewer (threading.Thread):
|
||||||
|
|
||||||
tmp.append(self.hudDivide(row[31],row[30])+" ("+str(row[30])+")") #ST
|
tmp.append(self.hudDivide(row[31],row[30])+" ("+str(row[30])+")") #ST
|
||||||
|
|
||||||
if self.settings['tv-combinedStealFold']:
|
|
||||||
tmp.append(self.hudDivide(row[35]+row[33],row[34]+row[32])+" ("+str(row[34]+row[32])+")") #FSB
|
|
||||||
else:
|
|
||||||
tmp.append(self.hudDivide(row[35],row[34])+" ("+str(row[34])+")") #FS
|
tmp.append(self.hudDivide(row[35],row[34])+" ("+str(row[34])+")") #FS
|
||||||
tmp.append(self.hudDivide(row[33],row[32])+" ("+str(row[32])+")") #FB
|
tmp.append(self.hudDivide(row[33],row[32])+" ("+str(row[32])+")") #FB
|
||||||
|
|
||||||
tmp.append(self.hudDivide(row[37],row[36])+" ("+str(row[36])+")") #CB
|
tmp.append(self.hudDivide(row[37],row[36])+" ("+str(row[36])+")") #CB
|
||||||
|
|
||||||
if self.settings['tv-combined2B3B']:
|
|
||||||
tmp.append(self.hudDivide(row[39]+row[41],row[38]+row[40])+" ("+str(row[38]+row[40])+")") #23B
|
|
||||||
else:
|
|
||||||
tmp.append(self.hudDivide(row[39],row[38])+" ("+str(row[38])+")") #2B
|
tmp.append(self.hudDivide(row[39],row[38])+" ("+str(row[38])+")") #2B
|
||||||
tmp.append(self.hudDivide(row[41],row[40])+" ("+str(row[40])+")") #3B
|
tmp.append(self.hudDivide(row[41],row[40])+" ("+str(row[40])+")") #3B
|
||||||
|
|
||||||
if self.settings['tv-combinedPostflop']:
|
|
||||||
aggCount=row[16]+row[17]+row[18]
|
|
||||||
handCount=row[11]+row[12]+row[13]
|
|
||||||
foldCount=row[24]+row[25]+row[26]
|
|
||||||
otherRaiseCount=row[20]+row[21]+row[22]
|
|
||||||
tmp.append(self.hudDivide(aggCount,handCount)+" ("+str(handCount)+")") #Agg
|
|
||||||
tmp.append(self.hudDivide(foldCount,otherRaiseCount)+" ("+str(otherRaiseCount)+")") #FF
|
|
||||||
else:
|
|
||||||
tmp.append(self.hudDivide(row[16],row[11])+" ("+str(row[11])+")") #AF
|
tmp.append(self.hudDivide(row[16],row[11])+" ("+str(row[11])+")") #AF
|
||||||
tmp.append(self.hudDivide(row[24],row[20])+" ("+str(row[20])+")") #FF
|
tmp.append(self.hudDivide(row[24],row[20])+" ("+str(row[20])+")") #FF
|
||||||
tmp.append(self.hudDivide(row[17],row[12])+" ("+str(row[12])+")") #AT
|
tmp.append(self.hudDivide(row[17],row[12])+" ("+str(row[12])+")") #AT
|
||||||
|
|
|
@ -17,7 +17,15 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from optparse import OptionParser
|
||||||
|
|
||||||
|
|
||||||
|
parser = OptionParser()
|
||||||
|
parser.add_option("-x", "--errorsToConsole", action="store_true",
|
||||||
|
help="If passed error output will go to the console rather than .")
|
||||||
|
(options, sys.argv) = parser.parse_args()
|
||||||
|
|
||||||
|
if not options.errorsToConsole:
|
||||||
print "Note: error output is being diverted to fpdb-error-log.txt and HUD-error.txt. Any major error will be reported there _only_."
|
print "Note: error output is being diverted to fpdb-error-log.txt and HUD-error.txt. Any major error will be reported there _only_."
|
||||||
errorFile = open('fpdb-error-log.txt', 'w', 0)
|
errorFile = open('fpdb-error-log.txt', 'w', 0)
|
||||||
sys.stderr = errorFile
|
sys.stderr = errorFile
|
||||||
|
|
|
@ -303,4 +303,4 @@ class Importer:
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print "CLI for fpdb_import is currently on vacation please check in later"
|
print "CLI for fpdb_import is now available as CliFpdb.py"
|
||||||
|
|
|
@ -818,16 +818,25 @@ def parseHandStartTime(topline, site):
|
||||||
counter+=1
|
counter+=1
|
||||||
if counter==10: break
|
if counter==10: break
|
||||||
|
|
||||||
|
isUTC=False
|
||||||
if site=="ftp":
|
if site=="ftp":
|
||||||
pos = topline.find(" ", len(topline)-26)+1
|
pos = topline.find(" ", len(topline)-26)+1
|
||||||
tmp = topline[pos:]
|
tmp = topline[pos:]
|
||||||
#print "year:", tmp[14:18], "month", tmp[19:21], "day", tmp[22:24], "hour", tmp[0:2], "minute", tmp[3:5], "second", tmp[6:8]
|
#print "year:", tmp[14:18], "month", tmp[19:21], "day", tmp[22:24], "hour", tmp[0:2], "minute", tmp[3:5], "second", tmp[6:8]
|
||||||
result = datetime.datetime(int(tmp[14:18]), int(tmp[19:21]), int(tmp[22:24]), int(tmp[0:2]), int(tmp[3:5]), int(tmp[6:8]))
|
result = datetime.datetime(int(tmp[14:18]), int(tmp[19:21]), int(tmp[22:24]), int(tmp[0:2]), int(tmp[3:5]), int(tmp[6:8]))
|
||||||
elif site=="ps":
|
elif site=="ps":
|
||||||
|
if topline.find("UTC")!=-1:
|
||||||
|
pos1 = topline.find("-")+2
|
||||||
|
pos2 = topline.find("UTC")
|
||||||
|
tmp=topline[pos1:pos2]
|
||||||
|
isUTC=True
|
||||||
|
print "UTC tmp:",tmp
|
||||||
|
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)
|
||||||
|
@ -837,9 +846,10 @@ def parseHandStartTime(topline, site):
|
||||||
else:
|
else:
|
||||||
raise FpdbError("invalid site in parseHandStartTime")
|
raise FpdbError("invalid site in parseHandStartTime")
|
||||||
|
|
||||||
if site=="ftp" or site=="ps": #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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user