aboutsummaryrefslogtreecommitdiff
path: root/build-aux/workflow/TODOs.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-23 19:37:24 -0300
committerEuAndreh <eu@euandre.org>2021-01-23 19:37:24 -0300
commite1c3b0a1f5ebc64da3d783b0b37c9441c47ca79b (patch)
treeea1332e90d52715b31ef50a3c4845e2294f6ecf4 /build-aux/workflow/TODOs.sh
parentAdd default Guix infrastructure (diff)
downloadeuandre.org-e1c3b0a1f5ebc64da3d783b0b37c9441c47ca79b.tar.gz
euandre.org-e1c3b0a1f5ebc64da3d783b0b37c9441c47ca79b.tar.xz
Add default workflow infrastructure
Diffstat (limited to '')
-rwxr-xr-xbuild-aux/workflow/TODOs.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/build-aux/workflow/TODOs.sh b/build-aux/workflow/TODOs.sh
new file mode 100755
index 0000000..3f9fa4b
--- /dev/null
+++ b/build-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 < build-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 build-aux/workflow/style.css \
+ > public/TODOs.html