refactor: migrar reportes a Typst con plantilla compartida y scripts
- Reemplazar plantillas Markdown por template/report.typ y template/main.typ - Agregar primer reporte: respuesta-observaciones-avance-1 - Agregar scripts build.sh, preview.sh y common.sh con salida en pdf/ - Actualizar README y AGENTS.md; simplificar .gitignore
This commit is contained in:
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$(dirname -- "${BASH_SOURCE[0]}")/common.sh"
|
||||
if [[ "$force" == true ]]; then
|
||||
require_typst
|
||||
mkdir -p -- "$repo_root/pdf"
|
||||
exec typst watch --root "$repo_root" "$input" "$output" --open
|
||||
fi
|
||||
build_pdf
|
||||
# Use an absolute path so the viewer also handles names starting with a dash.
|
||||
pdf_path="$(cd -- "$(dirname -- "$output")" && pwd)/$(basename -- "$output")"
|
||||
if command -v xdg-open >/dev/null 2>&1; then
|
||||
exec xdg-open "$pdf_path"
|
||||
elif command -v open >/dev/null 2>&1; then
|
||||
exec open "$pdf_path"
|
||||
else
|
||||
echo "Error: no PDF opener found (xdg-open or open). PDF: $pdf_path" >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user