From 54bc4d547361a065f283720e6c0aee5fcb9268a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 24 Dec 2019 01:06:43 +0100 Subject: ICAL handling of events different from display handling. Previously repeating events where always instantiated to a stream of all events to come (possibly infinite), and then zipped with the list of regular events to create a stream of all events in the world. This commit allows access to the raw lists of parsed regular and repeating events before they are extrapolated and merged. --- module/entry-points/ical.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/entry-points') diff --git a/module/entry-points/ical.scm b/module/entry-points/ical.scm index 99253160..92d0d31c 100644 --- a/module/entry-points/ical.scm +++ b/module/entry-points/ical.scm @@ -2,7 +2,7 @@ :export (main) :use-module (util) :use-module (output ical) - :use-module ((vcomponent) :select (load-calendars)) + :use-module ((vcomponent) :select (load-calendars*)) :use-module ((parameters) :select (calendar-files)) :use-module (ice-9 getopt-long) :use-module (srfi srfi-19) @@ -21,10 +21,10 @@ (define end (cond [(option-ref opts 'to #f) => parse-freeform-date] [else (normalize-date* (set (date-month start) = (+ 1)))])) - (define-values (calendars events) - (load-calendars - calendar-files: (cond [(option-ref opts 'file #f) => list] - [else (calendar-files)]) )) + ;; TODO this contains repeated events multiple times + (define-values (calendars regular repeating) + (load-calendars* calendar-files: (cond [(option-ref opts 'file #f) => list] + [else (calendar-files)]) )) - (ical-main calendars events start end) + (ical-main calendars regular repeating start end) ) -- cgit v1.2.3