-
Notifications
You must be signed in to change notification settings - Fork 0
/
render
executable file
·36 lines (29 loc) · 1.17 KB
/
render
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
#
# Inital Setup see:
# https://asciidoctor.org/docs/asciidoctor-revealjs/
BUNDLE=${1:-bundle}
#SRCFILES=(ch1-poisson.adoc ch2-prog.adoc ch3-diffusion.adoc ch4-elasticite.adoc ch5-stokes.adoc index.adoc)
#for SRCFILE in "${SRCFILES[@]}"; do
for SRCFILE in *.adoc; do
echo "Rendering $SRCFILE"
$BUNDLE exec asciidoctor-revealjs -r asciidoctor-diagram -a revealjsdir=https://cdn.jsdelivr.net/npm/[email protected] $SRCFILE
#$BUNDLE exec asciidoctor-revealjs -r asciidoctor-diagram $SRCFILE
#npx asciidoctor-revealjs -r asciidoctor-diagram -a revealjsdir=https://cdn.jsdelivr.net/npm/[email protected] $SRCFILE
base=`basename $SRCFILE .adoc`
#echo "Starting Webserver on :8000"
#python -m SimpleHTTPServer >/dev/null 2>&1 &
#chromium-browser http://localhost:8000/$base.html > /dev/null &
#echo "Watching *.adoc for changes"
#inotifywait -m -e close_write *.adoc |
#while read events; do
# echo $events
# bundle exec asciidoctor-revealjs $SRCFILE
#done
done
if test -d build; then rm -rf build; fi
mkdir build
cp -r css fonts images videos build
mv *.html build
rsync -avz reveal.js build/
#git clone -b 3.9.2 --depth 1 https://github.com/hakimel/reveal.js.git build/reveal.js