feat(reports): PDF build infrastructure — premium WeasyPrint template
- report.css: full-bleed navy cover, Padelnomics logo watermark at 3.5% opacity (position:fixed, repeats every page), gold/teal accents, Georgia headings, running headers via CSS named strings, metric boxes, insight-box - report.html: Jinja2 template with cover stats, TOC, body, disclaimer - build_report_pdf.py: builds EN+DE PDFs from data/content/reports/*.md (WeasyPrint, mistune, PyYAML; reads logo as file:// URI for watermark) - Makefile: report-pdf target Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
6
Makefile
6
Makefile
@@ -2,7 +2,7 @@ TAILWIND_VERSION := v4.1.18
|
||||
TAILWIND := ./bin/tailwindcss
|
||||
SOPS_DOTENV := sops --input-type dotenv --output-type dotenv
|
||||
|
||||
.PHONY: help dev init-landing-seeds css-build css-watch \
|
||||
.PHONY: help dev init-landing-seeds css-build css-watch report-pdf \
|
||||
secrets-decrypt-dev secrets-decrypt-prod \
|
||||
secrets-edit-dev secrets-edit-prod \
|
||||
secrets-encrypt-dev secrets-encrypt-prod
|
||||
@@ -13,6 +13,7 @@ help:
|
||||
@echo " init-landing-seeds Create seed landing files for SQLMesh (run once after clone)"
|
||||
@echo " css-build Build + minify Tailwind CSS"
|
||||
@echo " css-watch Watch + rebuild Tailwind CSS"
|
||||
@echo " report-pdf Build market intelligence report PDFs (WeasyPrint)"
|
||||
@echo " secrets-decrypt-dev Decrypt .env.dev.sops → .env"
|
||||
@echo " secrets-decrypt-prod Decrypt .env.prod.sops → .env"
|
||||
@echo " secrets-edit-dev Edit .env.dev.sops in \$$EDITOR"
|
||||
@@ -45,6 +46,9 @@ css-build: bin/tailwindcss
|
||||
css-watch: bin/tailwindcss
|
||||
$(TAILWIND) -i web/src/padelnomics/static/css/input.css -o web/src/padelnomics/static/css/output.css --watch
|
||||
|
||||
report-pdf:
|
||||
uv run python web/scripts/build_report_pdf.py
|
||||
|
||||
# ── Secrets (SOPS + age) ─────────────────────────────────────────────────────
|
||||
# Requires: sops (https://github.com/getsops/sops) + age (https://github.com/FiloSottile/age)
|
||||
# Keys config: .sops.yaml
|
||||
|
||||
Reference in New Issue
Block a user