aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/formats/ical
diff options
context:
space:
mode:
Diffstat (limited to 'module/vcomponent/formats/ical')
-rw-r--r--module/vcomponent/formats/ical/output.scm14
-rw-r--r--module/vcomponent/formats/ical/parse.scm4
-rw-r--r--module/vcomponent/formats/ical/types.scm6
3 files changed, 14 insertions, 10 deletions
diff --git a/module/vcomponent/formats/ical/output.scm b/module/vcomponent/formats/ical/output.scm
index 489cdc00..fbb9c862 100644
--- a/module/vcomponent/formats/ical/output.scm
+++ b/module/vcomponent/formats/ical/output.scm
@@ -17,7 +17,11 @@
:use-module (vcomponent recurrence)
:use-module (calp translation)
:autoload (vcomponent util instance) (global-event-object)
- )
+ :export (component->ical-string
+ print-components-with-fake-parent
+ print-all-events
+ print-events-in-interval
+ ))
(define (prodid)
(format #f "-//hugo//calp ~a//EN"
@@ -140,7 +144,7 @@
(parameters vline)))
":" (value-format key vline))))
-(define-public (component->ical-string component)
+(define (component->ical-string component)
(format #t "BEGIN:~a\r\n" (type component))
(for-each
;; Special cases depending on key.
@@ -192,7 +196,7 @@ CALSCALE:GREGORIAN\r
'("dummy" "local")))
-(define-public (print-components-with-fake-parent events)
+(define (print-components-with-fake-parent events)
;; The events are probably sorted before, but until I can guarantee
;; that we sort them again here. We need them sorted from earliest
@@ -216,7 +220,7 @@ CALSCALE:GREGORIAN\r
(print-footer))
-(define-public (print-all-events)
+(define (print-all-events)
(print-components-with-fake-parent
(append (get-fixed-events global-event-object)
;; TODO RECCURENCE-ID exceptions
@@ -225,7 +229,7 @@ CALSCALE:GREGORIAN\r
;; the given date range.
(get-repeating-events global-event-object))))
-(define-public (print-events-in-interval start end)
+(define (print-events-in-interval start end)
(print-components-with-fake-parent
(append (fixed-events-in-range start end)
;; TODO RECCURENCE-ID exceptions
diff --git a/module/vcomponent/formats/ical/parse.scm b/module/vcomponent/formats/ical/parse.scm
index cca306c5..49f8f101 100644
--- a/module/vcomponent/formats/ical/parse.scm
+++ b/module/vcomponent/formats/ical/parse.scm
@@ -12,7 +12,7 @@
:use-module (vcomponent geo)
:use-module (vcomponent formats common types)
:use-module (calp translation)
- )
+ :export (parse-calendar))
(define string->symbol
(let ((ht (make-hash-table 1000)))
@@ -23,7 +23,7 @@
symb)))))
;; TODO rename to parse-vcomponent, or parse-ical (?).
-(define-public (parse-calendar port)
+(define (parse-calendar port)
(parse (map tokenize (read-file port))))
(define-immutable-record-type <line>
diff --git a/module/vcomponent/formats/ical/types.scm b/module/vcomponent/formats/ical/types.scm
index 67f9f633..7b6aad2e 100644
--- a/module/vcomponent/formats/ical/types.scm
+++ b/module/vcomponent/formats/ical/types.scm
@@ -6,7 +6,7 @@
:use-module (datetime)
:use-module (datetime timespec)
:use-module (calp translation)
- )
+ :export (escape-chars get-writer))
;; TODO shouldn't these really take vline:s?
@@ -45,7 +45,7 @@
((@ (vcomponent recurrence internal)
recur-rule->rrule-string) value))
-(define-public (escape-chars str)
+(define (escape-chars str)
(define (escape char)
(string #\\ char))
(string-concatenate
@@ -92,6 +92,6 @@
(hashq-set! type-writers 'URI write-uri)
(hashq-set! type-writers 'UTC-OFFSET write-utc-offset)
-(define-public (get-writer type)
+(define (get-writer type)
(or (hashq-ref type-writers type #f)
(error (_ "No writer for type") type)))