Build system for compiling The Testament chapters into distributable formats. Files added: - build/build.py — Compilation script (markdown combine, PDF, EPUB) - build/metadata.yaml — Pandoc metadata (title, author, formatting) - build/frontmatter.md — Title page, dedication, chapter guide - build/backmatter.md — Acknowledgments, sovereignty note, about author - build/output/the-testament.epub — Pre-built EPUB (10 chapters) - Makefile — `make all`, `make pdf`, `make epub`, `make md` - .gitignore — Build artifacts Features: - Combines 10 chapters into single manuscript - Generates print-ready PDF (requires xelatex) - Generates EPUB for e-readers - Part dividers and chapter guide table - Proper front/back matter - Zero external dependencies (uses stdlib + pandoc) Usage: python3 build/build.py # All formats python3 build/build.py --pdf # PDF only python3 build/build.py --epub # EPUB only python3 build/build.py --md # Combined markdown only
26 lines
448 B
Makefile
26 lines
448 B
Makefile
# The Testament — Build System
|
|
# Requires: pandoc, texlive-xetex (or mactex on macOS)
|
|
|
|
.PHONY: all pdf epub md clean
|
|
|
|
all: md pdf epub
|
|
|
|
md:
|
|
python3 build/build.py --md
|
|
|
|
pdf:
|
|
python3 build/build.py --pdf
|
|
|
|
epub:
|
|
python3 build/build.py --epub
|
|
|
|
clean:
|
|
rm -rf build/output build/the-testament-full.md
|
|
|
|
watch:
|
|
@echo "Watching for changes..."
|
|
@while true; do \
|
|
inotifywait -q -e modify chapters/*.md 2>/dev/null || sleep 5; \
|
|
make md; \
|
|
done
|