Skip to content

gidoichi/ical-converter

Repository files navigation

Publish container image Publish documents

ical-converter

ical-converter convertes iCalendar (RFC5545) components to event component. It is running as a server to get iCalendar from URL and convert to VEVENT contained iCalendar to register external calendar service.

Some component specified properties are also converted to corresponding properties.

For example, given iCalendar

BEGIN:VCALENDAR
PRODID:-//xyz Corp//NONSGML PDA Calendar Version 1.0//EN
VERSION:2.0
BEGIN:VTODO
DTSTAMP:19960704T120000Z
UID:[email protected]
DTSTART:19960918T143000Z
DUE:19960920T220000Z
SUMMARY:Networld+Interop Conference
END:VTODO
END:VCALENDAR

is converted to

BEGIN:VCALENDAR
PRODID:-//xyz Corp//NONSGML PDA Calendar Version 1.0//EN
VERSION:2.0
BEGIN:VEVENT
UID:[email protected]
DTSTAMP:19960704T120000Z
DTSTART:19960918T143000Z
DTEND:19960920T220000Z
SUMMARY:Networld+Interop Conference
END:VEVENT
END:VCALENDAR

In this case, todo component is converted to event conponent. And because of due property (DUE) does not exist at vevent property, it converted to date-time end property (DTEND).

Usage

$ export PORT='8080'
$ export ICAL_CONVERTER_ICS_URL='https://example.com/remote/ical.ics'
$ go run ./main.go &
$ curl localhost:8080
BEGIN:VCALENDAR
...
END:VCALENDAR

Configuration

Environment variables

NAME DEFAULT REQUIRED DESCRIPTION
PORT 80 Lisning requests on this port
ICAL_CONVERTER_ICS_URL required Remote ical file server. Supported schemes are http, https, file.

Detailed conversion rule

iCalendar is converted following three times.

Non-Standard Properties

SERVICE PARSER
2Do two_do

Scheduled components

converter

Filtering components

service

About

Convert iCalendar to register a calendar

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •