From ddf525f0c59e6dd3d8e7e34b27a0212d3147a969 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Wed, 16 May 2018 15:59:09 -0400 Subject: [PATCH] rt-send-all-reminders: Support extra args for `rt` in the YAML file. --- scripts/rt-send-all-reminders | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/rt-send-all-reminders b/scripts/rt-send-all-reminders index 6a0e1f5..d155742 100755 --- a/scripts/rt-send-all-reminders +++ b/scripts/rt-send-all-reminders @@ -17,7 +17,7 @@ SHARE_DIR.mkdir(parents=True, exist_ok=True) class Reminder: def __init__(self, key, min_days, max_days, search, body_file, - date_field='Due', action='correspond', dry_run=False): + date_field='Due', action='correspond', dry_run=False, rt_args=None): self.key = key self.min_days_diff = int(min_days) self.max_days_diff = int(max_days) @@ -26,6 +26,7 @@ class Reminder: self.body_file = body_file self.action = action self.dry_run = dry_run + self.rt_args = [] if rt_args is None else rt_args.copy() def _remind_cmd(self): yield 'rt-auto-remind' @@ -39,6 +40,7 @@ class Reminder: yield str(self.max_days_diff) yield self.search yield str(self.body_file) + yield from self.rt_args def remind_cmd(self): return list(self._remind_cmd())