diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2023-01-08 18:21:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-08 18:21:52 +0100 |
commit | 77e7d9ee94e1aa45b6e0d189db0da95830495c47 (patch) | |
tree | 48fbffd394c575bfcf85cc2491fd9b866eb39407 /calendar_cli | |
parent | eab545b1a84ed171043488ace980bf6c0bd6fcbc (diff) | |
parent | 47bfd5a9167676328d824f092e1853145edaf73b (diff) | |
download | calendar-cli-77e7d9ee94e1aa45b6e0d189db0da95830495c47.zip |
Merge pull request #100 from fauxmight/template-attributes-fix
Allow 'location,' 'description,' and 'url' values to be used in template
Diffstat (limited to 'calendar_cli')
-rwxr-xr-x | calendar_cli/legacy.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/calendar_cli/legacy.py b/calendar_cli/legacy.py index 6e15715..4ad839a 100755 --- a/calendar_cli/legacy.py +++ b/calendar_cli/legacy.py @@ -632,9 +632,15 @@ def todo_list(caldav_conn, args): for summary_attr in ('summary', 'location', 'description', 'url', 'uid'): if hasattr(task.instance.vtodo, summary_attr): t['summary'] = getattr(task.instance.vtodo, summary_attr).value + t['summary'] = to_normal_str(t['summary']) break + for attr in ('location', 'description', 'url'): + if hasattr(task.instance.vtodo, attr): + t[attr] = getattr(task.instance.vtodo, attr).value + else: + t[attr] = "" + t[attr] = to_normal_str(t[attr]) t['uid'] = task.instance.vtodo.uid.value - t['summary'] = to_normal_str(t['summary']) print(args.todo_template.format(**t)) def todo_complete(caldav_conn, args): |