diff --git a/Makefile b/Makefile index d652804..952ed2c 100644 --- a/Makefile +++ b/Makefile @@ -6,53 +6,58 @@ SCRIPT=$(MAKEFILE_DIR)render_parts.php OUT_DIR=$(MAKEFILE_DIR)rendered PONIES=$(notdir $(shell find $(PONY_DIR) -maxdepth 1 -mindepth 1 -type d )) OUT_PLAIN=$(addprefix $(PONY_DIR)/,$(addsuffix .txt,$(PONIES))) -OUT_COLOR=$(addprefix $(OUT_DIR)/,$(addsuffix .colored.txt,$(PONIES))) -OUT_COLOR_IRC=$(addprefix $(OUT_DIR)/,$(addsuffix .irc.txt,$(PONIES))) -OUT_SVG=$(addprefix $(OUT_DIR)/,$(addsuffix .svg,$(PONIES))) -OUT_PNG=$(addprefix $(OUT_DIR)/,$(addsuffix .png,$(PONIES))) -OUT_BASH=$(addprefix $(OUT_DIR)/,$(addsuffix .sh,$(PONIES))) +OUT_COLOR=$(addprefix $(OUT_DIR)/ansi/,$(addsuffix .colored.txt,$(PONIES))) +OUT_COLOR_IRC=$(addprefix $(OUT_DIR)/irc/,$(addsuffix .irc.txt,$(PONIES))) +OUT_SVG=$(addprefix $(OUT_DIR)/svg/,$(addsuffix .svg,$(PONIES))) +OUT_PNG=$(addprefix $(OUT_DIR)/png/,$(addsuffix .png,$(PONIES))) +OUT_BASH=$(addprefix $(OUT_DIR)/sh/,$(addsuffix .sh,$(PONIES))) OUT_ALL= $(OUT_COLOR) $(OUT_PLAIN) $(OUT_SVG) $(OUT_PNG) $(OUT_BASH) $(OUT_COLOR_IRC) OUT_DIRS=$(sort $(dir $(OUT_ALL))) -find_deps=$(addprefix $(PONY_DIR)/,$(subst ;,\\\;,$(wildcard $(1)/*))) +find_deps=$(subst ;,\\\;,$(wildcard $(PONY_DIR)/$(1)/*)) .PHONY: show show_deps cleans list random all: $(OUT_ALL) define rule_template -$(OUT_DIR)/$(1).colored.txt: | $(dir $(OUT_DIR)/$(1)) -$(OUT_DIR)/$(1).colored.txt: $(call find_deps, $(1)) -$(OUT_DIR)/$(1).colored.txt: $(PONY_DIR)/$(1) - $(SCRIPT) $(PONY_DIR)/$(1) >$(OUT_DIR)/$(1).colored.txt +$(OUT_DIR)/ansi/$(1).colored.txt: | $(dir $(OUT_DIR)/ansi/$(1)) +$(OUT_DIR)/ansi/$(1).colored.txt: $(call find_deps, $(1)) +$(OUT_DIR)/ansi/$(1).colored.txt: $(PONY_DIR)/$(1) + $(SCRIPT) $(PONY_DIR)/$(1) >$(OUT_DIR)/ansi/$(1).colored.txt $(PONY_DIR)/$(1).txt: $(call find_deps, $(1)) $(PONY_DIR)/$(1).txt: $(PONY_DIR)/$(1) $(SCRIPT) $(PONY_DIR)/$(1) >$(PONY_DIR)/$(1).txt nocolor -$(OUT_DIR)/$(1).svg: | $(dir $(OUT_DIR)/$(1)) -$(OUT_DIR)/$(1).svg: $(call find_deps, $(1)) -$(OUT_DIR)/$(1).svg: $(PONY_DIR)/$(1) - $(SCRIPT) $(PONY_DIR)/$(1) >$(OUT_DIR)/$(1).svg svg +$(OUT_DIR)/svg/$(1).svg: | $(dir $(OUT_DIR)/svg/$(1)) +$(OUT_DIR)/svg/$(1).svg: $(call find_deps, $(1)) +$(OUT_DIR)/svg/$(1).svg: $(PONY_DIR)/$(1) + $(SCRIPT) $(PONY_DIR)/$(1) >$(OUT_DIR)/svg/$(1).svg svg -$(OUT_DIR)/$(1).sh: | $(dir $(OUT_DIR)/$(1)) -$(OUT_DIR)/$(1).sh: $(call find_deps, $(1)) -$(OUT_DIR)/$(1).sh: $(PONY_DIR)/$(1) - $(SCRIPT) $(PONY_DIR)/$(1) >$(OUT_DIR)/$(1).sh bash - chmod a+x $(OUT_DIR)/$(1).sh +$(OUT_DIR)/sh/$(1).sh: | $(dir $(OUT_DIR)/sh/$(1)) +$(OUT_DIR)/sh/$(1).sh: $(call find_deps, $(1)) +$(OUT_DIR)/sh/$(1).sh: $(PONY_DIR)/$(1) + $(SCRIPT) $(PONY_DIR)/$(1) >$(OUT_DIR)/sh/$(1).sh bash + chmod a+x $(OUT_DIR)/sh/$(1).sh -$(OUT_DIR)/$(1).irc.txt: | $(dir $(OUT_DIR)/$(1)) -$(OUT_DIR)/$(1).irc.txt: $(call find_deps, $(1)) -$(OUT_DIR)/$(1).irc.txt: $(PONY_DIR)/$(1) - $(SCRIPT) $(PONY_DIR)/$(1) >$(OUT_DIR)/$(1).irc.txt irc +$(OUT_DIR)/irc/$(1).irc.txt: | $(dir $(OUT_DIR)/irc/$(1)) +$(OUT_DIR)/irc/$(1).irc.txt: $(call find_deps, $(1)) +$(OUT_DIR)/irc/$(1).irc.txt: $(PONY_DIR)/$(1) + $(SCRIPT) $(PONY_DIR)/$(1) >$(OUT_DIR)/irc/$(1).irc.txt irc + +$(OUT_DIR)/png/$(1).png : $(dir $(OUT_DIR)/png/$(1)) +$(OUT_DIR)/png/$(1).png : $(OUT_DIR)/svg/$(1).svg + inkscape $(OUT_DIR)/svg/$(1).svg -e $(OUT_DIR)/png/$(1).png .PHONY: $(1) -$(1) : $(OUT_DIR)/$(1).colored.txt +$(1) : $(OUT_DIR)/ansi/$(1).colored.txt $(1) : $(PONY_DIR)/$(1).txt -$(1) : $(OUT_DIR)/$(1).svg -$(1) : $(OUT_DIR)/$(1).sh -$(1) : $(OUT_DIR)/$(1).irc.txt - @cat $(OUT_DIR)/$(1).colored.txt +$(1) : $(OUT_DIR)/svg/$(1).svg +$(1) : $(OUT_DIR)/sh/$(1).sh +$(1) : $(OUT_DIR)/irc/$(1).irc.txt +$(1) : $(OUT_DIR)/png/$(1).png + @cat $(OUT_DIR)/ansi/$(1).colored.txt endef define dir_rule_template @@ -60,14 +65,11 @@ $(1) : mkdir -p $(1) endef -%.png : %.svg - inkscape $*.svg -e $*.png - $(foreach pony,$(PONIES),$(eval $(call rule_template,$(pony)))) $(foreach directory,$(OUT_DIRS),$(eval $(call dir_rule_template,$(directory)))) -show: $(OUT_DIR)/$(PONY).colored.txt - @cat $(OUT_DIR)/$(PONY).colored.txt +show: $(OUT_DIR)/ansi/$(PONY).colored.txt + @cat $(OUT_DIR)/ansi/$(PONY).colored.txt show_deps: @$(foreach d,$(call find_deps,$(PONY)), echo $(d);) diff --git a/rendered/applejack-nohat.colored.txt b/rendered/ansi/applejack-nohat.colored.txt similarity index 100% rename from rendered/applejack-nohat.colored.txt rename to rendered/ansi/applejack-nohat.colored.txt diff --git a/rendered/celestia.colored.txt b/rendered/ansi/celestia.colored.txt similarity index 100% rename from rendered/celestia.colored.txt rename to rendered/ansi/celestia.colored.txt diff --git a/rendered/derpy.colored.txt b/rendered/ansi/derpy.colored.txt similarity index 100% rename from rendered/derpy.colored.txt rename to rendered/ansi/derpy.colored.txt diff --git a/rendered/fluttershy.colored.txt b/rendered/ansi/fluttershy.colored.txt similarity index 100% rename from rendered/fluttershy.colored.txt rename to rendered/ansi/fluttershy.colored.txt diff --git a/rendered/great-and-powerful.colored.txt b/rendered/ansi/great-and-powerful.colored.txt similarity index 100% rename from rendered/great-and-powerful.colored.txt rename to rendered/ansi/great-and-powerful.colored.txt diff --git a/rendered/lyra.colored.txt b/rendered/ansi/lyra.colored.txt similarity index 100% rename from rendered/lyra.colored.txt rename to rendered/ansi/lyra.colored.txt diff --git a/rendered/pinkie-pie.colored.txt b/rendered/ansi/pinkie-pie.colored.txt similarity index 100% rename from rendered/pinkie-pie.colored.txt rename to rendered/ansi/pinkie-pie.colored.txt diff --git a/rendered/rainbow-dash.colored.txt b/rendered/ansi/rainbow-dash.colored.txt similarity index 100% rename from rendered/rainbow-dash.colored.txt rename to rendered/ansi/rainbow-dash.colored.txt diff --git a/rendered/rainbow.colored.txt b/rendered/ansi/rainbow.colored.txt similarity index 100% rename from rendered/rainbow.colored.txt rename to rendered/ansi/rainbow.colored.txt diff --git a/rendered/rarity.colored.txt b/rendered/ansi/rarity.colored.txt similarity index 100% rename from rendered/rarity.colored.txt rename to rendered/ansi/rarity.colored.txt diff --git a/rendered/rose.colored.txt b/rendered/ansi/rose.colored.txt similarity index 100% rename from rendered/rose.colored.txt rename to rendered/ansi/rose.colored.txt diff --git a/rendered/trixie-hat.colored.txt b/rendered/ansi/trixie-hat.colored.txt similarity index 100% rename from rendered/trixie-hat.colored.txt rename to rendered/ansi/trixie-hat.colored.txt diff --git a/rendered/twilight-alicorn.colored.txt b/rendered/ansi/twilight-alicorn.colored.txt similarity index 100% rename from rendered/twilight-alicorn.colored.txt rename to rendered/ansi/twilight-alicorn.colored.txt diff --git a/rendered/twilight-unicorn.colored.txt b/rendered/ansi/twilight-unicorn.colored.txt similarity index 100% rename from rendered/twilight-unicorn.colored.txt rename to rendered/ansi/twilight-unicorn.colored.txt diff --git a/rendered/vinyl-scratch-glasses.colored.txt b/rendered/ansi/vinyl-scratch-glasses.colored.txt similarity index 100% rename from rendered/vinyl-scratch-glasses.colored.txt rename to rendered/ansi/vinyl-scratch-glasses.colored.txt diff --git a/rendered/vinyl-scratch-noglasses.colored.txt b/rendered/ansi/vinyl-scratch-noglasses.colored.txt similarity index 100% rename from rendered/vinyl-scratch-noglasses.colored.txt rename to rendered/ansi/vinyl-scratch-noglasses.colored.txt diff --git a/rendered/applejack-nohat.irc.txt b/rendered/irc/applejack-nohat.irc.txt similarity index 100% rename from rendered/applejack-nohat.irc.txt rename to rendered/irc/applejack-nohat.irc.txt diff --git a/rendered/celestia.irc.txt b/rendered/irc/celestia.irc.txt similarity index 100% rename from rendered/celestia.irc.txt rename to rendered/irc/celestia.irc.txt diff --git a/rendered/derpy.irc.txt b/rendered/irc/derpy.irc.txt similarity index 100% rename from rendered/derpy.irc.txt rename to rendered/irc/derpy.irc.txt diff --git a/rendered/fluttershy.irc.txt b/rendered/irc/fluttershy.irc.txt similarity index 100% rename from rendered/fluttershy.irc.txt rename to rendered/irc/fluttershy.irc.txt diff --git a/rendered/great-and-powerful.irc.txt b/rendered/irc/great-and-powerful.irc.txt similarity index 100% rename from rendered/great-and-powerful.irc.txt rename to rendered/irc/great-and-powerful.irc.txt diff --git a/rendered/lyra.irc.txt b/rendered/irc/lyra.irc.txt similarity index 100% rename from rendered/lyra.irc.txt rename to rendered/irc/lyra.irc.txt diff --git a/rendered/pinkie-pie.irc.txt b/rendered/irc/pinkie-pie.irc.txt similarity index 100% rename from rendered/pinkie-pie.irc.txt rename to rendered/irc/pinkie-pie.irc.txt diff --git a/rendered/rainbow-dash.irc.txt b/rendered/irc/rainbow-dash.irc.txt similarity index 100% rename from rendered/rainbow-dash.irc.txt rename to rendered/irc/rainbow-dash.irc.txt diff --git a/rendered/rainbow.irc.txt b/rendered/irc/rainbow.irc.txt similarity index 100% rename from rendered/rainbow.irc.txt rename to rendered/irc/rainbow.irc.txt diff --git a/rendered/rarity.irc.txt b/rendered/irc/rarity.irc.txt similarity index 100% rename from rendered/rarity.irc.txt rename to rendered/irc/rarity.irc.txt diff --git a/rendered/rose.irc.txt b/rendered/irc/rose.irc.txt similarity index 100% rename from rendered/rose.irc.txt rename to rendered/irc/rose.irc.txt diff --git a/rendered/trixie-hat.irc.txt b/rendered/irc/trixie-hat.irc.txt similarity index 100% rename from rendered/trixie-hat.irc.txt rename to rendered/irc/trixie-hat.irc.txt diff --git a/rendered/twilight-alicorn.irc.txt b/rendered/irc/twilight-alicorn.irc.txt similarity index 100% rename from rendered/twilight-alicorn.irc.txt rename to rendered/irc/twilight-alicorn.irc.txt diff --git a/rendered/twilight-unicorn.irc.txt b/rendered/irc/twilight-unicorn.irc.txt similarity index 100% rename from rendered/twilight-unicorn.irc.txt rename to rendered/irc/twilight-unicorn.irc.txt diff --git a/rendered/vinyl-scratch-glasses.irc.txt b/rendered/irc/vinyl-scratch-glasses.irc.txt similarity index 100% rename from rendered/vinyl-scratch-glasses.irc.txt rename to rendered/irc/vinyl-scratch-glasses.irc.txt diff --git a/rendered/vinyl-scratch-noglasses.irc.txt b/rendered/irc/vinyl-scratch-noglasses.irc.txt similarity index 100% rename from rendered/vinyl-scratch-noglasses.irc.txt rename to rendered/irc/vinyl-scratch-noglasses.irc.txt diff --git a/rendered/applejack-nohat.png b/rendered/png/applejack-nohat.png similarity index 100% rename from rendered/applejack-nohat.png rename to rendered/png/applejack-nohat.png diff --git a/rendered/celestia.png b/rendered/png/celestia.png similarity index 100% rename from rendered/celestia.png rename to rendered/png/celestia.png diff --git a/rendered/derpy.png b/rendered/png/derpy.png similarity index 100% rename from rendered/derpy.png rename to rendered/png/derpy.png diff --git a/rendered/fluttershy.png b/rendered/png/fluttershy.png similarity index 100% rename from rendered/fluttershy.png rename to rendered/png/fluttershy.png diff --git a/rendered/great-and-powerful.png b/rendered/png/great-and-powerful.png similarity index 100% rename from rendered/great-and-powerful.png rename to rendered/png/great-and-powerful.png diff --git a/rendered/lyra.png b/rendered/png/lyra.png similarity index 100% rename from rendered/lyra.png rename to rendered/png/lyra.png diff --git a/rendered/pinkie-pie.png b/rendered/png/pinkie-pie.png similarity index 100% rename from rendered/pinkie-pie.png rename to rendered/png/pinkie-pie.png diff --git a/rendered/rainbow-dash.png b/rendered/png/rainbow-dash.png similarity index 100% rename from rendered/rainbow-dash.png rename to rendered/png/rainbow-dash.png diff --git a/rendered/rainbow.png b/rendered/png/rainbow.png similarity index 100% rename from rendered/rainbow.png rename to rendered/png/rainbow.png diff --git a/rendered/rarity.png b/rendered/png/rarity.png similarity index 100% rename from rendered/rarity.png rename to rendered/png/rarity.png diff --git a/rendered/rose.png b/rendered/png/rose.png similarity index 100% rename from rendered/rose.png rename to rendered/png/rose.png diff --git a/rendered/trixie-hat.png b/rendered/png/trixie-hat.png similarity index 100% rename from rendered/trixie-hat.png rename to rendered/png/trixie-hat.png diff --git a/rendered/twilight-alicorn.png b/rendered/png/twilight-alicorn.png similarity index 100% rename from rendered/twilight-alicorn.png rename to rendered/png/twilight-alicorn.png diff --git a/rendered/twilight-unicorn.png b/rendered/png/twilight-unicorn.png similarity index 100% rename from rendered/twilight-unicorn.png rename to rendered/png/twilight-unicorn.png diff --git a/rendered/png/vinyl-scratch-glasses.png b/rendered/png/vinyl-scratch-glasses.png new file mode 100644 index 0000000..6bcec2d Binary files /dev/null and b/rendered/png/vinyl-scratch-glasses.png differ diff --git a/rendered/png/vinyl-scratch-noglasses.png b/rendered/png/vinyl-scratch-noglasses.png new file mode 100644 index 0000000..2d3aa38 Binary files /dev/null and b/rendered/png/vinyl-scratch-noglasses.png differ diff --git a/rendered/applejack-nohat.sh b/rendered/sh/applejack-nohat.sh similarity index 100% rename from rendered/applejack-nohat.sh rename to rendered/sh/applejack-nohat.sh diff --git a/rendered/celestia.sh b/rendered/sh/celestia.sh similarity index 100% rename from rendered/celestia.sh rename to rendered/sh/celestia.sh diff --git a/rendered/derpy.sh b/rendered/sh/derpy.sh similarity index 100% rename from rendered/derpy.sh rename to rendered/sh/derpy.sh diff --git a/rendered/fluttershy.sh b/rendered/sh/fluttershy.sh similarity index 100% rename from rendered/fluttershy.sh rename to rendered/sh/fluttershy.sh diff --git a/rendered/great-and-powerful.sh b/rendered/sh/great-and-powerful.sh similarity index 100% rename from rendered/great-and-powerful.sh rename to rendered/sh/great-and-powerful.sh diff --git a/rendered/lyra.sh b/rendered/sh/lyra.sh similarity index 100% rename from rendered/lyra.sh rename to rendered/sh/lyra.sh diff --git a/rendered/pinkie-pie.sh b/rendered/sh/pinkie-pie.sh similarity index 100% rename from rendered/pinkie-pie.sh rename to rendered/sh/pinkie-pie.sh diff --git a/rendered/rainbow-dash.sh b/rendered/sh/rainbow-dash.sh similarity index 100% rename from rendered/rainbow-dash.sh rename to rendered/sh/rainbow-dash.sh diff --git a/rendered/rainbow.sh b/rendered/sh/rainbow.sh similarity index 100% rename from rendered/rainbow.sh rename to rendered/sh/rainbow.sh diff --git a/rendered/rarity.sh b/rendered/sh/rarity.sh similarity index 100% rename from rendered/rarity.sh rename to rendered/sh/rarity.sh diff --git a/rendered/rose.sh b/rendered/sh/rose.sh similarity index 100% rename from rendered/rose.sh rename to rendered/sh/rose.sh diff --git a/rendered/trixie-hat.sh b/rendered/sh/trixie-hat.sh similarity index 100% rename from rendered/trixie-hat.sh rename to rendered/sh/trixie-hat.sh diff --git a/rendered/twilight-alicorn.sh b/rendered/sh/twilight-alicorn.sh similarity index 100% rename from rendered/twilight-alicorn.sh rename to rendered/sh/twilight-alicorn.sh diff --git a/rendered/twilight-unicorn.sh b/rendered/sh/twilight-unicorn.sh similarity index 100% rename from rendered/twilight-unicorn.sh rename to rendered/sh/twilight-unicorn.sh diff --git a/rendered/vinyl-scratch-glasses.sh b/rendered/sh/vinyl-scratch-glasses.sh similarity index 100% rename from rendered/vinyl-scratch-glasses.sh rename to rendered/sh/vinyl-scratch-glasses.sh diff --git a/rendered/vinyl-scratch-noglasses.sh b/rendered/sh/vinyl-scratch-noglasses.sh similarity index 100% rename from rendered/vinyl-scratch-noglasses.sh rename to rendered/sh/vinyl-scratch-noglasses.sh diff --git a/rendered/applejack-nohat.svg b/rendered/svg/applejack-nohat.svg similarity index 100% rename from rendered/applejack-nohat.svg rename to rendered/svg/applejack-nohat.svg diff --git a/rendered/celestia.svg b/rendered/svg/celestia.svg similarity index 100% rename from rendered/celestia.svg rename to rendered/svg/celestia.svg diff --git a/rendered/derpy.svg b/rendered/svg/derpy.svg similarity index 100% rename from rendered/derpy.svg rename to rendered/svg/derpy.svg diff --git a/rendered/fluttershy.svg b/rendered/svg/fluttershy.svg similarity index 100% rename from rendered/fluttershy.svg rename to rendered/svg/fluttershy.svg diff --git a/rendered/great-and-powerful.svg b/rendered/svg/great-and-powerful.svg similarity index 100% rename from rendered/great-and-powerful.svg rename to rendered/svg/great-and-powerful.svg diff --git a/rendered/lyra.svg b/rendered/svg/lyra.svg similarity index 100% rename from rendered/lyra.svg rename to rendered/svg/lyra.svg diff --git a/rendered/pinkie-pie.svg b/rendered/svg/pinkie-pie.svg similarity index 100% rename from rendered/pinkie-pie.svg rename to rendered/svg/pinkie-pie.svg diff --git a/rendered/rainbow-dash.svg b/rendered/svg/rainbow-dash.svg similarity index 100% rename from rendered/rainbow-dash.svg rename to rendered/svg/rainbow-dash.svg diff --git a/rendered/rainbow.svg b/rendered/svg/rainbow.svg similarity index 100% rename from rendered/rainbow.svg rename to rendered/svg/rainbow.svg diff --git a/rendered/rarity.svg b/rendered/svg/rarity.svg similarity index 100% rename from rendered/rarity.svg rename to rendered/svg/rarity.svg diff --git a/rendered/rose.svg b/rendered/svg/rose.svg similarity index 100% rename from rendered/rose.svg rename to rendered/svg/rose.svg diff --git a/rendered/trixie-hat.svg b/rendered/svg/trixie-hat.svg similarity index 100% rename from rendered/trixie-hat.svg rename to rendered/svg/trixie-hat.svg diff --git a/rendered/twilight-alicorn.svg b/rendered/svg/twilight-alicorn.svg similarity index 100% rename from rendered/twilight-alicorn.svg rename to rendered/svg/twilight-alicorn.svg diff --git a/rendered/twilight-unicorn.svg b/rendered/svg/twilight-unicorn.svg similarity index 100% rename from rendered/twilight-unicorn.svg rename to rendered/svg/twilight-unicorn.svg diff --git a/rendered/vinyl-scratch-glasses.svg b/rendered/svg/vinyl-scratch-glasses.svg similarity index 100% rename from rendered/vinyl-scratch-glasses.svg rename to rendered/svg/vinyl-scratch-glasses.svg diff --git a/rendered/vinyl-scratch-noglasses.svg b/rendered/svg/vinyl-scratch-noglasses.svg similarity index 100% rename from rendered/vinyl-scratch-noglasses.svg rename to rendered/svg/vinyl-scratch-noglasses.svg diff --git a/rendered/vinyl-scratch-glasses.png b/rendered/vinyl-scratch-glasses.png deleted file mode 100644 index 0d11a96..0000000 Binary files a/rendered/vinyl-scratch-glasses.png and /dev/null differ diff --git a/rendered/vinyl-scratch-noglasses.png b/rendered/vinyl-scratch-noglasses.png deleted file mode 100644 index bf3d02c..0000000 Binary files a/rendered/vinyl-scratch-noglasses.png and /dev/null differ