script to generate png files of correct size automaticaly
authorTomas Stary <T.Stary@exeter.ac.uk>
Thu, 12 May 2016 13:35:03 +0000 (14:35 +0100)
committerTomas Stary <T.Stary@exeter.ac.uk>
Thu, 12 May 2016 13:53:32 +0000 (14:53 +0100)
Makefile.imgs [new file with mode: 0644]

diff --git a/Makefile.imgs b/Makefile.imgs
new file mode 100644 (file)
index 0000000..c9b9c7e
--- /dev/null
@@ -0,0 +1,64 @@
+# Makefile to convert translated and edited svg files to png in the correct size
+
+# first run `mkdir -p img/$l/screenshots` where $l is your language code
+
+# then add your language code into the list here
+LANG = cs
+# then run `make -f Makefile.imgs` which will convert the svg files automaticaly using inkscape (make sure you have the required fonts on your system)
+
+IMG = $(foreach l, $(LANG),\
+       $(foreach f,\
+               donate.png\
+               full-infographic.png\
+               infographic-button.png\
+               join.png,\
+       img/$l/$f) \
+       $(foreach f,\
+               section3-try-it-out.png\
+               section4-web-of-trust.png\
+               section5-01-use-it-well.png\
+               section5-02-use-it-well.png\
+               section6-next-steps.png\
+               step1a-install-wizard.png\
+               step1b-01-tools-addons.png\
+               step1b-02-search.png\
+               step1b-03-install.png\
+               step2a-01-make-keypair.png\
+               workshop-section1.png,\
+       img/$l/screenshots/$f))
+
+INKSCAPE = inkscape -D
+
+all: $(IMG)
+
+img/%/donate.png: svg/%/donate.svg
+       $(INKSCAPE) -w 160 -h 45 -e $@ $<
+img/%/full-infographic.png: svg/%/gnupg-infographic.svg
+       $(INKSCAPE) -w 749 -h 2933 -e $@ $<
+img/%/infographic-button.png: svg/%/infographic.svg
+       $(INKSCAPE) -w 253 -h 300 -e $@ $<
+img/%/join.png: svg/%/join.svg
+       $(INKSCAPE) -w 160 -h 49 -e $@ $<
+
+img/%/screenshots/section3-try-it-out.png: svg/%/adele.svg
+       $(INKSCAPE) -w 600 -h 425 -e $@ $<
+img/%/screenshots/section4-web-of-trust.png: svg/%/weboftrust.svg
+       $(INKSCAPE) -w 600 -h 436 -e $@ $<
+img/%/screenshots/section5-01-use-it-well.png: svg/%/identity.svg
+       $(INKSCAPE) -w 600 -h 280 -e $@ $<
+img/%/screenshots/section5-02-use-it-well.png: svg/%/section5-02-use-it-well.svg
+       $(INKSCAPE) -w 600 -h 404 -e $@ $<
+img/%/screenshots/section6-next-steps.png: svg/%/elements.svg
+       $(INKSCAPE) -w 600 -h 365 -e $@ $<
+img/%/screenshots/step1a-install-wizard.png: svg/%/step1a-install-wizard.svg
+       $(INKSCAPE) -w 600 -h 438 -e $@ $<
+img/%/screenshots/step1b-01-tools-addons.png: svg/%/step1b-01-tools-addons.svg
+       $(INKSCAPE) -w 600 -h 438 -e $@ $<
+img/%/screenshots/step1b-02-search.png: svg/%/step1b-02-search.svg
+       $(INKSCAPE) -w 844 -h 575 -e $@ $<
+img/%/screenshots/step1b-03-install.png: svg/%/step1b-03-install.svg
+       $(INKSCAPE) -w 844 -h 575 -e $@ $<
+img/%/screenshots/step2a-01-make-keypair.png: svg/%/step2a-01-make-keypair.svg
+       $(INKSCAPE) -w 600 -h 457 -e $@ $<
+img/%/screenshots/workshop-section1.png: svg/%/workshop-section1.svg
+       $(INKSCAPE) -C -w 800 -h 571 -e $@ $<