diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-06-30 01:58:19 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-07 13:10:38 +0200 |
commit | 715e36ab81389ebf53ea158027d0a83f144eee0e (patch) | |
tree | 1e9522ba3bf4aef212d0b1d179e9bf1db2e6f60b /module/output/ical.scm | |
parent | Rename attributes => properties, properties => parameters. (diff) | |
download | calp-715e36ab81389ebf53ea158027d0a83f144eee0e.tar.gz calp-715e36ab81389ebf53ea158027d0a83f144eee0e.tar.xz |
Finished renamining attribute to property.
Diffstat (limited to 'module/output/ical.scm')
-rw-r--r-- | module/output/ical.scm | 16 |
1 files changed, 8 insertions, 8 deletions
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)))) |