docs(ui): update help assets and regenerate help pdf
This commit is contained in:
19
scripts/build_help_pdf.sh
Executable file
19
scripts/build_help_pdf.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env sh
|
||||
# Build docs/help.pdf from docs/help.md.
|
||||
# Requires: pandoc, chromium (headless print-to-PDF).
|
||||
set -eu
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
# HTML next to docs/help.md so relative image paths (e.g. images/help/*.svg) resolve.
|
||||
HTML="$ROOT/docs/.help-print.html"
|
||||
trap 'rm -f "$HTML"' EXIT
|
||||
|
||||
pandoc "$ROOT/docs/help.md" -s \
|
||||
--css="$ROOT/scripts/help-pdf.css" \
|
||||
--metadata title="LED controller — user guide" \
|
||||
-o "$HTML"
|
||||
|
||||
chromium --headless --no-sandbox --disable-gpu \
|
||||
--print-to-pdf="$ROOT/docs/help.pdf" \
|
||||
"file://${HTML}"
|
||||
|
||||
echo "Wrote $ROOT/docs/help.pdf ($(wc -c < "$ROOT/docs/help.pdf") bytes)"
|
||||
Reference in New Issue
Block a user