X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=courses%2Fexport_pdf.sh;h=62bb69e50f6c00e3c36bcdacc2c84f9f86a0e5ed;hp=3985b2c878babd32673a00883cc944f999716cdf;hb=f0f4a2847ec2fe8226682eee26c902a3b6d64f58;hpb=e85a35fbfd636e2c1e1fd805791018809749c69e diff --git a/courses/export_pdf.sh b/courses/export_pdf.sh index 3985b2c..62bb69e 100755 --- a/courses/export_pdf.sh +++ b/courses/export_pdf.sh @@ -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() { @@ -123,5 +123,10 @@ style_td='style="border: 1pt solid; padding: 1mm 2mm; vertical-align: top;"' ]] EOF -lowriter --convert-to pdf --outdir "$_DATA/export/" "$htmlfile" -REDIRECT "/export/${pdffile##*/}" +export HOME="$_DATA" +export XDG_CONFIG_HOME="$_DATA/xdg_config" +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 "$(URL "/export/${pdffile##*/}")"