aboutsummaryrefslogtreecommitdiff
path: root/aux
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-03-07 19:48:19 -0300
committerEuAndreh <eu@euandre.org>2021-03-07 19:48:19 -0300
commit0a745e9b0509d4cbf13f260cc8f5f53a97265db3 (patch)
treef13116818ecf7e03e0d3fd33df60b699d934ec58 /aux
parent2465fb752aaedc063b46fd7f90f2d8c18eeb6797 (diff)
downloadpackage-repository-0a745e9b0509d4cbf13f260cc8f5f53a97265db3.tar.gz
TODOs.sh: Use sed to remove dependency on gettext
Diffstat (limited to 'aux')
-rwxr-xr-xaux/workflow/TODOs.sh20
-rw-r--r--aux/workflow/preamble.md8
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*.