]> git.plutz.net Git - confetti/commitdiff
update naming convention for exported files
authorPaul Hänsch <paul@plutz.net>
Sat, 23 Jan 2021 13:31:50 +0000 (14:31 +0100)
committerPaul Hänsch <paul@plutz.net>
Sat, 23 Jan 2021 13:31:50 +0000 (14:31 +0100)
courses/export_pdf.sh

index 3e5593d2b8a439a4b13d1dd622ea064a11e765be..62bb69e50f6c00e3c36bcdacc2c84f9f86a0e5ed 100755 (executable)
@@ -16,7 +16,7 @@ elif ! mkdir -p "$_DATA/export"; then
 fi
 
 ics="$(pdi_load "$coursefile")"
-htmlfile="${_DATA}/export/$(pdi_value "$ics" SUMMARY |URL |tr / _).html"
+htmlfile="${_DATA}/export/$(pdi_value "$ics" SUMMARY |unescape |tr \\n/ __).html"
 pdffile=${htmlfile%.html}.pdf
 
 pdi_date() {
@@ -129,4 +129,4 @@ export  XDG_CACHE_HOME="$_DATA/xdg_cache"
 export   XDG_DATA_HOME="$_DATA/xdg_local"
 
 lowriter --convert-to pdf --outdir "$_DATA/export/" "$htmlfile" >/dev/null
-REDIRECT "/export/${pdffile##*/}"
+REDIRECT "$(URL "/export/${pdffile##*/}")"