automate inkscape
This commit is contained in:
parent
6b995248a3
commit
ea6cb36fc4
3 changed files with 25 additions and 8 deletions
27
Makefile
27
Makefile
|
@ -12,12 +12,18 @@ MAKEPAGES = $(TMPDIR)/make-pages
|
||||||
YAMLS != find $(DATADIR) -name $(INFONAME)
|
YAMLS != find $(DATADIR) -name $(INFONAME)
|
||||||
|
|
||||||
SCRIPTS := $(wildcard script/*.js)
|
SCRIPTS := $(wildcard script/*.js)
|
||||||
STYLES := $(wildcard style/*.css style/*.png)
|
|
||||||
|
STYLES := $(wildcard style/*.css)
|
||||||
|
STYLESVGS = $(wildcard style/*.svg)
|
||||||
|
STYLEPNGS = $(wildcard style/*.png) \
|
||||||
|
$(STYLESVGS:.svg=.png) $(STYLESVGS:.svg=_small.png)
|
||||||
|
|
||||||
FONTS := $(shell find fonts \
|
FONTS := $(shell find fonts \
|
||||||
-iname '*.eot' -or -iname '*.svg' -or \
|
-iname '*.eot' -or -iname '*.svg' -or \
|
||||||
-iname '*.ttf' -or -iname '*.woff' -or \
|
-iname '*.ttf' -or -iname '*.woff' -or \
|
||||||
-iname '*.woff2' -or -iname '*.css')
|
-iname '*.woff2' -or -iname '*.css')
|
||||||
STATIC := $(SCRIPTS) $(STYLES) $(FONTS)
|
|
||||||
|
STATIC := $(SCRIPTS) $(STYLES) $(STYLEPNGS) $(STYLESVGS) $(FONTS)
|
||||||
BSTATIC := $(patsubst %,$(BUILDDIR)/%,$(STATIC))
|
BSTATIC := $(patsubst %,$(BUILDDIR)/%,$(STATIC))
|
||||||
|
|
||||||
all: make-pages $(BUILDDIR)/index.html $(BSTATIC)
|
all: make-pages $(BUILDDIR)/index.html $(BSTATIC)
|
||||||
|
@ -27,6 +33,23 @@ $(BUILDDIR)/%: %
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
|
$(BUILDDIR)/%: $(TMPDIR)/%
|
||||||
|
echo "[copy] "$@
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
|
define inkscape =
|
||||||
|
echo "[svg] "$@
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
inkscape $< -e $@ -w $(1) >/dev/null
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(TMPDIR)/%.png: %.svg
|
||||||
|
$(call inkscape,32)
|
||||||
|
|
||||||
|
$(TMPDIR)/%_small.png: %.svg
|
||||||
|
$(call inkscape,16)
|
||||||
|
|
||||||
$(BUILDDIR)/index.html: $(DATADIR)/galleries.yaml $(MAKEPAGES)
|
$(BUILDDIR)/index.html: $(DATADIR)/galleries.yaml $(MAKEPAGES)
|
||||||
echo "[index]"
|
echo "[index]"
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
|
|
BIN
style/18_plus.png
(Stored with Git LFS)
BIN
style/18_plus.png
(Stored with Git LFS)
Binary file not shown.
BIN
style/18_plus_small.png
(Stored with Git LFS)
BIN
style/18_plus_small.png
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in a new issue