add comments
This commit is contained in:
parent
7914c8de92
commit
8523e61a17
|
@ -2,10 +2,15 @@
|
|||
import os
|
||||
import borg_variables
|
||||
import sys
|
||||
import configparser
|
||||
|
||||
chosen_activity = 100
|
||||
|
||||
# Setting the environment variables
|
||||
os.environ['BORG_REPO'] = str(borg_variables.repository)
|
||||
os.environ['BORG_PASSPHRASE'] = str(borg_variables.password)
|
||||
|
||||
# The main menu starts there
|
||||
while chosen_activity != 0:
|
||||
print("What would you like to do?")
|
||||
# Start the chosen activity and go back to the activity selector.
|
||||
|
@ -13,11 +18,16 @@ while chosen_activity != 0:
|
|||
try:
|
||||
chosen_activity = int(input("Choose the desired activity:"))
|
||||
if chosen_activity == 1:
|
||||
# prints all the archives in the repository and lists them with
|
||||
# less
|
||||
os.system('borg list | less')
|
||||
if chosen_activity == 2:
|
||||
# Displays all the information related to the archive name the user
|
||||
# enters
|
||||
archive_name = input("Please enter the archive name: ")
|
||||
os.system('borg info ::' + archive_name)
|
||||
if chosen_activity == 3:
|
||||
# mounts a chosen archive to /tmp/archive name
|
||||
archive_name = input("Please enter the archive name: ")
|
||||
mount_point = "/tmp/" + archive_name
|
||||
if not os.path.exists(mount_point):
|
||||
|
|
Reference in New Issue