RPGs3_card_insanity/Makefile

35 lines
587 B
Makefile

out.html: card.yaml build/card.xls style.html.j2 style.css
xsltproc \
--output out.html \
style.html.j2 \
build/card.xls
define TMP_PYTHON_PROG
from jinja2 import Environment, FileSystemLoader
with open("card.yaml") as f:
data = f.read()
out = Environment(
loader=FileSystemLoader('templates'))\
.get_template('card.xml.j2')\
.render(data=data)
#print(out)
with open("build/card.xls", "w") as f:
f.write(data)
endef
export TMP_PYTHON_PROG
build/card.xls:
python -c "$$TMP_PYTHON_PROG"
.PHONY: clean
clean:
rm build/* out.html