diff options
Diffstat (limited to 'aux')
-rwxr-xr-x | aux/workflow/TODOs.sh | 20 | ||||
-rw-r--r-- | aux/workflow/preamble.md | 8 |
2 files changed, 16 insertions, 12 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 \ diff --git a/aux/workflow/preamble.md b/aux/workflow/preamble.md index 7413f58..9fbbd2c 100644 --- a/aux/workflow/preamble.md +++ b/aux/workflow/preamble.md @@ -1,12 +1,12 @@ # About -TODOs for $PROJECT_UC. +TODOs for @PROJECT_UC@. -See also [$PROJECT.euandreh.xyz](https://$PROJECT.euandreh.xyz/) and [CI logs](https://$PROJECT.euandreh.xyz/ci.html). +See also [@PROJECT@.euandreh.xyz](https://@PROJECT@.euandreh.xyz/) and [CI logs](https://@PROJECT@.euandreh.xyz/ci.html). Register a new one at -[~euandreh/$MAILING_LIST@lists.sr.ht](mailto:~euandreh/$MAILING_LIST@lists.sr.ht?subject=%5B$PROJECT%5D%20BUG%20or%20TASK%3A%20%3Cdescription%3E) -and see [existing discussions](https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D). +[~euandreh/@MAILING_LIST@@lists.sr.ht](mailto:~euandreh/@MAILING_LIST@@lists.sr.ht?subject=%5B@PROJECT@%5D%20BUG%20or%20TASK%3A%20%3Cdescription%3E) +and see [existing discussions](https://lists.sr.ht/~euandreh/@MAILING_LIST@?search=%5B@PROJECT@%5D). *Você também pode escrever em português*. |