handle multiple files
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -12,9 +12,12 @@ esac
|
||||
|
||||
echo using $script
|
||||
|
||||
$script
|
||||
slide_files=("./slides.md" ) # if more files are need add them here
|
||||
|
||||
echo ${slide_files[@]}
|
||||
$script ${slide_files[@]}
|
||||
while [ 1 -eq 1 ]
|
||||
do
|
||||
inotifywait ./slides.md
|
||||
$script
|
||||
file=$(inotifywait ${slide_files[@]})
|
||||
$script ${file%%\ *}
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user