aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/TODOs.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xaux/workflow/TODOs.sh11
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