summaryrefslogtreecommitdiff
path: root/aux/workflow/commonmark.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-11-17 19:58:51 -0300
committerEuAndreh <eu@euandre.org>2024-11-17 19:58:51 -0300
commitff8f00b960f00f1db0bd7dc04de6c69cabc65f88 (patch)
treedd272ed8905fb70eb39300427936ee103726a0f5 /aux/workflow/commonmark.sh
parentrm src/bin/pb (diff)
downloadeuandre.org-ff8f00b960f00f1db0bd7dc04de6c69cabc65f88.tar.gz
euandre.org-ff8f00b960f00f1db0bd7dc04de6c69cabc65f88.tar.xz
rm -rf aux/
Diffstat (limited to '')
-rwxr-xr-xaux/workflow/commonmark.sh48
1 files changed, 0 insertions, 48 deletions
diff --git a/aux/workflow/commonmark.sh b/aux/workflow/commonmark.sh
deleted file mode 100755
index 088d447..0000000
--- a/aux/workflow/commonmark.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-set -eu
-
-while getopts 'N:t:l:H:' flag; do
- case "$flag" in
- N)
- PROJECT_UC="$OPTARG"
- ;;
- t)
- TITLE="$OPTARG"
- ;;
- l)
- THE_LANG="$OPTARG"
- ;;
- H)
- ALTERNATES="$OPTARG"
- ;;
- *)
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-assert_arg() {
- if [ -z "$1" ]; then
- echo "Missing $2" >&2
- exit 2
- fi
-}
-
-assert_arg "${PROJECT_UC:-}" '-N PROJECT_UC'
-assert_arg "${TITLE:-}" '-t TITLE'
-assert_arg "${THE_LANG:-}" '-l THE_LANG'
-assert_arg "${ALTERNATES:-}" '-H ALTERNATES'
-
-pandoc \
- --toc \
- --highlight-style pygments \
- --toc-depth=2 \
- -s \
- --metadata title="$PROJECT_UC - $TITLE" \
- --metadata "lang=$THE_LANG" \
- -r commonmark \
- -w html \
- -H aux/workflow/favicon.html \
- -H aux/workflow/style.css \
- -H "$ALTERNATES"