From c192eb33c76b87fc2d042b5c1eb1b9a2aa44d33e Mon Sep 17 00:00:00 2001 From: Morgan Barber Date: Fri, 10 May 2024 15:27:40 +0000 Subject: [PATCH] Basic CLI functions --- main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.py b/main.py index 0041253..eaad141 100755 --- a/main.py +++ b/main.py @@ -110,6 +110,16 @@ if __name__ == "__main__": ) sys.exit() try: + if config["reddit"]["thread"]["post_id"]: + for index, post_id in enumerate(config["reddit"]["thread"]["post_id"].split("+")): + index += 1 + print_step( + f'on the {index}{("st" if index % 10 == 1 else ("nd" if index % 10 == 2 else ("rd" if index % 10 == 3 else "th")))} post of {len(config["reddit"]["thread"]["post_id"].split("+"))}' + ) + main(post_id) + Popen("cls" if name == "nt" else "clear", shell=True).wait() + elif config["settings"]["times_to_run"]: + run_many(config["settings"]["times_to_run"]) if args.post_id: main(args.post_id) elif args.run_many: