enable multiple recipients per env var
This commit is contained in:
parent
c2744b7016
commit
225d22aef2
|
@ -81,6 +81,7 @@ def main():
|
||||||
args = configargparse.ArgumentParser()
|
args = configargparse.ArgumentParser()
|
||||||
args.add_argument("--email", help="the bot's email address", env_var="DELTACHAT_ADDR")
|
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("--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("--db_path", help="location of the Delta Chat database")
|
||||||
args.add_argument("--show-ffi", action="store_true", help="print Delta Chat log")
|
args.add_argument("--show-ffi", action="store_true", help="print Delta Chat log")
|
||||||
ops = args.parse_args()
|
ops = args.parse_args()
|
||||||
|
@ -93,7 +94,7 @@ def main():
|
||||||
os.mkdir(ops.db_path)
|
os.mkdir(ops.db_path)
|
||||||
|
|
||||||
ac = setup_account(ops.email, ops.password, ops.db_path, ops.show_ffi)
|
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)")
|
print("waiting for ADHD appointments... (and I hate waiting)")
|
||||||
while 1:
|
while 1:
|
||||||
greeter.crawl()
|
greeter.crawl()
|
||||||
|
|
Loading…
Reference in a new issue