From 840e4a283dde35fe077ea26c738d663b60ac50a1 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 10 Mar 2023 17:49:29 -0300 Subject: rm -rf aux/ README.md --- aux/.gitignore | 1 - aux/ci/report.sh | 158 -------------------------------------------- aux/lib.sh | 33 --------- aux/tld.txt | 1 - aux/workflow/TODOs.sh | 65 ------------------ aux/workflow/favicon.svg | 62 ----------------- aux/workflow/head.html | 2 - aux/workflow/md2html.sh | 87 ------------------------ aux/workflow/preamble.md.in | 16 ----- aux/workflow/style.css | 80 ---------------------- 10 files changed, 505 deletions(-) delete mode 100644 aux/.gitignore delete mode 100755 aux/ci/report.sh delete mode 100644 aux/lib.sh delete mode 100644 aux/tld.txt delete mode 100755 aux/workflow/TODOs.sh delete mode 100644 aux/workflow/favicon.svg delete mode 100644 aux/workflow/head.html delete mode 100755 aux/workflow/md2html.sh delete mode 100644 aux/workflow/preamble.md.in delete mode 100644 aux/workflow/style.css (limited to 'aux') diff --git a/aux/.gitignore b/aux/.gitignore deleted file mode 100644 index 93cad91..0000000 --- a/aux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/workflow/preamble.md diff --git a/aux/ci/report.sh b/aux/ci/report.sh deleted file mode 100755 index 21cc54e..0000000 --- a/aux/ci/report.sh +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/sh -set -eu - -TLD="$(cat aux/tld.txt)" -. aux/lib.sh - - -usage() { - cat <<-'EOF' - Usage: - aux/ci/report.sh -n NAME -o OUTDIR - aux/ci/report.sh -h - EOF -} - -help() { - cat <<-'EOF' - - - Options: - -n NAME the lowercase name of the project - -o OUTDIR directory where to write the files - -h, --help show this message - - - Generate static HTML files CI report from data stored in git - notes. The metadata about the CI runs are stored in the ref - "refs/notes/ci-data", in the format described by - "aux/ci/run.sh", and the raw logs are stored under the ref - "refs/notes/ci-logs". - - - Examples: - - Generate report for project "myapp" in "public/ci/": - - $ sh aux/ci/report.sh -n myapp -o public/ci - EOF -} - - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -while getopts 'n:o:h' flag; do - case "$flag" in - n) - NAME="$OPTARG" - ;; - o) - OUTDIR="$OPTARG" - ;; - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - - -eval "$(assert_arg "${NAME:-}" '-n NAME')" -eval "$(assert_arg "${OUTDIR:-}" '-o OUTDIR')" - -PASS='✅' -FAIL='❌' - -mkdir -p "$OUTDIR"/logs "$OUTDIR"/data - -for c in $(git notes list | cut -d' ' -f2); do - DATA="$(git notes --ref=refs/notes/ci-data show "$c")" - FILENAME="$(echo "$DATA" | cut -d' ' -f2)" - echo "$DATA" > "$OUTDIR/data/$FILENAME" - git notes --ref=refs/notes/ci-logs show "$c" \ - > "$OUTDIR/logs/$FILENAME" -done - -{ - cat <<-EOF - - - - - - - - $NAME - CI logs - - - - - - -
-

- CI logs for - $NAME -

-
    - EOF - - for f in $(find "$OUTDIR/data/" -type f | LANG=C.UTF-8 sort -r); do - DATA="$(cat "$f")" - STATUS="$(echo "$DATA" | cut -d\ -f1)" - FILENAME="$(echo "$DATA" | cut -d\ -f2)" - - if [ "$STATUS" = 0 ]; then - STATUS_MARKER="$PASS" - else - STATUS_MARKER="$FAIL" - fi - - cat <<-EOF -
  1. - $STATUS_MARKER
    $FILENAME
    -
  2. - EOF - done - - cat <<-EOF -
-
- - - EOF -} > "$OUTDIR"/index.html.tmp - -mv "$OUTDIR"/index.html.tmp "$OUTDIR"/index.html diff --git a/aux/lib.sh b/aux/lib.sh deleted file mode 100644 index 9d183f9..0000000 --- a/aux/lib.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -assert_arg() { - if [ -z "$1" ]; then - printf 'Missing %s.\n\n' "$2" >&2 - cat <<-'EOF' - usage >&2 - exit 2 - EOF - fi -} - -uuid() { - od -xN20 /dev/urandom | - head -n1 | - awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}' -} - -tmpname() { - echo "${TMPDIR:-/tmp}/uuid-tmpname with spaces.$(uuid)" -} - -mkstemp() { - name="$(tmpname)" - touch "$name" - echo "$name" -} - -mkdtemp() { - name="$(tmpname)" - mkdir "$name" - echo "$name" -} diff --git a/aux/tld.txt b/aux/tld.txt deleted file mode 100644 index 058a2d6..0000000 --- a/aux/tld.txt +++ /dev/null @@ -1 +0,0 @@ -euandre.org \ No newline at end of file diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh deleted file mode 100755 index 8b06d15..0000000 --- a/aux/workflow/TODOs.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -set -eu - -TLD="$(cat aux/tld.txt)" -PROJECT_UC= -while getopts 'n:N:m:o:' flag; do - case "$flag" in - n) - PROJECT="$OPTARG" - ;; - N) - PROJECT_UC="$OPTARG" - ;; - m) - MAILING_LIST="$OPTARG" - ;; - 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 "${PROJECT:-}" '-n PROJECT' -assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST' -assert_arg "${OUTDIR:-}" '-o OUTDIR' - -if [ -z "${PROJECT_UC:-}" ]; then - PROJECT_UC="$PROJECT" -fi - - -td -H | - cat aux/workflow/preamble.md - | - sed \ - -e "s:@PROJECT_UC@:$PROJECT_UC:g" \ - -e "s:@PROJECT@:$PROJECT:g" \ - -e "s:@MAILING_LIST@:$MAILING_LIST:g" \ - -e "s:@TLD@:$TLD:g" | - pandoc \ - --toc \ - --highlight-style pygments \ - --toc-depth=2 \ - -s \ - --metadata title="$PROJECT_UC - TODOs" \ - --metadata lang=en \ - -r commonmark \ - -w html \ - -H aux/workflow/favicon.html \ - -H aux/workflow/style.css | - sed \ - -e 's:::g' - -# FIXME: check TODOs.sh from euandre.org diff --git a/aux/workflow/favicon.svg b/aux/workflow/favicon.svg deleted file mode 100644 index ce566b2..0000000 --- a/aux/workflow/favicon.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aux/workflow/head.html b/aux/workflow/head.html deleted file mode 100644 index 3902690..0000000 --- a/aux/workflow/head.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/aux/workflow/md2html.sh b/aux/workflow/md2html.sh deleted file mode 100755 index 957bfc2..0000000 --- a/aux/workflow/md2html.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh -set -eu - -. aux/lib.sh - -usage() { - cat <<-'EOF' - Usage: - aux/workflow/md2html.sh -N NAME_UC -T TITLE [-D TOC_DEPTH] < FILE.md - aux/workflow/md2html.sh -h - EOF -} - -help() { - cat <<-'EOF' - - Options: - -N NAME_UC the uppercased name of the project - -T TITLE the required title of the generated HTML - document - -D TOC_DEPTH the depth of the generated table of - contents (default: 2) - -h, --help show this message - - - Read markdown text from STDIN and emit HTML to STDOUT. - EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -TOC_DEPTH=2 -while getopts 'N:T:D:h' flag; do - case "$flag" in - N) - NAME_UC="$OPTARG" - ;; - T) - TITLE="$OPTARG" - ;; - D) - TOC_DEPTH="$OPTARG" - ;; - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - -eval "$(assert_arg "${NAME_UC:-}" '-T TITLE')" -eval "$(assert_arg "${TITLE:-}" '-T TITLE')" - -THE_LANG='en' - -ALTERNATES=/dev/null - -pandoc \ - -s \ - --toc \ - --toc-depth="$TOC_DEPTH" \ - --highlight-style=pygments \ - --metadata lang="$THE_LANG" \ - --metadata title="$TITLE - $NAME_UC" \ - -r commonmark \ - -w html \ - -H aux/workflow/head.html \ - -H "$ALTERNATES" diff --git a/aux/workflow/preamble.md.in b/aux/workflow/preamble.md.in deleted file mode 100644 index 1d17997..0000000 --- a/aux/workflow/preamble.md.in +++ /dev/null @@ -1,16 +0,0 @@ -# About - -TODOs for [@PROJECT_UC@](https://@TLD@/@PROJECT@/en/). - -Register a new one at -[@MAILING_LIST@](mailto:@MAILING_LIST@?subject=%5B@PROJECT@%5D%20BUG%20or%20TASK%3A%20%3Cdescription%3E) -and see [existing discussions](@LIST_SEARCH@). - -*Você também pode escrever em português*. - -*Vous pouvez aussi écrire en français*. - -*Vi povas ankaŭ skribi esperante*. - -*Tu también puedes escribir en español*. - diff --git a/aux/workflow/style.css b/aux/workflow/style.css deleted file mode 100644 index 4f3c83e..0000000 --- a/aux/workflow/style.css +++ /dev/null @@ -1,80 +0,0 @@ -html { - line-height: 1.5; -} - -body { - max-width: 800px; - margin: 0 auto 0 auto; -} - -hr { - background-color: #ccc; -} - -.header-anchor { - opacity: 0.5; - display: inline-block; -} - -.tag { - font-family: monospace; - font-size: 70%; - background-color: lightgray; - color: black; - padding: 3px; - border-radius: 5px; -} - -.TODO { - color: brown; -} - -.DOING { - color: yellowgreen; -} - -.WAITING, .MEETING { - color: orange; -} - -.INACTIVE { - color: gray; -} - -.NEXT { - color: red; -} - -.CANCELLED, .DONE, .WONTFIX { - color: green; -} - -pre, code { - background-color: #ddd; - border-radius: 5px; - padding: 3px; -} - -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; - } -} -- cgit v1.2.3