Files
PointsBot/docs/run.sh

16 lines
362 B
Bash
Raw Normal View History

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