aboutsummaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-16 16:07:09 -0300
committerEuAndreh <eu@euandre.org>2021-01-16 16:12:25 -0300
commit3c118c78dba38ae1155ac0f403ed257628541ef1 (patch)
treee671d95abbbccc2667dc2150f7ccf6295635e1ed /build-aux
parentMove from TODOs.rst to TODOs.md (diff)
downloadserver-3c118c78dba38ae1155ac0f403ed257628541ef1.tar.gz
server-3c118c78dba38ae1155ac0f403ed257628541ef1.tar.xz
Use Perl to handle header anchors in TODOs.md
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/workflow/TODOs.sh8
-rw-r--r--build-aux/workflow/style.css32
2 files changed, 15 insertions, 25 deletions
diff --git a/build-aux/workflow/TODOs.sh b/build-aux/workflow/TODOs.sh
index b8a3f29..3ccd57b 100755
--- a/build-aux/workflow/TODOs.sh
+++ b/build-aux/workflow/TODOs.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -eux
+#!/bin/sh -eu
mkdir -p public
@@ -6,8 +6,10 @@ export PROJECT_UC="$1"
export PROJECT="$2"
export MAILING_LIST="$3"
-envsubst < build-aux/workflow/preamble.md | \
- cat - TODOs.md | \
+REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{(#.*?)\}$/## <span class="\1">\1<\/span> \2 {\3}\n<a class="header-anchor" href="\3">\3<\/a>\n/'
+
+envsubst < build-aux/workflow/preamble.md | \
+ printf '%s\n\n%s' "$(cat -)" "$(perl -pe "$REGEX" TODOs.md)" | \
pandoc --toc \
--highlight-style pygments \
--toc-depth=2 \
diff --git a/build-aux/workflow/style.css b/build-aux/workflow/style.css
index b68ff70..a4ac27a 100644
--- a/build-aux/workflow/style.css
+++ b/build-aux/workflow/style.css
@@ -3,48 +3,36 @@
background-color: #ccc;
}
+ a.header-anchor {
+ opacity: 0.5;
+ }
+
/*
Replicate colors from:
https://git.euandreh.xyz/dotfiles/tree/spacemacs.el?id=fcd9f9c4ef399d45d54927382dc1cdde251ebb0a#n866
*/
- .TODO::after {
- content: "TODO";
+ .TODO {
color: brown;
}
- .DOING::after {
- content: "DOING";
+ .DOING {
color: yellowgreen;
}
- .WAITING::after {
- content: "WAITING";
- color: gray;
- }
-
- .MEETING::after {
- content: "MEETING";
+ .WAITING, .MEETING {
color: gray;
}
- .INACTIVE::after {
- content: "INACTIVE";
+ .INACTIVE {
color: orange;
}
- .NEXT::after {
- content: "NEXT";
+ .NEXT {
color: red;
}
- .CANCELLED::after {
- content: "CANCELLED";
- color: green;
- }
-
- .DONE::after {
- content: "DONE";
+ .CANCELLED, .DONE {
color: green;
}
</style>