From 5144c004b9f7d8761ab065d69f83f3c2e72123b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 21 Feb 2023 19:52:23 +0100 Subject: UNFINISHED work on formats. --- module/vcomponent/formats/sxcal.scm | 11 ++++++++++ tests/test/data-formats/ical.scm | 40 +++++++++++++++++++++++++++++++++++++ tests/test/data-formats/xcal.scm | 0 tests/test/data-stores/file.scm | 0 tests/test/data-stores/sqlite.scm | 0 tests/test/data-stores/vdir.scm | 0 6 files changed, 51 insertions(+) create mode 100644 module/vcomponent/formats/sxcal.scm create mode 100644 tests/test/data-formats/ical.scm create mode 100644 tests/test/data-formats/xcal.scm create mode 100644 tests/test/data-stores/file.scm create mode 100644 tests/test/data-stores/sqlite.scm create mode 100644 tests/test/data-stores/vdir.scm 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 diff --git a/tests/test/data-stores/file.scm b/tests/test/data-stores/file.scm new file mode 100644 index 00000000..e69de29b diff --git a/tests/test/data-stores/sqlite.scm b/tests/test/data-stores/sqlite.scm new file mode 100644 index 00000000..e69de29b diff --git a/tests/test/data-stores/vdir.scm b/tests/test/data-stores/vdir.scm new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3