1
0

more robust and future-proof architecture

This commit is contained in:
Ninjananas
2024-09-03 20:05:42 +02:00
parent 7bdea04111
commit 677906b5a7
18 changed files with 416 additions and 84 deletions

View File

@@ -1,9 +1,56 @@
all: deck.rb cards.xlsx ._graphics_compute_touch layout.yml config.yml
rake
common_deps := src/deck.rb data/cards.xlsx ._graphics_copy_touch ._graphics_extract_touch config.yml ._layouts/poker.yml
._graphics_compute_touch: graphics.svg
python extract.py
touch ._graphics_compute_touch
pnp := _output/pnp_A4.pdf
debug := _output/debug.pdf
showcase := _output/hand.png
full := _output/full/front/card_00.png
layout.yml: compute_layout.py
python compute_layout.py
.PHONY: all
all: $(pnp) $(debug) $(showcase) $(full)
.PHONY: pnp
pnp: $(pnp)
.PHONY: debug
debug: $(debug)
.PHONY: showcase
showcase: $(showcase)
.PHONY: full
full: $(full)
.PHONY: clean
clean:
rake clean
rm -r _output/*
rm -r ._layouts
rm -r ._graphics
rm ._graphics_copy_touch ._graphics_extract_touch
$(pnp): $(common_deps)
rake pnp
$(debug): $(common_deps)
rake debug
$(showcase): $(common_deps)
rake showcase
$(full): $(common_deps)
rake full
._graphics_extract_touch: $(wildcard graphics/bundled/*)
@ mkdir -p ._graphics
python scripts/extract_graphics.py $^
@ touch ._graphics_extract_touch
._graphics_copy_touch: $(wildcard graphics/stand-alone/*)
@ mkdir -p ._graphics
cp $^ ./._graphics/
@ touch ._graphics_copy_touch
._layouts/poker.yml: scripts/generate_layouts.py
python scripts/generate_layouts.py