#!/usr/bin/env bash
# usage: creates HTML files for each *.md file
#        stop with Ctrl+C
#        requirement: Pandoc installation
while true; do
    for mdfile in *.md; do
        htmlfile=${mdfile%.md}.html
        if [ $mdfile -nt $htmlfile ]; then
            echo $mdfile
            pandoc $mdfile -o $htmlfile
        fi
    done
    sleep 1
done
