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

17 lines
611 B
Plaintext
Raw Normal View History

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//AgendaDuLibre.org
X-WR-CALNAME:<%= t('title', scope: [:layouts, :application]).gsub(/'/, '') %>
X-WR-CALDESC:<%= t 'subtitle', scope: [:layouts, :application] %>
<% event = @event %>
BEGIN:VEVENT
DTSTART:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
DTEND:<%= event.end_time.strftime '%Y%m%dT%H%M%S' %>
UID:<%= event.id %>@agendadulibre.org
SUMMARY:<%= event.title %>
URL:<%= event_url event %>
2014-08-26 00:26:15 +02:00
DESCRIPTION:<%= strip_tags(event.description).gsub(/'/, '').gsub(/,/, '\,').gsub(/;/, '\;').gsub /^/, ' ' %>
LOCATION:<%= event.full_address %>
END:VEVENT
END:VCALENDAR