www = ~/working/object-publish/pirates

# Data generation variables
LETTERS    := a b c d e f g h i j k l m n o p q r s t u v w x y z
DATA_FILES := $(patsubst %,www/data/%-insults.js,$(LETTERS))
VOCAB_FILE := vocabulary/pirates.yml

local: data
	@$(MAKE) -C www

.PHONY: data
data: $(DATA_FILES)

www/data/%-insults.js: insults.py $(VOCAB_FILE)
	python3 insults.py --web --vocab $(VOCAB_FILE) 2000 > $@

serve:
	serve $(PWD)/www

sync:
	rsync -hav --delete $(www)/ aspen:/mnt/ssd/hosts/web/pirates/
