From 225d22aef2c9d4ea5a6b9ee02363958d1bc93f00 Mon Sep 17 00:00:00 2001 From: missytake Date: Wed, 13 Mar 2024 17:35:17 +0100 Subject: [PATCH] enable multiple recipients per env var --- src/adhd_reminder/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/adhd_reminder/__main__.py b/src/adhd_reminder/__main__.py index 79b0356..7325fb0 100644 --- a/src/adhd_reminder/__main__.py +++ b/src/adhd_reminder/__main__.py @@ -81,6 +81,7 @@ def main(): args = configargparse.ArgumentParser() args.add_argument("--email", help="the bot's email address", env_var="DELTACHAT_ADDR") args.add_argument("--password", help="the bot's password", env_var="DELTACHAT_PASSWORD") + args.add_argument("--recipients", help="space-separated list of recipients", env_var="DELTACHAT_RECIPIENTS") args.add_argument("--db_path", help="location of the Delta Chat database") args.add_argument("--show-ffi", action="store_true", help="print Delta Chat log") ops = args.parse_args() @@ -93,7 +94,7 @@ def main(): os.mkdir(ops.db_path) ac = setup_account(ops.email, ops.password, ops.db_path, ops.show_ffi) - greeter = GreetBot(ac, ["nami@nine.testrun.org"]) + greeter = GreetBot(ac, args.recipients.split()) print("waiting for ADHD appointments... (and I hate waiting)") while 1: greeter.crawl()