aboutsummaryrefslogtreecommitdiff
path: root/build-aux/workflow/TODOs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/workflow/TODOs.sh')
-rwxr-xr-xbuild-aux/workflow/TODOs.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/build-aux/workflow/TODOs.sh b/build-aux/workflow/TODOs.sh
index b8a3f29..3ccd57b 100755
--- a/build-aux/workflow/TODOs.sh
+++ b/build-aux/workflow/TODOs.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -eux
+#!/bin/sh -eu
mkdir -p public
@@ -6,8 +6,10 @@ export PROJECT_UC="$1"
export PROJECT="$2"
export MAILING_LIST="$3"
-envsubst < build-aux/workflow/preamble.md | \
- cat - TODOs.md | \
+REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{(#.*?)\}$/## <span class="\1">\1<\/span> \2 {\3}\n<a class="header-anchor" href="\3">\3<\/a>\n/'
+
+envsubst < build-aux/workflow/preamble.md | \
+ printf '%s\n\n%s' "$(cat -)" "$(perl -pe "$REGEX" TODOs.md)" | \
pandoc --toc \
--highlight-style pygments \
--toc-depth=2 \