AddToCalendar.ICS (add_to_calendar v0.1.0)

Copy Markdown View Source

Generates iCalendar (RFC 5545) content for calendar events.

Summary

Functions

Encodes the event's iCalendar content as a data: URI suitable for a download link.

Derives a filesystem-safe .ics filename from the event's name.

Generates the full iCalendar (.ics) content for an event, as a CRLF-terminated string.

Functions

data_uri(event)

@spec data_uri(AddToCalendar.Event.t()) :: String.t()

Encodes the event's iCalendar content as a data: URI suitable for a download link.

filename(event)

@spec filename(AddToCalendar.Event.t()) :: String.t()

Derives a filesystem-safe .ics filename from the event's name.

generate(event)

@spec generate(AddToCalendar.Event.t()) :: String.t()

Generates the full iCalendar (.ics) content for an event, as a CRLF-terminated string.