Some fixes in FTP summary parsing and preparations for summary import in DB. No behaviour change expected

modified:   FulltiltToFpdb.py
	* Tourney Summary File parsing : add support for Madness tourneys
	* HH file parsing : enhance Tourney topline parsing to retrieve some info (HU, Rebuy, KO, Turbo, ...) and store it into Hand object
	modified:   Hand.py
	* Some attributes added to store tourney specific info
	modified:   SQL.py
	* Add a new request (getTourneyTypeIdByTourneyNo) to help finding a tourney already in db (preparation for Tourney Summary import)
	modified:   Tourney.py
	* Attribute tourneyComment added
	modified:   fpdb_parse_logic.py
	* Change parameters in call of fpdb_simple.recogniseTourneyTypeId
	modified:   fpdb_simple.py
	* recogniseTourneyTypeId : signature changed to allow for the search of a tourney id already in db prior to searching for tourneyTypeId
This commit is contained in:
PassThePeas
2009-08-26 01:13:34 +02:00
parent cb8bc13ceb
commit b85f8ec155
6 changed files with 71 additions and 22 deletions
+3 -4
View File
@@ -46,7 +46,6 @@ class Tourney(object):
def __init__(self, sitename, gametype, summaryText, builtFrom = "HHC"):
print "Tourney.__init__"
self.sitename = sitename
self.siteId = self.SITEIDS[sitename]
self.gametype = gametype
@@ -82,14 +81,13 @@ class Tourney(object):
self.totalAddOns = 0
self.koBounty = 0
self.countKO = 0 #To use for winnings calculation which is not counted in the rest of the summary file
self.tourneyComment = None
self.players = []
# Collections indexed by player names
self.finishPositions = {}
self.winnings = {}
# currency symbol for this summary
self.sym = None
#self.sym = self.SYMBOL[self.gametype['currency']] # save typing! delete this attr when done
@@ -129,7 +127,8 @@ class Tourney(object):
("TOTAL REBUYS", self.totalRebuys),
("TOTAL ADDONS", self.totalAddOns),
("KO BOUNTY", self.koBounty),
("NB OF KO", self.countKO)
("NB OF KO", self.countKO),
("TOURNEY COMMENT", self.tourneyComment)
)
structs = ( ("GAMETYPE", self.gametype),