aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/TODOs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'aux/workflow/TODOs.sh')
-rwxr-xr-xaux/workflow/TODOs.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh
index 00fef6f..d84e6f7 100755
--- a/aux/workflow/TODOs.sh
+++ b/aux/workflow/TODOs.sh
@@ -3,19 +3,23 @@ set -eu
mkdir -p public
-export PROJECT_UC="$1"
-export PROJECT="$2"
-export MAILING_LIST="$3"
+PROJECT_UC="$1"
+PROJECT="$2"
+MAILING_LIST="$3"
TODOS_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/'
TAGS_REGEX='s/tag:([\w-]+)/<span class="tag">\1<\/span>/g'
-envsubst < aux/workflow/preamble.md | \
- printf '%s\n\n%s' \
- "$(cat -)" \
- "$(perl -pe "$TODOS_REGEX" TODOs.md | \
- perl -pe "$TAGS_REGEX")" | \
+SED_REGEX="s:@PROJECT_UC@:$PROJECT_UC:g"
+
+sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \
+ -e "s:@PROJECT@:$PROJECT:g" \
+ -e "s:@MAILING_LIST@:$MAILING_LIST:g" < 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 \