aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 20 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c0e27be..38d5151 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ OPTIN_HOOKS := hooks/destructive-bash-confirm.py
DEFAULT_HOOKS := $(filter-out $(OPTIN_HOOKS),$(HOOKS))
CLAUDE_CONFIG := $(wildcard .claude/*.json) $(wildcard .claude/.*.json)
LANGUAGES := $(notdir $(wildcard languages/*))
+PDFTOOLS_VENV ?= $(HOME)/.local/venvs/pdftools
# LANG is also the standard POSIX locale env var. Make inherits env vars into
# its variable namespace, so $(LANG) would silently expand to "en_US.UTF-8" (or
@@ -74,7 +75,7 @@ help: ## Show this help
##@ Dependencies
-deps: ## Install required tools (claude, node, jq, fzf, ripgrep, emacs, playwright)
+deps: ## Install required tools (claude, node, jq, fzf, ripgrep, emacs, playwright, pdftools)
@echo "Checking dependencies..."
@command -v claude >/dev/null 2>&1 && echo " claude: installed" || \
{ echo " claude: installing via npm..."; npm install -g @anthropic-ai/claude-code; }
@@ -99,6 +100,24 @@ deps: ## Install required tools (claude, node, jq, fzf, ripgrep, emacs, playwrig
&& uv run --quiet --with textstat python -c "" >/dev/null 2>&1 \
&& echo " textstat: cached (scripts/readability)" \
|| echo " textstat: skipped (uv missing or offline)"
+ @# pdftools: poppler (pdftoppm for coordinate-finding) plus a venv with
+ @# pypdf/reportlab/pillow for overlay/stamp edits on flattened PDFs —
+ @# the use case is court forms and the like with no AcroForm fields.
+ @command -v pdftoppm >/dev/null 2>&1 && echo " poppler: installed" || { \
+ echo " poppler: installing..."; \
+ if command -v brew >/dev/null 2>&1; then brew install poppler; \
+ elif command -v apt-get >/dev/null 2>&1; then sudo apt-get install -y poppler-utils; \
+ elif command -v pacman >/dev/null 2>&1; then sudo pacman -S --noconfirm poppler; \
+ else echo " poppler: ERROR — no supported package manager (brew/apt-get/pacman)"; exit 1; \
+ fi; \
+ }
+ @if [ -d "$(PDFTOOLS_VENV)" ]; then \
+ echo " pdftools: installed ($(PDFTOOLS_VENV))"; \
+ else \
+ echo " pdftools: creating venv + installing pypdf/reportlab/pillow..."; \
+ python3 -m venv "$(PDFTOOLS_VENV)"; \
+ "$(PDFTOOLS_VENV)/bin/pip" install --quiet --upgrade pip pypdf reportlab pillow; \
+ fi
@if [ -d "$(CURDIR)/playwright-js" ]; then \
if [ -d "$(CURDIR)/playwright-js/node_modules/playwright" ]; then \
echo " playwright (js): installed (skill node_modules present)"; \