def matchplan(self, match): nextMatch = self.teamsList(match) setMatch = match running = True out = open(s_config.web_sites('graphing.html')).read() out = out.replace('{Match}', match) out = out.replace( '{Schedule}', setMatch + ' : ' + str(self.teamsList(setMatch)) + " {After}") while running: nextMatchNumber = int(match.split('-')[0]) - 1 if nextMatchNumber > 0: match = "{0:0>3}-q".format(nextMatchNumber) for team in nextMatch: if team in self.teamsList(match): running = False out = out.replace('{After}', 'After ' + match) else: running = False graphing.graph_match(self.teamsList(setMatch), setMatch) return out.replace('{Data}', open(s_config.web_data('matchData.html')).read())
def matchplan(self, match): nextMatch = self.teamsList(match) setMatch = match running = True out = open(s_config.web_sites('graphing.html')).read() out = out.replace('{Match}', match) out = out.replace('{Schedule}', setMatch + ' : ' + str(self.teamsList(setMatch))) while running: nextMatchNumber = int(match.split('-')[0]) - 1 if nextMatchNumber > 0: match = "{0:0>3}-q".format(nextMatchNumber) for team in nextMatch: if team in self.teamsList(match): running = False out = out.replace( '{After}', 'Final After: ' + match + ' Updated: ' + event.EventDal.get_current_match()) else: running = False out = out.replace( '{After}', 'Updated: ' + event.EventDal.get_current_match()) return out.replace('{Data}', graphing.examine_match(self.teamsList(setMatch)))
def teamplan(self, team='1318'): match = '001-q' matches = list() while '""' not in server.model.match.MatchDal.match_teams( match) and '130' not in match: if team in server.model.match.MatchDal.match_teams(match): matches.append(match) nextMatchNumber = int(match.split('-')[0]) + 1 match = "{0:0>3}-q".format(nextMatchNumber) out = '' for match in matches: out += '<a href="matchplan?match={M}">{M}</a> ' out = out.replace('{M}', match) return out