handle multiple files

This commit is contained in:
jsz4n
2024-08-03 19:12:42 +02:00
parent c5104dfbc6
commit f2b3504697
3 changed files with 22 additions and 5 deletions

View File

@@ -5,4 +5,11 @@ SLIDE_LEVEL=2
my_header=$(<./templates/html_header.md)
headEscapedForSed=${my_header//$'\n'/\\$'\n'}
sed -e "s|SLIDEHEAD|$headEscapedForSed|g" slides.md | pandoc -s --mathjax -t revealjs -o html/slides.html --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -V revealjs-url=https://unpkg.com/reveal.js@5.0.0 --template=./templates/template.revealjs
for filename in $*
do
echo compiling $filename
file_out=`echo $filename | sed -e 's/\.md/\.html/g'`
sed -e "s|SLIDEHEAD|$headEscapedForSed|g" $filename | pandoc -s --mathjax -t revealjs -o html/$file_out --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -V revealjs-url=https://unpkg.com/reveal.js@5.0.0 --template=./templates/template.revealjs
echo output $file_out
done

View File

@@ -5,4 +5,11 @@ SLIDE_LEVEL=2
my_header=$(<./templates/pdf_header.md)
headEscapedForSed=${my_header//$'\n'/\\$'\n'}
sed -e "s|SLIDEHEAD|$headEscapedForSed|g" slides.md | pandoc -t beamer -o slides.pdf --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -H ./templates/code-style.tex
for filename in $*
do
echo compiling $filename
file_out=`echo $filename | sed -e 's/\.md/\.pdf/g'`
sed -e "s|SLIDEHEAD|$headEscapedForSed|g" $filename | pandoc -t beamer -o $file_out --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -H ./templates/code-style.tex
echo output $file_out
done