Files
Support-Agent/.claude/skills/presentation/compiler.sh
T
maximeandClaude Opus 5.5 85e590762b Presentations for the client: Sandouville, no data-gap slide, settlements in corr_y (D-127)
The three October decks (BREITHORN, MICHIGAN, NEBRASKA) no longer criticise
the system: facts and their external cause only. Figures redrawn in corr_y
(figure-y.py), BREITHORN parallax kept. Sources and PDFs named after the
station; the charter's draft stamp reads "Sandouville".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:36:25 +01:00

21 lines
1.1 KiB
Bash

#!/usr/bin/env bash
# Compile la présentation d'un dossier support/ (<station>.typ et ses images) avec la fabrique Typst AIMsight,
# puis remet le PDF à côté du rapport, en <station>.pdf (nom de la station en minuscules).
# Usage, depuis la racine du dépôt : bash .claude/skills/presentation/compiler.sh support/<dossier>
set -euo pipefail
dossier=$(realpath "$1")
F=${FABRIQUE:-$HOME/docfactory-presentation}
racine=$(cd "$(dirname "$0")/../../.." && pwd)
# brand/ à la racine du dépôt, lien vers la charte de la fabrique : le source se compile aussi sur place (VS Code, Tinymist)
[ -e "$racine/brand" ] || ln -s "$F/brand" "$racine/brand"
station=$(basename "$dossier" | cut -d_ -f2) # <date>_<STATION>_rapport-situation
nom=$(echo "$station" | tr '[:upper:]' '[:lower:]')
slug=$nom-situation
mkdir -p "$F/documents/$slug"
cp "$dossier/$nom.typ" "$F/documents/$slug/main.typ"
cp "$dossier"/*.png "$F/documents/$slug/"
(cd "$F" && python3 brand/tools/build.py "$slug")
cp "$F/build/$slug-draft.pdf" "$dossier/$nom.pdf"
n=$(pdftotext "$dossier/$nom.pdf" - | grep -c Overflow || true)
echo "$dossier/$nom.pdf : $n diapositive(s) qui débordent"