aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-16 14:13:04 -0300
committerEuAndreh <eu@euandre.org>2021-01-16 14:13:04 -0300
commit9b35ea3e28b0a0497095b3164e0742460cf9d583 (patch)
tree46ddbcff557017a4a995929f4ef6421aba558558
parentguix/os.scm: Add festival for TTS (diff)
downloaddotfiles-9b35ea3e28b0a0497095b3164e0742460cf9d583.tar.gz
dotfiles-9b35ea3e28b0a0497095b3164e0742460cf9d583.tar.xz
Move from TODOs.rst to TODOs.md
-rw-r--r--bash/fake-symlinks.sh5
-rw-r--r--bash/templates/TODOs.md (renamed from bash/templates/TODOs.rst)0
-rwxr-xr-xbash/templates/build-aux/assert-todos.sh10
-rw-r--r--bash/templates/build-aux/html-files-from-sources.am2
-rwxr-xr-xbash/templates/build-aux/workflow/TODOs.sh19
-rw-r--r--bash/templates/build-aux/workflow/preamble.md15
-rw-r--r--bash/templates/build-aux/workflow/preamble.rst20
-rw-r--r--bash/templates/build-aux/workflow/style.css50
-rw-r--r--bash/util.sh4
9 files changed, 86 insertions, 39 deletions
diff --git a/bash/fake-symlinks.sh b/bash/fake-symlinks.sh
index 60c62d84..17902546 100644
--- a/bash/fake-symlinks.sh
+++ b/bash/fake-symlinks.sh
@@ -189,9 +189,10 @@ ln-build-aux() {
cp-all build-aux/assert-todos.sh \
build-aux/assert-shellcheck.sh \
build-aux/workflow/TODOs.sh \
- build-aux/workflow/preamble.rst
+ build-aux/workflow/style.css \
+ build-aux/workflow/preamble.md
- cp-if-not TODOs.rst
+ cp-if-not TODOs.md
}
ln-agpl() {
diff --git a/bash/templates/TODOs.rst b/bash/templates/TODOs.md
index 4b0c4a9d..4b0c4a9d 100644
--- a/bash/templates/TODOs.rst
+++ b/bash/templates/TODOs.md
diff --git a/bash/templates/build-aux/assert-todos.sh b/bash/templates/build-aux/assert-todos.sh
index ebed4e84..ce6c95bf 100755
--- a/bash/templates/build-aux/assert-todos.sh
+++ b/bash/templates/build-aux/assert-todos.sh
@@ -1,22 +1,22 @@
#!/bin/sh -eu
-if git grep FIXME | grep -v '^TODOs.rst' | grep -v '^build-aux/assert-todos.sh' | grep -v '^build-aux/docbook-xsl/'; then
+if git grep FIXME | grep -v '^TODOs.md' | grep -v '^build-aux/assert-todos.sh' | grep -v '^build-aux/docbook-xsl/'; then
echo "Found dangling FIXME markers on the project."
- echo "You should write them down properly on TODOs.rst."
+ echo "You should write them down properly on TODOs.md."
exit 1
fi
KNOWN_IDS=''
has_error=0
# shellcheck disable=2013
-for todo in $(sed -e '/^\* Tasks$/,/^\* Improvements$/!d' TODOs.rst | grep -nE '^\*\* .*$' | cut -d: -f1); do
- if sed "${todo}q;d" TODOs.rst | grep -qE '^\*\* (CANCELLED|DONE)'; then
+for todo in $(sed -e '/^\* Tasks$/,/^\* Improvements$/!d' TODOs.md | grep -nE '^\*\* .*$' | cut -d: -f1); do
+ if sed "${todo}q;d" TODOs.md | grep -qE '^\*\* (CANCELLED|DONE)'; then
ID_OFFSET=3
else
ID_OFFSET=2
fi
line_n="$((todo+ID_OFFSET))"
- ID_LINE="$(sed "${line_n}q;d" TODOs.rst)"
+ ID_LINE="$(sed "${line_n}q;d" TODOs.md)"
if echo "$ID_LINE" | grep -q '^:CUSTOM_ID: .*$'; then
ID="$(echo "$ID_LINE" | awk '{print $2}')"
if echo "$KNOWN_IDS" | grep -q "$ID"; then
diff --git a/bash/templates/build-aux/html-files-from-sources.am b/bash/templates/build-aux/html-files-from-sources.am
index 3f335ed9..db073f33 100644
--- a/bash/templates/build-aux/html-files-from-sources.am
+++ b/bash/templates/build-aux/html-files-from-sources.am
@@ -16,7 +16,7 @@ doc/dictionaries/all.txt: $(DICTIONARIES)
exit 1; \
}
-public: README TODOs.rst $(DOC_SRCS) doc/dictionaries/all.txt
+public: README TODOs.md $(DOC_SRCS) doc/dictionaries/all.txt
$(srcdir)/build-aux/build-web-assets.sh '$(PACKAGE)' $(LANGS)
$(srcdir)/build-aux/generate-tasks-and-bugs.sh
diff --git a/bash/templates/build-aux/workflow/TODOs.sh b/bash/templates/build-aux/workflow/TODOs.sh
index f080001a..b8a3f29c 100755
--- a/bash/templates/build-aux/workflow/TODOs.sh
+++ b/bash/templates/build-aux/workflow/TODOs.sh
@@ -6,12 +6,13 @@ export PROJECT_UC="$1"
export PROJECT="$2"
export MAILING_LIST="$3"
-envsubst < build-aux/workflow/preamble.rst | \
- cat - TODOs.rst | \
- pandoc --toc \
- --highlight-style pygments \
- --toc-depth=2 \
- -s \
- --metadata title="$1 - TODOs" \
- --metadata lang=en \
- -r rst -w html > public/TODOs.html
+envsubst < build-aux/workflow/preamble.md | \
+ cat - TODOs.md | \
+ pandoc --toc \
+ --highlight-style pygments \
+ --toc-depth=2 \
+ -s \
+ --metadata title="$1 - TODOs" \
+ --metadata lang=en \
+ -H build-aux/workflow/style.css \
+ -r markdown -w html > public/TODOs.html
diff --git a/bash/templates/build-aux/workflow/preamble.md b/bash/templates/build-aux/workflow/preamble.md
new file mode 100644
index 00000000..ac75d9df
--- /dev/null
+++ b/bash/templates/build-aux/workflow/preamble.md
@@ -0,0 +1,15 @@
+# About
+
+TODOs for $PROJECT_UC.
+
+See also [$PROJECT.euandreh.xyz](https://$PROJECT.euandreh.xyz/).
+
+Register a new one:
+[~euandreh/$MAILING_LIST@lists.sr.ht](mailto:~euandreh/$MAILING_LIST@lists.sr.ht?subject=BUG%20or%20TASK%3A%20%3Cdescription%3E).
+
+*Você também pode escrever em português*.
+
+*Vous pouvez aussi écrire en français*.
+
+*Vi povas ankaŭ skribi esperante*.
+
diff --git a/bash/templates/build-aux/workflow/preamble.rst b/bash/templates/build-aux/workflow/preamble.rst
deleted file mode 100644
index caa50e67..00000000
--- a/bash/templates/build-aux/workflow/preamble.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-About
-=====
-
-TODOs for $PROJECT_UC.
-
-See also `$PROJECT.euandreh.xyz`_.
-
-Register a new one: `~euandreh/$MAILING_LIST@lists.sr.ht`_.
-
-*Você também pode escrever em português.*
-
-*Vous pouvez aussi écrire en français.*
-
-*Vi povas ankaŭ skribi esperante.*
-
-.. _`$PROJECT.euandreh.xyz`: https://$PROJECT.euandreh.xyz/
-.. _`~euandreh/$MAILING_LIST@lists.sr.ht`: mailto:~euandreh/$MAILING_LIST@lists.sr.ht?subject=BUG%20or%20TASK%3A%20%3Cdescription%3E
-
-.. role:: commit
-
diff --git a/bash/templates/build-aux/workflow/style.css b/bash/templates/build-aux/workflow/style.css
new file mode 100644
index 00000000..b68ff708
--- /dev/null
+++ b/bash/templates/build-aux/workflow/style.css
@@ -0,0 +1,50 @@
+<style>
+ hr {
+ background-color: #ccc;
+ }
+
+ /*
+ Replicate colors from:
+ https://git.euandreh.xyz/dotfiles/tree/spacemacs.el?id=fcd9f9c4ef399d45d54927382dc1cdde251ebb0a#n866
+ */
+
+ .TODO::after {
+ content: "TODO";
+ color: brown;
+ }
+
+ .DOING::after {
+ content: "DOING";
+ color: yellowgreen;
+ }
+
+ .WAITING::after {
+ content: "WAITING";
+ color: gray;
+ }
+
+ .MEETING::after {
+ content: "MEETING";
+ color: gray;
+ }
+
+ .INACTIVE::after {
+ content: "INACTIVE";
+ color: orange;
+ }
+
+ .NEXT::after {
+ content: "NEXT";
+ color: red;
+ }
+
+ .CANCELLED::after {
+ content: "CANCELLED";
+ color: green;
+ }
+
+ .DONE::after {
+ content: "DONE";
+ color: green;
+ }
+</style>
diff --git a/bash/util.sh b/bash/util.sh
index a64afae6..79917a61 100644
--- a/bash/util.sh
+++ b/bash/util.sh
@@ -37,6 +37,6 @@ task() {
printf '.. _%s:\n\n%s\n%s\n- TODO in %s\n\n----\n\nFIXME\n' \
"$(uuidgen)" "$TITLE" "$DASHES" "$(date -I)" | \
vipe | \
- printf '%s\n\n%s\n%s\n' "$(head -n2 TODOs.rst)" "$(cat -)" "$(tail -n+3 TODOs.rst)" | \
- sponge TODOs.rst
+ printf '%s\n\n%s\n%s\n' "$(head -n2 TODOs.md)" "$(cat -)" "$(tail -n+3 TODOs.md)" | \
+ sponge TODOs.md
}