first commit

This commit is contained in:
2025-10-12 04:14:31 +02:00
commit 9a27cc175c
10 changed files with 190 additions and 0 deletions

24
functions/backupType.py Normal file
View File

@@ -0,0 +1,24 @@
def get_backup_extension():
backup_type = input("Enter backup type (md, pdf, html, text): ").strip().lower()
if backup_type in ["md", "markdown"]:
return "markdown"
elif backup_type == "pdf":
return "PDF"
elif backup_type == "html":
return "HTML"
elif backup_type in ["plain", "text", "txt", "plain_text"]:
return "Plaintext"
else:
raise ValueError("Unsupported backup type")
def set_backup_extension_filetype(backup_type):
if backup_type == "markdown":
return ".md"
elif backup_type == "PDF":
return ".pdf"
elif backup_type == "HTML":
return ".html"
elif backup_type == "Plaintext":
return ".txt"
else:
print("Error file type not found")