Files
cristhian 2009e91465 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
2026-10-28 09:53:53 -03:00

19 lines
618 B
Bash
Executable File

#!/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