aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/TODOs.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-07-25 16:00:57 -0300
committerEuAndreh <eu@euandre.org>2021-07-25 16:00:57 -0300
commit301a644485dac428e6ef09396bbc9f7c3180849b (patch)
treec1b7eac20494127ce283a29a4da6e08be9f3e765 /aux/workflow/TODOs.sh
parentsrc/xyz/euandreh/queue.scm: Update mdpo to 0.3.63 (diff)
downloadpackage-repository-301a644485dac428e6ef09396bbc9f7c3180849b.tar.gz
package-repository-301a644485dac428e6ef09396bbc9f7c3180849b.tar.xz
aux/: Update
Diffstat (limited to 'aux/workflow/TODOs.sh')
-rwxr-xr-xaux/workflow/TODOs.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh
index 6c24c3e..d875e0e 100755
--- a/aux/workflow/TODOs.sh
+++ b/aux/workflow/TODOs.sh
@@ -39,21 +39,21 @@ if [ -z "${PROJECT_UC:-}" ]; then
PROJECT_UC="$PROJECT"
fi
-TODOS_ADD_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## <a href="#\3"><span class="\1">\1<\/span> \2<\/a>\n<pre class="header-anchor" id="\3">#\3<\/pre>\n/'
-TODOS_CLEANUP_REGEX1='s/(<a><a)/<a/'
-TODOS_CLEANUP_REGEX2='s/<\/a><\/a>/<\/a>/'
-TAGS_REGEX='s/tag:([\w-]+)/<span class="tag">\1<\/span>/g'
+# shellcheck disable=1004
+IDS_REGEX='s:^## \(TODO\|DOING\|WAITING\|MEETING\|INACTIVE\|NEXT\|CANCELLED\|DONE\|WONTFIX\) \(.*\) {#\(.*\)}\(.*\)$:## <a href="#\3"><span class="\1">\1</span> \2</a>\4\
+<pre class="header-anchor" id="\3">#\3</pre>\
+:g'
+TAGS_REGEX='s|tag:\([a-z0-9-]*\)|<span class="tag">\1</span>|g'
-sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \
- -e "s:@PROJECT@:$PROJECT:g" \
- -e "s:@MAILING_LIST@:$MAILING_LIST:g" \
- -e "s:@TLD@:$TLD:g" \
- < aux/workflow/preamble.md | \
- printf \
- '%s\n\n%s' \
- "$(cat -)" \
- "$(perl -pe "$TODOS_ADD_REGEX" TODOs.md | perl -pe "$TAGS_REGEX")" | \
+cat aux/workflow/preamble.md TODOs.md | \
+ sed \
+ -e "s:@PROJECT_UC@:$PROJECT_UC:g" \
+ -e "s:@PROJECT@:$PROJECT:g" \
+ -e "s:@MAILING_LIST@:$MAILING_LIST:g" \
+ -e "s:@TLD@:$TLD:g" \
+ -e "$IDS_REGEX" \
+ -e "$TAGS_REGEX" | \
pandoc \
--toc \
--highlight-style pygments \
@@ -64,8 +64,8 @@ sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \
-r commonmark \
-w html \
-H aux/workflow/favicon.html \
- -H aux/workflow/style.css \
- | \
- perl -pe "$TODOS_CLEANUP_REGEX1" | \
- perl -pe "$TODOS_CLEANUP_REGEX2" \
+ -H aux/workflow/style.css | \
+ sed \
+ -e 's:<a><a:<a:g' \
+ -e 's:</a></a>:</a>:g' \
> "$OUTDIR/TODOs.html"