aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/parse
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--module/vcomponent/parse.scm28
-rw-r--r--module/vcomponent/parse/component.scm10
-rw-r--r--module/vcomponent/parse/xcal.scm4
3 files changed, 21 insertions, 21 deletions
diff --git a/module/vcomponent/parse.scm b/module/vcomponent/parse.scm
index b20fcfc8..7b2d7fc5 100644
--- a/module/vcomponent/parse.scm
+++ b/module/vcomponent/parse.scm
@@ -26,7 +26,7 @@
;; All VTIMEZONE's seem to be in "local" time in relation to
;; themselves. Therefore, a simple comparison should work,
-;; and then the TZOFFSETTO attribute can be subtd.
+;; and then the TZOFFSETTO properties can be subtd.
(define (parse-vdir path)
(let ((/ (lambda args (string-join args file-name-separator-string 'infix))))
(let ((color
@@ -48,8 +48,8 @@
(assert (eq? 'VCALENDAR (type item)))
(for child in (children item)
- (set! (attr child 'X-HNH-FILENAME)
- (attr (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
@@ -61,7 +61,7 @@
;; the standard. Section 3.8.4.4.
(case (length events)
[(0) (warning "No events in component~%~a"
- (attr item 'X-HNH-FILENAME))]
+ (prop item 'X-HNH-FILENAME))]
[(1)
(let ((child (car events)))
(assert (memv (type child) '(VTIMEZONE VEVENT)))
@@ -78,7 +78,7 @@
events))
(rest (delete head events eq?)))
- (set! (attr head 'X-HNH-ALTERNATIVES)
+ (set! (prop head 'X-HNH-ALTERNATIVES)
(alist->hash-table
(map cons
(map (extract 'RECURRENCE-ID) rest)
@@ -96,9 +96,9 @@
(let ((fullname (/ path fname)))
(let ((cal (call-with-input-file fullname
parse-calendar)))
- (set! (attr cal 'COLOR) color
- (attr cal 'NAME) name
- (attr cal 'X-HNH-FILENAME) fullname)
+ (set! (prop cal 'COLOR) color
+ (prop cal 'NAME) name
+ (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))))))))))
@@ -111,20 +111,20 @@
(case (stat:type st)
[(regular)
(let ((comp (call-with-input-file path parse-calendar)))
- (set! (attr 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! (attr comp 'X-HNH-SOURCETYPE) 'vdir
- (attr 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))]))
- (unless (attr cal "NAME")
- (set! (attr cal "NAME")
- (or (attr cal "X-WR-CALNAME")
+ (unless (prop cal "NAME")
+ (set! (prop cal "NAME")
+ (or (prop cal "X-WR-CALNAME")
(string-append "[" (basename path) "]"))))
cal)
diff --git a/module/vcomponent/parse/component.scm b/module/vcomponent/parse/component.scm
index 64942625..25d2642d 100644
--- a/module/vcomponent/parse/component.scm
+++ b/module/vcomponent/parse/component.scm
@@ -284,11 +284,11 @@
;; x-prop
;; iana-prop
))
- (aif (attr* (car stack) key)
- (set! (attr* (car stack) key) (cons vline it))
- (set! (attr* (car stack) key) (list vline)))
+ (aif (prop* (car stack) key)
+ (set! (prop* (car stack) key) (cons vline it))
+ (set! (prop* (car stack) key) (list vline)))
;; else
- (set! (attr* (car stack) key) vline))))))
+ (set! (prop* (car stack) key) vline))))))
(loop (cdr lst) stack)])))
(lambda (err fmt . args)
@@ -304,6 +304,6 @@
(get-file linedata))
(current-error-port))
(let* ((key value params (parse-itemline head)))
- (set! (attr* (car stack) key)
+ (set! (prop* (car stack) key)
(make-vline key value params))
(loop (cdr lst) stack)))))))))
diff --git a/module/vcomponent/parse/xcal.scm b/module/vcomponent/parse/xcal.scm
index e67a8239..19d7286a 100644
--- a/module/vcomponent/parse/xcal.scm
+++ b/module/vcomponent/parse/xcal.scm
@@ -125,7 +125,7 @@
(let ((params (handle-parameters parameters))
(tag* (symbol-upcase tag)))
(for (type value) in (zip type value)
- (set! (attr* component tag*)
+ (set! (prop* component tag*)
(make-vline tag*
(handle-tag
tag (handle-value type params value))
@@ -135,7 +135,7 @@
(for (type value) in (zip type value)
(let ((params (make-hash-table))
(tag* (symbol-upcase tag)))
- (set! (attr* component tag*)
+ (set! (prop* component tag*)
(make-vline tag*
(handle-tag
tag (handle-value type params value))