borg-manager/main.py
George Lacey 3f6e163f26 Update readme with project information
- Added information on where I intend to go with the project
- Removed old code from main.py
2016-09-19 23:11:17 +01:00

25 lines
619 B
Python

from sys import stdin
borg_output = stdin.readlines()
attributes = { "Archive name: " : "",
"Archive fingerprint: " : "",
"Time (start): " : "",
"Duration: " : "",
"Number of files: " : "", }
for i in range(0, len(borg_output)):
for key in attributes:
if borg_output[i].startswith(key):
attributes[key] = borg_output[i] \
.strip(key) \
.strip("\n")
output = open("borg.txt", "w")
for key, value in attributes.iteritems():
output.write("%s%s\n" % (key, value))
output.close()