Initial commit - clean repository without history

This commit is contained in:
2026-03-14 00:16:06 +00:00
commit 0877e07e76
13 changed files with 526 additions and 0 deletions

27
script.py Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/python3
import argparse
from functions import *
default_backup_dir()
parser = argparse.ArgumentParser(description="Backup script")
parser.add_argument("-s", "--show", action="store_true", help="Show enabled paths")
parser.add_argument("-d", "--debug", action="store_true", help="Enable debug")
parser.add_argument("-c", "--check", action="store_true", help="Check the declared path info")
parser.add_argument("-r", "--rotate", action="store_true", help="Rotate the backups")
parser.add_argument("--dry", action="store_true", help="Dry run for rotate: show what would be deleted (no deletion)")
args = parser.parse_args()
if args.show:
show_enabled()
elif args.debug:
backups_now(debug="on")
elif args.check:
checked = check_existing_folders(debug="on")
#print(checked)
elif args.rotate:
# passa il flag dry al chiamante; default è delete se non specifichi --dry
autorotate_backups(dry_run=args.dry)
else:
backups_now()
autorotate_backups()