summaryrefslogtreecommitdiff
path: root/calendar_cli
diff options
context:
space:
mode:
authorA Frederick Christensen <calendar_cli@ivories.org>2023-01-08 11:05:39 -0600
committerA Frederick Christensen <calendar_cli@ivories.org>2023-01-08 11:16:33 -0600
commit47bfd5a9167676328d824f092e1853145edaf73b (patch)
treef1602f125af75ba14ce4a744f09c2060db158f15 /calendar_cli
parent280ad8979d4d0322493a3443685187fb01790e57 (diff)
downloadcalendar-cli-47bfd5a9167676328d824f092e1853145edaf73b.zip
Allow 'location,' 'description,' and 'url' values to be used in template
Diffstat (limited to 'calendar_cli')
-rwxr-xr-xcalendar_cli/legacy.py8
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):