def readBible(oldFile, newFile): contentOld = fileReader.getFileContentRemEmptys(oldFile) contentNew = fileReader.getFileContentRemEmptys(newFile) bible = database.Bible() ommitedLinesOld = 0 ommitedLinesNew = 0 for line in contentOld: try: parsed = parser.parse(line) bible.addVerset("Stary Testament", parsed[0], parsed[1], [parsed[2], parsed[3]]) except ValueError: ommitedLinesOld = ommitedLinesOld + 1 for line in contentNew: try: parsed = parser.parse(line) bible.addVerset("Stary Testament", parsed[0], parsed[1], [parsed[2], parsed[3]]) except ValueError: ommitedLinesNew = ommitedLinesNew + 1 log.inf("Ommited: old " + str(ommitedLinesOld)) log.inf("Ommited: new " + str(ommitedLinesNew)) return bible
def timeStop(start_time, note): elapsed_time = time.time() - start_time log.turnOn() log.inf("time for " + note + ": " + str(elapsed_time) + " s") log.turnOff()