Files
BookstackBackup/functions/get_confirmation.py
2025-10-13 18:00:03 +02:00

16 lines
577 B
Python

def get_confirmation(backup_extension, selected_book):
print(f"Backup type: {backup_extension}")
while True:
confirm = input("Are these settings correct? (y/n): ").strip().lower()
if confirm == "y":
print(
f"Starting backup for book: {selected_book['name']} with filetype {backup_extension}."
)
print("Starting now.......")
return True
elif confirm == "n":
print("Stopping now.....")
return False
else:
print("Please enter 'y' or 'n'.")