The script copies the source and the folder's images into the AIMsight Typst factory, builds, puts the PDF back as presentation.pdf and reports overflowing slides. run.md: how the user edits and compiles a presentation. Skill /presentation, D-114 and CLAUDE.md updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
944 B
Bash
17 lines
944 B
Bash
#!/usr/bin/env bash
|
|
# Compile la présentation d'un dossier support/ (presentation.typ et ses images) avec la fabrique Typst AIMsight,
|
|
# puis remet le PDF à côté du rapport, en presentation.pdf.
|
|
# 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}
|
|
station=$(basename "$dossier" | cut -d_ -f2) # <date>_<STATION>_rapport-situation
|
|
slug=$(echo "$station" | tr '[:upper:]' '[:lower:]')-situation
|
|
mkdir -p "$F/documents/$slug/images"
|
|
cp "$dossier/presentation.typ" "$F/documents/$slug/main.typ"
|
|
cp "$dossier"/*.png "$F/documents/$slug/images/"
|
|
(cd "$F" && python3 brand/tools/build.py "$slug")
|
|
cp "$F/build/$slug-draft.pdf" "$dossier/presentation.pdf"
|
|
n=$(pdftotext "$dossier/presentation.pdf" - | grep -c Overflow || true)
|
|
echo "$dossier/presentation.pdf : $n diapositive(s) qui débordent"
|