rt-send-all-reminders: Support extra args for rt
in the YAML file.
This commit is contained in:
parent
de60b9ed56
commit
ddf525f0c5
1 changed files with 3 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue