# Git Hooks This directory contains Git hooks for the CV project. ## Installation To install the hooks, run: ```bash .githooks/install-hooks.sh ``` Or, configure Git to use this directory for hooks (Git 2.9+): ```bash git config core.hooksPath .githooks ``` ## Available Hooks ### pre-commit Automatically compiles LaTeX files and generates WebP preview image. **Requirements:** - `pdflatex` (from TeX Live or similar LaTeX distribution) - `pdftoppm` (from poppler-utils) - `magick` (ImageMagick) The hook will: 1. Compile `cv.tex` and `cv_de.tex` to PDF if they've been modified or staged 2. Convert the first page of `cv.pdf` to a WebP image 3. Save it as `img/cv.webp` 4. Add the generated image to the commit ### post-push Automatically syncs compiled PDFs to bocken.org after pushing. **Requirements:** - `rsync` - SSH access to `root@bocken.org` The hook will: 1. Upload `cv.pdf` to `root@bocken.org:/var/www/static/` 2. Upload `cv_de.pdf` to `root@bocken.org:/var/www/static/` (if exists)