diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-11-05 23:45:48 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-11-05 23:45:48 +0100 |
commit | 0e429de91e57c2445df4fdf2227f65af3e396d9c (patch) | |
tree | 9151ec03d773a70944e363855c5b9c296e6fce17 /module/vcomponent/xcal | |
parent | Fix tidsrapport --output flag. (diff) | |
parent | Add comment about freeform fields. (diff) | |
download | calp-0e429de91e57c2445df4fdf2227f65af3e396d9c.tar.gz calp-0e429de91e57c2445df4fdf2227f65af3e396d9c.tar.xz |
Merge branch 'front'
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/xcal/parse.scm | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/module/vcomponent/xcal/parse.scm b/module/vcomponent/xcal/parse.scm index 17c684fc..6b877b9f 100644 --- a/module/vcomponent/xcal/parse.scm +++ b/module/vcomponent/xcal/parse.scm @@ -25,7 +25,10 @@ ;; TODO possibly trim whitespace on text fields [(cal-address uri text unknown) (car value)] - [(date) (parse-iso-date (car value))] + [(date) + ;; TODO this is correct, but ensure remaining types + (hashq-set! props 'VALUE "DATE") + (parse-iso-date (car value))] [(date-time) (parse-iso-datetime (car value))] @@ -108,6 +111,12 @@ data '(AUDIO DISPLAY EMAIL NONE))) [else data])) +;; Note +;; This doesn't verify the inter-field validity of the object, +;; meaning that value(DTSTART) == DATE and value(DTEND) == DATE-TIME +;; are possibilities, which other parts of the code will crash on. +;; TODO +;; since we are feeding user input into this it really should be fixed. (define-public (sxcal->vcomponent sxcal) (define type (symbol-upcase (car sxcal))) (define component (make-vcomponent type)) @@ -147,7 +156,11 @@ (set! (prop* component tag*) (make-vline tag* (handle-tag - tag (handle-value type params value)) + tag (let ((v (handle-value type params value))) + ;; TODO possibly more list fields + (if (eq? tag 'categories) + (string-split v #\,) + v))) params)))))]))) ;; children |