From: Paul Hänsch Date: Fri, 5 Feb 2021 01:42:45 +0000 (+0100) Subject: ical export using cgilite X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=b470561d3d40f4989eb8ed17eca5912f63c247e2;p=lobster ical export using cgilite --- diff --git a/courses/export_ical.sh b/courses/export_ical.sh index e595cb6..3649ed5 100755 --- a/courses/export_ical.sh +++ b/courses/export_ical.sh @@ -1,6 +1,6 @@ #!/bin/zsh -# Copyright 2014,2015 Paul Hänsch +# Copyright 2014,2015,2021 Paul Hänsch # # This file is part of Confetti. # @@ -17,6 +17,12 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . -echo -n "Content-Type: text/calendar;charset=utf-8\n\n" -course="${_GET[course]}" -cat "$_DATA/ical/$course" +course="$(GET course |PATH)" +coursefile="$_DATA/ical/${course##*/}" + +. $_EXEC/pdiread.sh +. $_EXEC/cgilite/file.sh + +printf 'Content-Disposition: inline; filename="%s.ics"\r\n' "$(pdi_value "$(pdi_load "$coursefile")" SUMMARY)" + +FILE "$coursefile" "text/calendar; charset=utf-8"