From 715e36ab81389ebf53ea158027d0a83f144eee0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 30 Jun 2020 01:58:19 +0200 Subject: Finished renamining attribute to property. --- module/output/ical.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'module/output/ical.scm') diff --git a/module/output/ical.scm b/module/output/ical.scm index de6a351d..7e514c99 100644 --- a/module/output/ical.scm +++ b/module/output/ical.scm @@ -155,7 +155,7 @@ (format #t "END:~a\r\n" (type component)) ;; If we have alternatives, splice them in here. - (cond [(attr component 'X-HNH-ALTERNATIVES) + (cond [(prop component 'X-HNH-ALTERNATIVES) => (lambda (alts) (hash-map->list (lambda (_ comp) (component->ical-string comp)) alts))])) @@ -164,23 +164,23 @@ (define (write-event-to-file event calendar-path) (define cal (make-vcomponent 'VCALENDAR)) - (set! (attr cal 'PRODID) (@ (global) *prodid*) - (attr cal 'VERSION) "2.0" - (attr cal 'CALSCALE) "GREGORIAN") + (set! (prop cal 'PRODID) (@ (global) *prodid*) + (prop cal 'VERSION) "2.0" + (prop cal 'CALSCALE) "GREGORIAN") (add-child! cal event) - (awhen (param (attr* event 'DTSTART) 'TZID) + (awhen (param (prop* event 'DTSTART) 'TZID) ;; TODO this is broken (add-child! cal (zoneinfo->vtimezone (getf 'zoneinfo) it))) - (unless (attr event 'UID) - (set! (attr event 'UID) + (unless (prop event 'UID) + (set! (prop event 'UID) (generate-uuid))) (with-output-to-file (glob (format #f "~a/~a.ics" calendar-path - (attr event 'UID))) + (prop event 'UID))) (lambda () (component->ical-string cal)))) -- cgit v1.2.3