github.com/lestrrat-go/ical
go get github.com/lestrrat-go/ical

github.com/lestrrat-go/ical

Work with ical formatted data

by lestrrat-go

v0.0.0-20201229070544-61f83f92eaf4 (see all)License:MIT
go get github.com/lestrrat-go/ical
Readme

ical

Work with ical formatted data in Go

Build Status GoDoc

DESCRIPTION

This is partially a port of Data::ICal (perl5 module) to Go.

Parse an ics file:

import "github.com/lestrrat-go/ical"

// snip...
p := ical.NewParser()
c, err := p.ParseFile(file)

// snip
for e := range c.Entries() {
  ev, ok := e.(*ical.Event)
  if !ok {
    continue
  }

  // work with event.
}

Programatically generate a Calendar

import "github.com/lestrrat-go/ical"

// snip...
c := ical.New()
c.AddProperty("X-Foo-Bar-Baz", "value")
tz := ical.NewTimezone()
tz.AddProperty("TZID", "Asia/Tokyo")
c.AddEntry(tz)

ical.NewEncoder(os.Stdout).Encode(c)

GitHub Stars

12

LAST COMMIT

1yr ago

MAINTAINERS

0

CONTRIBUTORS

5

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.0.0-20201229070544-61f83f92eaf4
1yr ago
v0.0.0-20190317233631-91af071bafbc
3yrs ago
v0.0.0-20180221004145-fbfb9a8b4a93
3yrs ago
No alternatives found
No tutorials found
Add a tutorial