import solo_turnier import logging import os import pprint import tabulate class BatchWorker: def __init__( self, config: solo_turnier.cli.Cli ): self.l = logging.getLogger('solo_turnier.batch') self.config = config def run(self): self.l.debug(self.config.__dict__) locator = solo_turnier.html_locator.HtmlLocator() self.l.info('Checking for feasible preview HTML export files in "%s"', self.config.importHtmlPath()) htmlCandidatesPreview = locator.findPreviewRoundCandidates(self.config.importHtmlPath()) self.l.debug('Found HTML file candidates for preview rounds: %s', htmlCandidatesPreview) htmlResultFiles = locator.findCandidates(self.config.importHtmlPath()) self.l.debug('Using HTML result files for result extraction: %s', htmlResultFiles) worker = solo_turnier.worker.Worker() importedData = worker.collectAllData(htmlCandidatesPreview, htmlResultFiles) combinedData = worker.combineData(importedData) consoleOutputtter = solo_turnier.output.ConsoleOutputter() consoleOutputtter.output(combinedData)