From 5986d8022fe2a58df6bc7054ef9499961fb776b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 16 Oct 2020 21:42:41 +0200 Subject: HTML add toggle for whole-day. --- module/vcomponent/xcal/parse.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'module/vcomponent/xcal/parse.scm') diff --git a/module/vcomponent/xcal/parse.scm b/module/vcomponent/xcal/parse.scm index 17c684fc..c97bc492 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)) -- cgit v1.2.3 From e469bf6c2b219f7acd08e93adf7e0244b6b3c2c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 5 Nov 2020 23:43:35 +0100 Subject: Xcal input split CATEGORIES. --- module/vcomponent/xcal/parse.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'module/vcomponent/xcal/parse.scm') diff --git a/module/vcomponent/xcal/parse.scm b/module/vcomponent/xcal/parse.scm index c97bc492..6b877b9f 100644 --- a/module/vcomponent/xcal/parse.scm +++ b/module/vcomponent/xcal/parse.scm @@ -156,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 -- cgit v1.2.3