From 9a2d13300437521e8a64f6bc5bd6a1f3f77e87b6 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Thu, 4 Aug 2022 14:40:53 -0400 Subject: [PATCH] Rewrite jpg to svg in HTML build process --- compile.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/compile.sh b/compile.sh index b9b246f..c591697 100644 --- a/compile.sh +++ b/compile.sh @@ -5,4 +5,14 @@ mkdir -p html pandoc -o pdf/NOTES_ON_OPTICAL_PRINTER_TECHNIQUE.pdf -f markdown+implicit_figures NOTES_ON_OPTICAL_PRINTER_TECHNIQUE.md -pandoc --css=style.css -o html/index.html -t html -f markdown+implicit_figures NOTES_ON_OPTICAL_PRINTER_TECHNIQUE.md \ No newline at end of file +MARKDOWN="$(cat NOTES_ON_OPTICAL_PRINTER_TECHNIQUE.md)" +HTML_TMP=$(mktemp -d) + +SVG="${MARKDOWN//.jpg/.svg}" +SVG="${SVG//img\//..\/img\/}" + +echo "${SVG}" > "${HTML_TMP}/index.md" + +pandoc --css=style.css -o html/index.html -t html -f markdown+implicit_figures "${HTML_TMP}/index.md" + +rm -r "${HTML_TMP}" \ No newline at end of file