diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-06-30 01:45:33 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-07 13:10:38 +0200 |
commit | d6304f9b0acd3894fd08fccee75ab47d10f9a64a (patch) | |
tree | 51c08b7e65d7ce41d97f51dcbe2557c1b851fd3b /module/output/ical.scm | |
parent | Add basic event creation from HTML. (diff) | |
download | calp-d6304f9b0acd3894fd08fccee75ab47d10f9a64a.tar.gz calp-d6304f9b0acd3894fd08fccee75ab47d10f9a64a.tar.xz |
Rename attributes => properties, properties => parameters.
Diffstat (limited to '')
-rw-r--r-- | module/output/ical.scm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/output/ical.scm b/module/output/ical.scm index 114178c6..de6a351d 100644 --- a/module/output/ical.scm +++ b/module/output/ical.scm @@ -28,7 +28,7 @@ ;; fields which can hold lists need not be considered here, ;; since they are split into multiple vlines when we parse them. (cond - [(and=> (prop vline 'VALUE) string->symbol) => get-writer] + [(and=> (param vline 'VALUE) string->symbol) => get-writer] [(memv key '(COMPLETED DTEND DUE DTSTART RECURRENCE-ID CREATED DTSTAMP LAST-MODIFIED ACKNOWLEDGED EXDATE)) @@ -128,7 +128,7 @@ ";" (symbol->string key) (string-join (map (compose (get-writer 'TEXT) ->string) values) "," 'infix))]) - (properties vline))) + (parameters vline))) ":" (value-format key vline)))) (define-public (component->ical-string component) @@ -150,7 +150,7 @@ [(key vline) (display (vline->string vline)) (display "\r\n")]) - (attributes component)) + (properties component)) (for-each component->ical-string (children component)) (format #t "END:~a\r\n" (type component)) @@ -159,7 +159,7 @@ => (lambda (alts) (hash-map->list (lambda (_ comp) (component->ical-string comp)) alts))])) -;; TODO tzid prop on dtstart vs tz field in datetime object +;; TODO tzid param on dtstart vs tz field in datetime object ;; how do we keep these two in sync? (define (write-event-to-file event calendar-path) (define cal (make-vcomponent 'VCALENDAR)) @@ -170,7 +170,7 @@ (add-child! cal event) - (awhen (prop (attr* event 'DTSTART) 'TZID) + (awhen (param (attr* event 'DTSTART) 'TZID) ;; TODO this is broken (add-child! cal (zoneinfo->vtimezone (getf 'zoneinfo) it))) |