Files
PointsBot/docs/run.sh
2020-02-08 10:10:54 -08:00

16 lines
362 B
Bash
Executable File

#!/usr/bin/env bash
# If files specified, only make them; otherwise, make all
if [[ $# -gt 0 ]]; then
docfiles=( "$@" )
else
docfiles=( $(ls *.md) )
fi
for fname in "${docfiles[@]}"; do
outname="_${fname/%md/html}"
echo $fname "->" $outname
pandoc -s -f gfm -t html $fname -o $outname --metadata pagetitle="$outname"
open $outname
done