From 4d7d0c7cf9ed9e4a4744e4d671211eb814df29b0 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Mon, 4 Apr 2016 10:48:37 -0300 Subject: Add info whether event is recurring, include day of week --- scripts/get_calendar.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/get_calendar.py b/scripts/get_calendar.py index b0bc186..948db0e 100644 --- a/scripts/get_calendar.py +++ b/scripts/get_calendar.py @@ -56,11 +56,13 @@ def get_events(calendar, after, before): for occurence in rrule.between(after, before, True): event_info['start'] = occurence event_info['end'] = occurence + duration + event_info['recurring'] = True yield copy.deepcopy(event_info) else: if start >= after: event_info['start'] = start event_info['end'] = end + event_info['recurring'] = False yield event_info class DatetimeEncoder(json.JSONEncoder): -- cgit v1.2.1