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")