chore(tooling): add docx source audit and repair helpers
This commit is contained in:
29
scripts/refresh-chapter2.sh
Executable file
29
scripts/refresh-chapter2.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
DOCX="sources/docx/archicrat-ia/Chapitre_2–Archeogenese_des_regimes_de_co-viabilite-version_officielle.docx"
|
||||
MANIFEST="sources/manifest.yml"
|
||||
ONLY="archicrat-ia/chapitre-2"
|
||||
|
||||
echo "== Audit source avant fix =="
|
||||
if ! python3 scripts/audit-docx-source.py "$DOCX"; then
|
||||
echo
|
||||
echo "== Fix source =="
|
||||
python3 scripts/fix-docx-source.py --in-place "$DOCX"
|
||||
|
||||
echo
|
||||
echo "== Audit source après fix =="
|
||||
python3 scripts/audit-docx-source.py "$DOCX"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "== Réimport =="
|
||||
node scripts/import-docx.mjs --manifest "$MANIFEST" --only "$ONLY" --force
|
||||
|
||||
echo
|
||||
echo "== Build =="
|
||||
npm run build
|
||||
|
||||
echo
|
||||
echo "== Tests =="
|
||||
npm test
|
||||
Reference in New Issue
Block a user