diff --git a/main.py b/main.py index 3664e93..066f092 100644 --- a/main.py +++ b/main.py @@ -1,26 +1,26 @@ from sys import stdin -from log_entry import * +from LogEntry import * raw_borg_output = stdin.readlines() -attributes = { "Archive name: " : "", - "Archive fingerprint: " : "", - "Time (start): " : "", - "Duration: " : "", - "Number of files: " : "", } +attributes = {"Archive name: ": "", + "Archive fingerprint: ": "", + "Time (start): ": "", + "Duration: ": "", + "Number of files: ": ""} for i in range(0, len(raw_borg_output)): for key in attributes: if raw_borg_output[i].startswith(key): attributes[key] = raw_borg_output[i] \ - .strip(key) \ - .rstrip() + .strip(key) \ + .rstrip() -borg_output = log_entry(attributes["Archive name: "], - attributes["Archive fingerprint: "], - attributes["Time (start): "], - attributes["Duration: "], - attributes["Number of files: "]) +borg_output = LogEntry(attributes["Archive name: "], + attributes["Archive fingerprint: "], + attributes["Time (start): "], + attributes["Duration: "], + attributes["Number of files: "]) borg_output.print_to_file("borg.txt")