agenda-libre-ruby/app/views/events/show.ics.erb

19 lines
612 B
Plaintext
Raw Normal View History

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//AgendaDuLibre.org
X-WR-CALNAME:Agenda du Libre
X-WR-TIMEZONE:Europe/Paris
CALSCALE:GREGORIAN
X-WR-CALDESC:<%= t 'title', scope: [:layouts, :application] %>
<% event = @event %>
BEGIN:VEVENT
DTSTART;TZID=Europe/Paris:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
DTEND;TZID=Europe/Paris:<%= event.end_time.strftime '%Y%m%dT%H%M%S' %>
UID:<%= event.id %>@agendadulibre.org
SUMMARY:<%= event.title %>
URL:<%= event_url event %>
2014-08-25 23:37:47 +02:00
DESCRIPTION:<%= strip_tags(event.description).to_crlf.gsub(/\r/, '').gsub /^/, ' ' %>
LOCATION:<%= event.full_address %>
END:VEVENT
END:VCALENDAR