chore: QA-Skripte nach tools/qa übernommen
Die Werkzeuge der QA-Runden lagen nur im ignorierten .qa/: CLI-Matrix (89 Fälle), Fixture-Generator, unabhängiger Markdown-Validator, Wortvergleich gegen Datenverlust, Pandoc-Prüfung (HTML, EPUB, PDF). Jetzt versioniert in tools/qa/ mit README und requirements.txt; erzeugte Daten landen weiterhin in .qa/. Pfade auf die neue Lage angepasst (Repo-Wurzel über parents[2], aufrufender Python-Interpreter). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
57d485baa3
commit
01f60a41c4
1 changed files with 1210 additions and 2 deletions
15
tools/qa/pandoc_pdfs.sh
Executable file
15
tools/qa/pandoc_pdfs.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
# Erzeugt beide PDF-Varianten aus der Buch-README unter getrennten Namen: *.weasy.pdf und *.latex.pdf
|
||||
# (in der README schreiben beide Befehle dieselbe Datei). Aufruf im Repo-Wurzelverzeichnis.
|
||||
mkdir -p .qa
|
||||
for dir in "$@"; do
|
||||
mkdir -p "$dir/pandoc-logs"
|
||||
grep -E '^pandoc .*\.pdf' "$dir/README.md" | while IFS= read -r cmd; do
|
||||
case "$cmd" in *weasyprint*) kind=weasy;; *) kind=latex;; esac
|
||||
cmd=$(printf '%s' "$cmd" | sed -E "s/\.pdf('?)\$/.$kind.pdf\1/")
|
||||
s=$(date +%s)
|
||||
(cd "$dir" && timeout 1800 bash -c "$cmd") > "$dir/pandoc-logs/$kind.out" 2> "$dir/pandoc-logs/$kind.err"; rc=$?
|
||||
printf '%s\t%s\trc=%s\t%ss\n' "$(basename "$dir")" $kind $rc $(( $(date +%s)-s ))
|
||||
printf '%s\trc=%s\tpandoc %s-PDF (%s)\n' "$(date -Iseconds)" $rc $kind "$(basename "$dir")" >> .qa/commands.log
|
||||
done
|
||||
done
|
||||
Loading…
Reference in a new issue