diff options
author | EuAndreh <eu@euandre.org> | 2021-03-07 19:49:00 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-03-07 19:49:00 -0300 |
commit | 2d6cc7398f626c9ffd9cfc9b4e25b87de16ec08c (patch) | |
tree | 4d34a8e2795dd3fc009776ad6e607f4c5945becd /aux/workflow/TODOs.sh | |
parent | assert-todos.sh: Remove reference to inexistant docbook-xsl/ directory (diff) | |
download | euandre.org-2d6cc7398f626c9ffd9cfc9b4e25b87de16ec08c.tar.gz euandre.org-2d6cc7398f626c9ffd9cfc9b4e25b87de16ec08c.tar.xz |
TODOs.sh: Use sed to remove dependency on gettext
Diffstat (limited to '')
-rwxr-xr-x | aux/workflow/TODOs.sh | 20 |
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 \ |