https://github.com/foca/kali
Kali is a ruby implementation of the iCalendar standard, taken from RFC 5545.
https://github.com/foca/kali
Last synced: 9 months ago
JSON representation
Kali is a ruby implementation of the iCalendar standard, taken from RFC 5545.
- Host: GitHub
- URL: https://github.com/foca/kali
- Owner: foca
- Created: 2013-07-16T08:03:52.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2020-06-22T12:22:27.000Z (about 6 years ago)
- Last Synced: 2025-09-09T01:41:37.714Z (10 months ago)
- Language: Ruby
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kali: iCalendar for the rest of us
**NOTE**: This is public but in no way finished. Probably safer to not use it in production.
Kali attempts to provide a simple and extensible implementation of [RFC
5545][rfc5545] and friends, which describe the iCalendar format, used for
representing and exchanging calendaring and scheduling information.
[Kālī][wikipedia] is also the Hindu Goddess of Time.
## Generating Calendars
The simplest example possible:
``` ruby
require "uri"
require "kali"
calendar = Kali::Calendar.new do |cal|
cal.event do |event|
event.summary = "Lunch" # Or: event.summary = Kali::Property::Summary.new("Lunch")
event.description = "Let's get some food"
event.dtstart = DateTime.civil(2013, 7, 31, 12, 30)
event.dtend = DateTime.civil(2013, 7, 31, 14, 30)
event.attendees.add URI("mailto:hi@nicolassanguinetti.info") do |attendee|
attendee.partstat = "ACCEPTED"
attendee.cn = "Nicolás Sanguinetti"
attendee["X-GUEST-COUNT"] = 2
end
event.attendees.add URI("mailto:someone@example.com") # Simplified attendee
end
end
File.open("cal.ics", "w") { |f| f.puts(calendar.to_ics) }
```
[rfc5545]: http://tools.ietf.org/html/rfc5545
[wikipedia]: http://en.wikipedia.org/wiki/Kali