- build.py: Added weasyprint fallback for PDF when xelatex unavailable - build.py: Added --html flag for standalone pandoc HTML book output - book-style.css: Added @media print rules for browser Print-to-PDF - Makefile: Added 'html' target and weasyprint check to 'make check' - website/index.html: Added HTML download link and Print to PDF option - Regenerated testament-complete.md, testament.epub, testament.html
29 lines
775 B
Makefile
29 lines
775 B
Makefile
# THE TESTAMENT — Build System
|
|
# Usage: make all | make pdf | make epub | make html | make md | make clean
|
|
|
|
.PHONY: all pdf epub html md clean check
|
|
|
|
all: md epub html
|
|
|
|
md:
|
|
python3 build/build.py --md
|
|
|
|
epub: md
|
|
python3 build/build.py --epub
|
|
|
|
pdf: md
|
|
python3 build/build.py --pdf
|
|
|
|
html: md
|
|
python3 build/build.py --html
|
|
|
|
clean:
|
|
rm -f testament-complete.md
|
|
rm -f build/output/*.epub build/output/*.pdf
|
|
rm -f testament.epub testament.html testament.pdf
|
|
|
|
check:
|
|
@which pandoc >/dev/null 2>&1 && echo "✓ pandoc" || echo "✗ pandoc (brew install pandoc)"
|
|
@which xelatex >/dev/null 2>&1 && echo "✓ xelatex" || echo "✗ xelatex (install MacTeX)"
|
|
@python3 -c "import weasyprint" 2>/dev/null && echo "✓ weasyprint" || echo "— weasyprint (optional, PDF fallback)"
|