aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-02-21 19:52:23 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-04-10 23:45:29 +0200
commit5144c004b9f7d8761ab065d69f83f3c2e72123b2 (patch)
tree3868e537b5b2d21a4e5f4bdb8510294171e00fcb
parentStart writing data-store: meta (diff)
downloadcalp-5144c004b9f7d8761ab065d69f83f3c2e72123b2.tar.gz
calp-5144c004b9f7d8761ab065d69f83f3c2e72123b2.tar.xz
UNFINISHED work on formats.
-rw-r--r--module/vcomponent/formats/sxcal.scm11
-rw-r--r--tests/test/data-formats/ical.scm40
-rw-r--r--tests/test/data-formats/xcal.scm0
-rw-r--r--tests/test/data-stores/file.scm0
-rw-r--r--tests/test/data-stores/sqlite.scm0
-rw-r--r--tests/test/data-stores/vdir.scm0
6 files changed, 51 insertions, 0 deletions
diff --git a/module/vcomponent/formats/sxcal.scm b/module/vcomponent/formats/sxcal.scm
new file mode 100644
index 00000000..caf453ec
--- /dev/null
+++ b/module/vcomponent/formats/sxcal.scm
@@ -0,0 +1,11 @@
+(define-module (vcomponent formats sxcal)
+ :export (serialize deserialize)
+ )
+
+
+(define (serialize component port)
+ 'TODO
+ )
+
+(define (deserialize port)
+ (sxcal->vcomponent port))
diff --git a/tests/test/data-formats/ical.scm b/tests/test/data-formats/ical.scm
new file mode 100644
index 00000000..b529cf16
--- /dev/null
+++ b/tests/test/data-formats/ical.scm
@@ -0,0 +1,40 @@
+(define-module (test data-formats ical)
+ :use-module (srfi srfi-64)
+ :use-module (srfi srfi-88)
+ :use-module (vcomponent formats ical)
+ )
+
+;; (serialize)
+
+;; (deserialize)
+
+(call-with-input-string "BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
+BEGIN:VTIMEZONE
+TZID:Europe/Stockholm
+BEGIN:DAYLIGHT
+DTSTART;VALUE=DATE-TIME:20180325T030000
+TZNAME:CEST
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART;VALUE=DATE-TIME:20181028T020000
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+SUMMARY:Backhäfv
+DTSTART;TZID=Europe/Stockholm;VALUE=DATE-TIME:20180907T170000
+DTEND;TZID=Europe/Stockholm;VALUE=DATE-TIME:20180907T180000
+DTSTAMP;VALUE=DATE-TIME:20180907T154223Z
+UID:ZSGUP6BTM52UV42SEWBICHSS63V8DYQX5TSZ
+SEQUENCE:0
+END:VEVENT
+END:VCALENDAR" deserialize)
+
+
+
diff --git a/tests/test/data-formats/xcal.scm b/tests/test/data-formats/xcal.scm
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/test/data-formats/xcal.scm
diff --git a/tests/test/data-stores/file.scm b/tests/test/data-stores/file.scm
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/test/data-stores/file.scm
diff --git a/tests/test/data-stores/sqlite.scm b/tests/test/data-stores/sqlite.scm
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/test/data-stores/sqlite.scm
diff --git a/tests/test/data-stores/vdir.scm b/tests/test/data-stores/vdir.scm
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/test/data-stores/vdir.scm