diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-24 17:24:01 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-24 17:24:01 +0200 |
commit | 0d249a996d2c969feef525933de925af88e6c249 (patch) | |
tree | 639ccc2f65d33e9f1cf06cb0b619bce403cb054d /module/vcomponent/parse.scm | |
parent | Frontend feedback on event creation. (diff) | |
download | calp-0d249a996d2c969feef525933de925af88e6c249.tar.gz calp-0d249a996d2c969feef525933de925af88e6c249.tar.xz |
Change internal fields to stat with a dash.
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/parse.scm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/module/vcomponent/parse.scm b/module/vcomponent/parse.scm index 0caa65e7..56e62dad 100644 --- a/module/vcomponent/parse.scm +++ b/module/vcomponent/parse.scm @@ -47,8 +47,8 @@ (assert (eq? 'VCALENDAR (type item))) (for child in (children item) - (set! (prop child 'X-HNH-FILENAME) - (prop (parent child) 'X-HNH-FILENAME))) + (set! (prop child '-X-HNH-FILENAME) + (prop (parent child) '-X-HNH-FILENAME))) ;; NOTE The vdir standard says that each file should contain ;; EXACTLY one event. It can however contain multiple VEVENT @@ -60,7 +60,7 @@ ;; the standard. Section 3.8.4.4. (case (length events) [(0) (warning "No events in component~%~a" - (prop item 'X-HNH-FILENAME))] + (prop item '-X-HNH-FILENAME))] [(1) (let ((child (car events))) (assert (memv (type child) '(VTIMEZONE VEVENT))) @@ -77,7 +77,7 @@ events)) (rest (delete head events eq?))) - (set! (prop head 'X-HNH-ALTERNATIVES) + (set! (prop head '-X-HNH-ALTERNATIVES) (alist->hash-table (map cons (map (extract 'RECURRENCE-ID) rest) @@ -97,7 +97,7 @@ parse-calendar))) (set! (prop cal 'COLOR) color (prop cal 'NAME) name - (prop cal 'X-HNH-FILENAME) fullname) + (prop cal '-X-HNH-FILENAME) fullname) cal))) (scandir path (lambda (s) (and (not (string= "." (string-take s 1))) (string= "ics" (string-take-right s 3)))))))))) @@ -110,13 +110,13 @@ (case (stat:type st) [(regular) (let ((comp (call-with-input-file path parse-calendar))) - (set! (prop comp 'X-HNH-SOURCETYPE) 'file) + (set! (prop comp '-X-HNH-SOURCETYPE) 'file) comp) ] [(directory) (report-time! "Parsing ~a" path) (let ((comp (parse-vdir path))) - (set! (prop comp 'X-HNH-SOURCETYPE) 'vdir - (prop comp 'X-HNH-DIRECTORY) path) + (set! (prop comp '-X-HNH-SOURCETYPE) 'vdir + (prop comp '-X-HNH-DIRECTORY) path) comp)] [(block-special char-special fifo socket unknown symlink) => (lambda (t) (error "Can't parse file of type " t))])) |