#!/bin/sh set -eu mkdir -p public export PROJECT_UC="$1" export PROJECT="$2" export MAILING_LIST="$3" TODOS_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## \1<\/span> \2<\/a>\n#\3<\/span>\n/' TAGS_REGEX='s/tag:([\w-]+)/\1<\/span>/g' envsubst < aux/workflow/preamble.md | \ printf '%s\n\n%s' \ "$(cat -)" \ "$(perl -pe "$TODOS_REGEX" TODOs.md | \ perl -pe "$TAGS_REGEX")" | \ pandoc --toc \ --highlight-style pygments \ --toc-depth=2 \ -s \ --metadata title="$PROJECT_UC - TODOs" \ --metadata lang=en \ -r commonmark \ -w html \ -H aux/workflow/style.css \ > public/TODOs.html