diff options
author | EuAndreh <eu@euandre.org> | 2021-06-15 08:21:39 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-15 08:23:27 -0300 |
commit | 2c46bb5bef55715db5b922900a01863d40c370dd (patch) | |
tree | 8d1ac57c7e8e85464cea60a08748dcf9eb8e6051 /aux/workflow/TODOs.sh | |
parent | TODOs.md: Add #task-3cf42559-3713-02c6-bba3-af5bac5512a7 (diff) | |
download | euandre.org-2c46bb5bef55715db5b922900a01863d40c370dd.tar.gz euandre.org-2c46bb5bef55715db5b922900a01863d40c370dd.tar.xz |
aux/: Update
Diffstat (limited to '')
-rwxr-xr-x | aux/workflow/TODOs.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh index 80059ee..9f9f657 100755 --- a/aux/workflow/TODOs.sh +++ b/aux/workflow/TODOs.sh @@ -8,7 +8,9 @@ PROJECT="$2" MAILING_LIST="$3" TLD="$(cat aux/tld.txt)" -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/' +TODOS_ADD_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/' +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' @@ -20,7 +22,7 @@ sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \ printf \ '%s\n\n%s' \ "$(cat -)" \ - "$(perl -pe "$TODOS_REGEX" TODOs.md | perl -pe "$TAGS_REGEX")" | \ + "$(perl -pe "$TODOS_ADD_REGEX" TODOs.md | perl -pe "$TAGS_REGEX")" | \ pandoc \ --toc \ --highlight-style pygments \ @@ -32,4 +34,7 @@ sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \ -w html \ -H aux/workflow/favicon.html \ -H aux/workflow/style.css \ - > public/TODOs.html + | \ + perl -pe "$TODOS_CLEANUP_REGEX1" | \ + perl -pe "$TODOS_CLEANUP_REGEX2" \ + > public/TODOs.html |