From 7f1b1a193bfef0936cfb3f0aee368f0cf21f078f Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 16 Jan 2021 14:11:36 -0300 Subject: Move from TODOs.rst to TODOs.md --- build-aux/assert-todos.sh | 10 ++++----- build-aux/workflow/TODOs.sh | 19 ++++++++-------- build-aux/workflow/preamble.md | 15 +++++++++++++ build-aux/workflow/preamble.rst | 20 ----------------- build-aux/workflow/style.css | 50 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 80 insertions(+), 34 deletions(-) create mode 100644 build-aux/workflow/preamble.md delete mode 100644 build-aux/workflow/preamble.rst create mode 100644 build-aux/workflow/style.css (limited to 'build-aux') diff --git a/build-aux/assert-todos.sh b/build-aux/assert-todos.sh index ebed4e8..ce6c95b 100755 --- a/build-aux/assert-todos.sh +++ b/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/build-aux/workflow/TODOs.sh b/build-aux/workflow/TODOs.sh index f080001..b8a3f29 100755 --- a/build-aux/workflow/TODOs.sh +++ b/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/build-aux/workflow/preamble.md b/build-aux/workflow/preamble.md new file mode 100644 index 0000000..ac75d9d --- /dev/null +++ b/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/build-aux/workflow/preamble.rst b/build-aux/workflow/preamble.rst deleted file mode 100644 index caa50e6..0000000 --- a/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/build-aux/workflow/style.css b/build-aux/workflow/style.css new file mode 100644 index 0000000..b68ff70 --- /dev/null +++ b/build-aux/workflow/style.css @@ -0,0 +1,50 @@ + -- cgit v1.2.3