diff options
author | EuAndreh <eu@euandre.org> | 2021-01-27 13:09:42 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-01-27 13:09:42 -0300 |
commit | 53d7c1b4de2d443d531ac4b630f6976c88640815 (patch) | |
tree | 9fc004a645bda202cb82b9ff9fbd880646d97c4d /aux/workflow/TODOs.sh | |
parent | v0.1.2: Use sed over tac for POSIX compatibility (diff) | |
download | remembering-53d7c1b4de2d443d531ac4b630f6976c88640815.tar.gz remembering-53d7c1b4de2d443d531ac4b630f6976c88640815.tar.xz |
mv build-aux/ aux/
Diffstat (limited to 'aux/workflow/TODOs.sh')
-rwxr-xr-x | aux/workflow/TODOs.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh new file mode 100755 index 0000000..ab45835 --- /dev/null +++ b/aux/workflow/TODOs.sh @@ -0,0 +1,23 @@ +#!/bin/sh +set -eu + +mkdir -p public + +export PROJECT_UC="$1" +export PROJECT="$2" +export MAILING_LIST="$3" + +REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## <a href="#\3"><span class="\1">\1<\/span> \2<\/a>\n<span class="header-anchor" id="\3">#\3<\/span>\n/' + +envsubst < aux/workflow/preamble.md | \ + printf '%s\n\n%s' "$(cat -)" "$(perl -pe "$REGEX" TODOs.md)" | \ + pandoc --toc \ + --highlight-style pygments \ + --toc-depth=2 \ + -s \ + --metadata title="$PROJECT_UC - TODOs" \ + --metadata lang=en \ + -r markdown \ + -w html \ + -H aux/workflow/style.css \ + > public/TODOs.html |