ICal

A library for reading and writing iCalendar data.

Features

Future work

Components that will eventually be supported (in rough order):

Planned features:

Usage

Full documentation can be found on Hexdocs.

The primary entry points are ICal.from_ics/1 and ICal.from_file/1 for parsing iCalendar data, and ICal.to_ics/1 for serializing an %ICal{} to an iodata ready for writing to a file, sending over the network, etc.

Individual calendar entries (e.g. %ICal.Event{}) can also be de/serialized via their respective modules.

calendar = ICal.from_file(ical_path)
%ICal{events: events} = calendar
ics_iodata = ICal.to_ics(calendar)

Recurrences may be calculated from a calendar component up to a given future date:

  reccurences =
    event
    |> ICalendar.Recurrence.get_recurrences(~U[2027-01-01 00:00:00Z])
    |> Enum.take(4)

Inline attachments can be decoded via ICal.Attachment.decoded_data/1.

Goals

Installation

The package can be installed by adding :ical to your list of dependencies in mix.exs:

def deps do
  [
    {:ical, "~> 1.0"}
  ]
end

Participating in develpoment

Visit the issue tracker to see what tasks are outstanding. You are welcome to file new issues, as well!

PRs are welcome and responded to in a timely fashion.

Benchee is used for benchmarking, credo for linting, and the test suite must pass before PRs are merged. New functionality and bug fixes must have accompanying unit tests.