diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-12-02 03:25:34 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-12-02 03:25:34 +0100 |
commit | 977e04a898e1cff122de934e6b05e32ead186e9b (patch) | |
tree | 867ee8228d037a0a3a81673c85b421b3726fec83 /module/vcomponent/formats | |
parent | Repair format tests. (diff) | |
download | calp-977e04a898e1cff122de934e6b05e32ead186e9b.tar.gz calp-977e04a898e1cff122de934e6b05e32ead186e9b.tar.xz |
STASH: work on formats.formats-stash
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/formats/xcal.scm | 3 | ||||
-rw-r--r-- | module/vcomponent/formats/xcal/parse.scm | 27 |
2 files changed, 15 insertions, 15 deletions
diff --git a/module/vcomponent/formats/xcal.scm b/module/vcomponent/formats/xcal.scm index 8fadde75..b70a8f65 100644 --- a/module/vcomponent/formats/xcal.scm +++ b/module/vcomponent/formats/xcal.scm @@ -16,9 +16,6 @@ (namespaced-sxml->xml port: port namespaces: namespaces))) -(define (serialize/object component) - (call-with-output-string (lambda (p) (serialize component p)))) - (define* (deserialize port) (-> port diff --git a/module/vcomponent/formats/xcal/parse.scm b/module/vcomponent/formats/xcal/parse.scm index d0bc7bf2..c696edc1 100644 --- a/module/vcomponent/formats/xcal/parse.scm +++ b/module/vcomponent/formats/xcal/parse.scm @@ -16,6 +16,7 @@ :use-module (srfi srfi-88) :use-module (calp translation) :use-module (hnh util table) + :use-module (hnh util type) :export (sxcal->vcomponent) ) @@ -210,17 +211,17 @@ ;; TODO multi valued data (define raw-value (cdr typetag)) (define vline* - (vline type: tag* - value: (handle-tag - xml-tag - (let ((v (handle-value type parameters raw-value))) - ;; TODO possibly more list fields - ;; (if (eq? tag 'categories) - ;; (string-split v #\,) - ;; v) - - v)) - parameters: parameters)) + (vline key: tag* + vline-value: (handle-tag + xml-tag + (let ((v (handle-value type parameters raw-value))) + ;; TODO possibly more list fields + ;; (if (eq? tag 'categories) + ;; (string-split v #\,) + ;; v) + + v)) + vline-parameters: parameters)) (if (memv tag* '(ATTACH ATTENDEE CATEGORIES COMMENT CONTACT EXDATE REQUEST-STATUS RELATED-TO @@ -255,8 +256,10 @@ ;; would be expanded into ;; KEY;p=1:a ;; KEY;p=1:b + ;; TODO this crashes (fold swap handle-single-property - (vcomponent type: type) (cdr it)) + (vcomponent type: type) + (cdr it)) (vcomponent type: type)))) ;; children |