A calendar management project, for events and activities related to communities fighting for freedoms.
This can be related to software, art, data, hardware, content, commons, internet.
https://www.agendadulibre.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
749 B

:ruby
# Create a calendar with an event (standard method)
cal = Icalendar::Calendar.new
tzid = @event.region.tzid
cal.event do |e|
e.dtstamp = Icalendar::Values::DateTime.new @event.decision_time, tzid: tzid
e.uid = "#{event.id}@#{request.domain}"
e.dtstart = Icalendar::Values::DateTime.new @event.start_time, tzid: tzid
e.dtend = Icalendar::Values::DateTime.new @event.end_time, tzid: tzid
e.summary = @event.title
e.description = to_markdown @event.description.tr '\'', '’'
e.location = @event.full_address
e.organizer = "mailto:#{@event.contact}"
e.x_alt_desc = Icalendar::Values::Text.new @event.description, FMTTYPE: 'text/html'
end
cal.publish
= cal.to_ical