init lab bin

This commit is contained in:
ackman678
2019-02-05 19:30:40 -08:00
commit e86353cd6b
15 changed files with 456 additions and 0 deletions

22
reveal.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
#installation: place in home directory and make this file executable `chmod u=rwX,go= reveal.sh`
#usage example: `./reveal.sh neuroanatomy1.md`
appPath="$HOME/projects/dev/reveal.js"
if [[ ! -d $appPath ]]; then
echo "reveal.js not found"
exit 1
else
cd $appPath
fi
fn=$1 #markdown document to render e.g. neuroanatomy1.md
if [[ ! -e $fn ]]; then
ln -s $fn $(basename $fn)
fi
#add markdown filename to reveal placeholder start file
sed -i -E "s|(<section data-markdown=\")[A-Za-z0-9\.-]*(\" )|\1$fn\2|" index.html
npm start