diff --git a/utils/manager/main.py b/utils/manager/main.py index 605d360..7882cc5 100644 --- a/utils/manager/main.py +++ b/utils/manager/main.py @@ -30,9 +30,9 @@ def main(): ap.add_argument("--savefile", help="The savefile to use", default=os.path.expanduser("~/.local/faulty/neo.save")) - ap.add_argument("--del-savefile", help="Delete the savefile", + ap.add_argument("--del-savefile", "--rm-save", help="Delete the savefile", action="store_true") - ap.add_argument("--ignore-savefile", help="Ignore the savefile", + ap.add_argument("--ignore-savefile", "--no-load", help="Ignore the savefile", action="store_true") # -x, --exclude: e.g. -x this -x that @@ -75,11 +75,21 @@ def main(): if args.save: savefile["files"] = files - return def handle_aliases(fnlist: dict, name: str): return fnlist.get(name, lambda: print("does not exist")) + def dump_data(): + print(f"savefile: {args.savefile}") + print(f"del_savefile: {args.del_savefile}") + print(f"ignore_savefile: {args.ignore_savefile}") + print(f"exclude: {args.exclude}") + print(f"include: {args.include}") + print(f"save: {args.save}") + print(f"action: {args.action}") + print(f"args: {args.args}") + print(f"files: {files}") + fnlist = { "up": lambda: dc(f"up -d {' '.join(args.args)}"), "upr": lambda: dc(f"up -d --build {' '.join(args.args)}"), @@ -87,6 +97,7 @@ def main(): "default": lambda: dc(f"{' '.join(args.args)}"), "setup": lambda: setup_handler(args.args[0]), "delete-project-files": lambda: os.system(f"sudo rm -rf /srv/{args.args[0]}"), + "_dump": lambda: dump_data(), "dpf": lambda: handle_aliases(fnlist, "delete-project-files")() }