aboutsummaryrefslogtreecommitdiffstats
path: root/program.ics.erb
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-10-10 21:10:19 +0200
committerHarald Eilertsen <haraldei@anduin.net>2023-10-10 21:10:19 +0200
commit51ef51bbe3b741a76d1d44b8ce8c1d8a07427e1f (patch)
tree4f2b4b8a0df7669f6de73496be578f6340ade3c3 /program.ics.erb
parent68e89035e51a3fa6d0a54ee7d5f27259090b101e (diff)
downloadramaskrik-program-51ef51bbe3b741a76d1d44b8ce8c1d8a07427e1f.tar.gz
ramaskrik-program-51ef51bbe3b741a76d1d44b8ce8c1d8a07427e1f.tar.bz2
ramaskrik-program-51ef51bbe3b741a76d1d44b8ce8c1d8a07427e1f.zip
Updates for Ramaskrik 2023HEADmaster
- Reorg, create lib dir and move room-schedule and events there - Add .ics template to generate program as an iCalendar stream. - Add some info to html template, and instructions to html template. - Add footer to html template, with timestamp for when the view was generated. - Fix bug that messed up the layout if the input data was not already sorted. - Update readme with usage instructions.
Diffstat (limited to 'program.ics.erb')
-rw-r--r--program.ics.erb17
1 files changed, 17 insertions, 0 deletions
diff --git a/program.ics.erb b/program.ics.erb
new file mode 100644
index 0000000..60c55bd
--- /dev/null
+++ b/program.ics.erb
@@ -0,0 +1,17 @@
+BEGIN:VCALENDAR
+PRODID:-//volse.net//NONSGML ramaskrik-program-generator//NB
+VERSION:2.0
+DTSTAMP;TZID=Europe/Oslo:<%= DateTime.now.strftime('%Y%m%dT%H%M%S') %>
+<% eventlist.each do |date, events| %>
+<% events.events.each do |e| %>
+BEGIN:VEVENT
+UUID:<%= e.slug %>
+DTSTAMP;TZID=Europe/Oslo:<%= DateTime.now.strftime('%Y%m%dT%H%M%S') %>
+DTSTART;TZID=Europe/Oslo:<%= e.start_time.strftime('%Y%m%dT%H%M%S') %>
+DURATION:PT<%= e.duration %>S
+SUMMARY:<%= e.title %>
+LOCATION:<%= e.venue %>
+END:VEVENT
+<% end %>
+<% end %>
+END:VCALENDAR