aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-07-05 22:20:24 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-07-07 13:10:38 +0200
commit1baf017aaaf38fb6a13bedc2c97f6450748ae738 (patch)
treec8f59c0aad0d6d28f01a6eebca052833a7c1a542
parentMajor reordering in datetime. (diff)
downloadcalp-1baf017aaaf38fb6a13bedc2c97f6450748ae738.tar.gz
calp-1baf017aaaf38fb6a13bedc2c97f6450748ae738.tar.xz
Remove some TODO:s.
-rw-r--r--module/datetime.scm2
-rw-r--r--module/output/common.scm9
-rw-r--r--module/output/ical.scm2
-rw-r--r--module/util.scm5
-rw-r--r--module/vcomponent.scm13
-rw-r--r--module/vcomponent/base.scm3
-rw-r--r--module/vcomponent/parse/component.scm2
7 files changed, 12 insertions, 24 deletions
diff --git a/module/datetime.scm b/module/datetime.scm
index a95eac47..f20a6b8f 100644
--- a/module/datetime.scm
+++ b/module/datetime.scm
@@ -864,7 +864,7 @@
;;; OPERATIONS
-;; TODO +1 month is weird for late days in a month.
+;; NOTE +1 month is weird for late days in a month.
;; is the last of january +1 month the last of february,
;; or a few days into march? It's at least not the 31 of
;; February, as the code is currently written.
diff --git a/module/output/common.scm b/module/output/common.scm
index 0d266d01..f572a282 100644
--- a/module/output/common.scm
+++ b/module/output/common.scm
@@ -9,15 +9,6 @@
:use-module (vcomponent)
)
-;; TODO this is also defined @ (vcomponent parse component)
-(define-public (x-property? symb)
- (string=? "X-" (string-take (symbol->string symb) 2)))
-
-;; TODO this is also defined twice
-(define-public (generate-uuid)
- ((@ (rnrs io ports) call-with-port)
- ((@ (ice-9 popen) open-input-pipe) "uuidgen")
- (@ (ice-9 rdelim) read-line)))
(define*-public (internal-field? symbol optional: (prefix "X-HNH-"))
(string=? prefix
diff --git a/module/output/ical.scm b/module/output/ical.scm
index 4822bf4a..dd7653cb 100644
--- a/module/output/ical.scm
+++ b/module/output/ical.scm
@@ -175,7 +175,7 @@
(unless (prop event 'UID)
(set! (prop event 'UID)
- (generate-uuid)))
+ (uuidgen)))
(with-output-to-file (glob (format #f "~a/~a.ics"
calendar-path
diff --git a/module/util.scm b/module/util.scm
index abb12f8b..8a3e38d4 100644
--- a/module/util.scm
+++ b/module/util.scm
@@ -543,3 +543,8 @@
(for-each (lambda (pair) (setenv (car pair) (caddr pair)))
env-pairs)
return))]))
+
+(define-public (uuidgen)
+ ((@ (rnrs io ports) call-with-port)
+ ((@ (ice-9 popen) open-input-pipe) "uuidgen")
+ (@ (ice-9 rdelim) read-line)))
diff --git a/module/vcomponent.scm b/module/vcomponent.scm
index f9d04d35..2eb4ef2c 100644
--- a/module/vcomponent.scm
+++ b/module/vcomponent.scm
@@ -63,17 +63,8 @@
-(use-modules (output ical)
- (ice-9 popen)
- ((ice-9 rdelim) :select (read-line))
- ((rnrs io ports) :select (call-with-port))
- )
-
-
-(define (uuidgen)
- (call-with-port (open-input-pipe "uuidgen")
- read-line))
-
+;;; TODO vcomponent should NOT depend on output
+(use-modules (output ical))
(define-public (add-event calendar event)
diff --git a/module/vcomponent/base.scm b/module/vcomponent/base.scm
index 6b9363b6..413e7c0c 100644
--- a/module/vcomponent/base.scm
+++ b/module/vcomponent/base.scm
@@ -188,3 +188,6 @@
(define-public (key=? k1 k2)
(eq? (as-symb k1)
(as-symb k2)))
+
+(define-public (x-property? symb)
+ (string=? "X-" (string-take (symbol->string symb) 2)))
diff --git a/module/vcomponent/parse/component.scm b/module/vcomponent/parse/component.scm
index 25d2642d..41ef30f5 100644
--- a/module/vcomponent/parse/component.scm
+++ b/module/vcomponent/parse/component.scm
@@ -72,8 +72,6 @@
(cons -1 semi-idxs)
semi-idxs)))
-(define (x-property? symb)
- (string=? "X-" (string-take (symbol->string symb) 2)))
#;
'(ATTACH ATTENDEE CATEGORIES