diff options
author | EuAndreh <eu@euandre.org> | 2021-06-16 23:00:20 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-16 23:00:20 -0300 |
commit | 993e0e15eb9691bc73e502e0003fa799650862e3 (patch) | |
tree | fbba2173783f55445ddd7c7e24f652db6936016d /aux/workflow/TODOs.sh | |
parent | README.md: Highlight link as anchor instead of text (diff) | |
download | package-repository-993e0e15eb9691bc73e502e0003fa799650862e3.tar.gz package-repository-993e0e15eb9691bc73e502e0003fa799650862e3.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 |