diff options
author | EuAndreh <eu@euandre.org> | 2022-02-19 17:43:35 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-02-19 17:43:35 -0300 |
commit | 8e23ad2e8c2d07f8e6328b83950834bfc3737c12 (patch) | |
tree | 9ce71c6e07387c99b2c9fa0424be521587e8a427 /aux | |
parent | TODOs.md: Add #td-4a37bf57-a3a1-488f-ca99-89431c460ab0 (diff) | |
download | td-8e23ad2e8c2d07f8e6328b83950834bfc3737c12.tar.gz td-8e23ad2e8c2d07f8e6328b83950834bfc3737c12.tar.xz |
aux/: Update
Diffstat (limited to 'aux')
-rwxr-xr-x | aux/ci/ci-build.sh | 2 | ||||
-rwxr-xr-x | aux/workflow/manpages2html.sh | 40 | ||||
-rw-r--r-- | aux/workflow/style.css | 46 |
3 files changed, 72 insertions, 16 deletions
diff --git a/aux/ci/ci-build.sh b/aux/ci/ci-build.sh index 5e5e656..8d18252 100755 --- a/aux/ci/ci-build.sh +++ b/aux/ci/ci-build.sh @@ -59,5 +59,5 @@ EOF RUNNER='sh -c' fi - $RUNNER 'make clean public dev-check' + $RUNNER 'make clean dev-check' } 2>&1 | tee "$LOGFILE" diff --git a/aux/workflow/manpages2html.sh b/aux/workflow/manpages2html.sh new file mode 100755 index 0000000..2498b5c --- /dev/null +++ b/aux/workflow/manpages2html.sh @@ -0,0 +1,40 @@ +#!/bin/sh +set -eu + +while getopts 'o:' flag; do + case "$flag" in + o) + OUTDIR="$OPTARG" + ;; + *) + exit 2 + ;; + esac +done +shift $((OPTIND - 1)) + +assert_arg() { + if [ -z "$1" ]; then + echo "Missing $2" >&2 + exit 2 + fi +} + +assert_arg "${OUTDIR:-}" '-o OUTDIR' + +for f in "$@"; do + l="$(echo "$f" | awk -F. '{print $(NF-1)}')" + n="$(echo "$f" | awk -F. '{print $NF}')" + to_name="$(basename "${f%."$l"."$n"}.$n.html")" + mkdir -p "$OUTDIR/$l" + pandoc \ + --toc \ + --toc-depth=2 \ + -s \ + -r man \ + -w html \ + -H aux/workflow/favicon.html \ + -H aux/workflow/style.css \ + --metadata "lang=$l" \ + < "$f" > "$OUTDIR/$l/$to_name" +done diff --git a/aux/workflow/style.css b/aux/workflow/style.css index 56e4712..99980aa 100644 --- a/aux/workflow/style.css +++ b/aux/workflow/style.css @@ -1,19 +1,4 @@ <style> - @media(prefers-color-scheme: dark) { - :root { - color: white; - background-color: black; - } - - a { - color: hsl(211, 100%, 60%); - } - - a:visited { - color: hsl(242, 100%, 80%); - } - } - body { max-width: 800px; margin: 0 auto 0 auto; @@ -25,6 +10,7 @@ .header-anchor { opacity: 0.5; + display: inline-block; } .tag { @@ -59,4 +45,34 @@ .CANCELLED, .DONE, .WONTFIX { color: green; } + + pre, code { + background-color: #ddd; + border-radius: 5px; + padding: 5px; + } + + pre > code { + overflow: auto; + white-space: pre; + } + + @media(prefers-color-scheme: dark) { + :root { + color: white; + background-color: black; + } + + a { + color: hsl(211, 100%, 60%); + } + + a:visited { + color: hsl(242, 100%, 80%); + } + + pre, code { + background-color: #222; + } + } </style> |