commit: @ git add -v -- $(shell git ls-files -dmo site/ links/ media/ src/inc/ | fzf -m) @ git commit -m "% update site" -esS edit: @ ${EDITOR} src/inc/$(shell pushd src/inc >/dev/null && git ls-files -c . | fzf -m --bind=ctrl-c:accept-or-print-query) change: @ ${MAKE} edit @ ${MAKE} gen @ ${MAKE} commit .PHONY: commit edit change IN ?= OUT ?= SCALE ?= x400 compress: # => https://kokorobot.ca/site/image_optimization.html magick $(IN) \ -sampling-factor 4:2:0 \ -strip \ -quality 85 \ -interlace line \ -scale $(SCALE) \ $(OUT) # -colorspace sRGB \ dither: # => https://legacy.imagemagick.org/Usage/quantize/#ordered-dither magick $(IN) \ -sampling-factor 4:2:0 \ -strip \ -quality 85 \ -interlace line \ -ordered-dither o3x3 \ -scale $(SCALE) \ $(OUT) # -colorspace Gray \ .PHONY: compress dither