diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-26 21:19:31 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-26 21:19:31 +0200 |
commit | daded7e491b01cf38177ee91adacf6558dad3733 (patch) | |
tree | ca1ffad08acc2bc78c8d8956a62c17bb6777e248 /module/vcomponent/load.scm | |
parent | ICAL output work. (diff) | |
download | calp-daded7e491b01cf38177ee91adacf6558dad3733.tar.gz calp-daded7e491b01cf38177ee91adacf6558dad3733.tar.xz |
Add export as ics button.
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/load.scm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/module/vcomponent/load.scm b/module/vcomponent/load.scm index 5fbb5553..37d57b56 100644 --- a/module/vcomponent/load.scm +++ b/module/vcomponent/load.scm @@ -17,6 +17,13 @@ (define-config calendar-files '() "" list?) +(define-public (calculate-recurrence-set regular repeating) + (interleave-streams + ev-time<? + (cons (list->stream regular) + (map generate-recurrence-set repeating) + ))) + ;; Reads all calendar files from disk, generate recurence-sets for all repeating events, ;; and returns a list of calendars, and a stream of all events "ready" for display. (define* (load-calendars #:optional (calendar-files (get-config 'calendar-files))) @@ -25,11 +32,7 @@ (report-time! "Calendars loaded, interleaving and reccurring") (values calendars - (interleave-streams - ev-time<? - (cons (list->stream regular) - (map generate-recurrence-set repeating) - ))))) + (calculate-recurrence-set regular repeating)))) ;; Basic version, loads calendrs, sorts the events, and returns ;; regular and repeating events separated from each other. |