Debian Codegraph @

doc/Makefile

raw
1 # Recipe for converting video to animated gif using ffmpeg
2 # Reference: https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/
3
4 VIDEOS = dimmer-demo.webm
5
6 GIFS = $(VIDEOS:.webm=.gif)
7
8 default: $(GIFS)
9
10 clean:
11 rm -f $(GIFS)
12
13 %.gif : %.webm
14 ffmpeg -i $< -filter_complex "[0:v] fps=15,scale=w=640:h=-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" $@
15
16
17 ## Script to generate screenshot gallery
18
19 EMACS ?= emacs
20
21 GALLERY_TMPL = "(go :MODE FRAC 'THEME)"
22 GALLERY_THEMES = zenburn \
23 solarized-light \
24 solarized-dark \
25 spacemacs-light \
26 spacemacs-dark \
27 tomorrow-day \
28 tomorrow-night \
29 tomorrow-blue \
30 tomorrow-bright \
31 tomorrow-eighties
32 GALLERY_MODES = foreground background both
33 GALLERY_FRACS = -0.2 -0.1 0.1 0.2 0.4
34 GALLERY_CASES = $(foreach theme,$(GALLERY_THEMES), \
35 $(foreach mode,$(GALLERY_MODES), \
36 $(subst MODE,$(mode), \
37 $(subst THEME,$(theme),example-THEME-MODE))))
38 GALLERY = $(foreach theme,$(GALLERY_THEMES), \
39 $(foreach mode,$(GALLERY_MODES), \
40 $(foreach frac,$(GALLERY_FRACS), \
41 $(subst FRAC,$(frac), \
42 $(subst MODE,$(mode), \
43 $(subst THEME,$(theme),$(GALLERY_TMPL)))))))
44
45 gallery:
46 for i in ${GALLERY} ; do \
47 ${EMACS} -q -l gallery.el --eval "$$i" ;\
48 done
49 for i in ${GALLERY_CASES} ; do \
50 python comp.py $$i ${GALLERY_FRACS} ;\
51 done