Skip to content

A ICS / ICal parser and serialiser for Golang.

License

Notifications You must be signed in to change notification settings

alfatraining/golang-ical

This branch is 125 commits behind arran4/golang-ical:master.

Folders and files

NameName
Last commit message
Last commit date
Apr 24, 2022
Mar 10, 2022
Aug 25, 2021
Feb 9, 2022
Dec 9, 2019
Aug 25, 2021
Jan 25, 2020
Jun 1, 2021
Mar 10, 2022
Mar 10, 2022
May 17, 2022
Dec 13, 2021
Aug 25, 2021
Aug 25, 2021
Feb 9, 2022
Feb 9, 2022

Repository files navigation

golang-ical

A ICS / ICal parser and serialiser for Golang.

Because the other libraries didn't quite do what I needed.

Usage, parsing:

    cal, err := ParseCalendar(strings.NewReader(input))

Creating:

  cal := ics.NewCalendar()
  cal.SetMethod(ics.MethodRequest)
  event := cal.AddEvent(fmt.Sprintf("id@domain", p.SessionKey.IntID()))
  event.SetCreatedTime(time.Now())
  event.SetDtStampTime(time.Now())
  event.SetModifiedAt(time.Now())
  event.SetStartAt(time.Now())
  event.SetEndAt(time.Now())
  event.SetSummary("Summary")
  event.SetLocation("Address")
  event.SetDescription("Description")
  event.SetURL("https://URL/")
  event.AddRrule(fmt.Sprintf("FREQ=YEARLY;BYMONTH=%d;BYMONTHDAY=%d", time.Now().Month(), time.Now().Day()))
  event.SetOrganizer("sender@domain", ics.WithCN("This Machine"))
  event.AddAttendee("reciever or participant", ics.CalendarUserTypeIndividual, ics.ParticipationStatusNeedsAction, ics.ParticipationRoleReqParticipant, ics.WithRSVP(true))
  return cal.Serialize()

Helper methods created as needed feel free to send a P.R. with more.

About

A ICS / ICal parser and serialiser for Golang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%