Warning
There is still plenty work to do on this project and it certenaly cannot be used in a production environment
This project is intended to implement the RFC5545 - Internet Calendaring and Scheduling Core Object Specification (you can find the Request Of Comments here)
I decided to create this go module because existing options didn't meet my needs or were no longer maintained.
Here the main features this module offers (some are already available β and some are still in WIP state π§)
- β
Create an iCalendar object
- β With VEVENT components
- β With VALARM components
- β With VJOURNAL components
- β With VFREEBUSY components
- β With VTIMEZONE components
- β With VTODO components
- π§ Make use of all properties available
- π§ Make use of all types available
- π§ Parse an iCalendar file
- β Write in an iCalendar file
To install gics, use the go get
command:
go get github.com/vareversat/gics
- Create and display an iCalendar
package main
import (
"github.com/vareversat/gics/pkg"
"github.com/vareversat/gics/pkg/components"
"github.com/vareversat/gics/pkg/properties"
"github.com/vareversat/gics/pkg/types"
"os"
"time"
)
func main() {
// Create an array of VEVENT component
v := components.NewEventCalendarComponent(
properties.NewUidProperty("My_EVENT"),
properties.NewDateTimeStampProperty(time.Now(), types.WithUtcTime),
properties.NewDescriptionProperty("This is an event of my calendar !"))
c := make(components.CalendarComponents, 0)
c = append(c, v)
// Create an iCalendar with the previously created VEVENT
calendar, err := pkg.NewCalendar(c, "My_CALENDAR", "PUBLISH", "2.0")
if err != nil {
panic(err)
} else {
// Print the iCalendar in the stdout
calendar.SerializeToICSFormat(os.Stdout)
}
}