|
| 1 | +SHELL := /bin/bash |
| 2 | + |
1 | 3 | .PHONY: all |
2 | 4 | all: slides.html slides.pdf |
3 | 5 |
|
4 | | -.PHONY: serve |
5 | | -serve: slides.html |
6 | | - caddy run |
| 6 | +.PHONY: preview |
| 7 | +preview: slides.adoc |
| 8 | + docker run --user "$$(id -u)" --rm --publish 35729:35729 --publish 2020:2020 --volume "$${PWD}":/build vshn/slides-preview:1.16.0 |
7 | 9 |
|
8 | 10 | slides.html: slides.adoc |
9 | | - docker run --rm --tty --user "$$(id -u)" --volume "$${PWD}":/build vshn/asciidoctor-slides:1.7 --filename slides.adoc |
| 11 | + docker run --rm --tty --user "$$(id -u)" --volume "$${PWD}":/build vshn/asciidoctor-slides:1.16.0 --filename slides.adoc |
10 | 12 |
|
11 | 13 | slides.pdf: slides.html |
12 | | - docker run --rm --tty --user "$$(id -u)" --volume "$${PWD}":/slides astefanutti/decktape:2.11.0 --size '2560x1440' --pause 2000 --chrome-arg=--allow-file-access-from-files slides.html slides.pdf |
| 14 | + docker run --rm --tty --user "$$(id -u)" --volume "$${PWD}":/slides astefanutti/decktape:3.4.0 --size '1920x1080' --chrome-arg=--allow-file-access-from-files slides.html slides.pdf |
| 15 | + |
| 16 | +slides-with-transitions.pdf: slides.html |
| 17 | + docker run --rm --tty --user "$$(id -u)" --volume "$${PWD}":/slides astefanutti/decktape:3.4.0 --size '1920x1080' --chrome-arg=--allow-file-access-from-files slides.html?fragments=true slides-with-transitions.pdf |
| 18 | + |
| 19 | +slides-with-notes.html: slides.adoc |
| 20 | + docker run --rm --tty --user "$$(id -u)" --volume "$${PWD}":/build vshn/asciidoctor-slides:1.16.0 --filename slides.adoc --show-notes --attribute slides-pdf-export --output slides-with-notes.html |
| 21 | + |
| 22 | +slides-with-notes.pdf: slides-with-notes.html |
| 23 | + docker run --rm --tty --user "$$(id -u)" --volume "$${PWD}":/slides astefanutti/decktape:3.4.0 --size '1920x1080' --chrome-arg=--allow-file-access-from-files slides-with-notes.html slides-with-notes.pdf |
| 24 | + |
| 25 | +# This target lists the images not used in the final presentation, |
| 26 | +# and which could be removed. |
| 27 | +.PHONY: unused_images |
| 28 | +unused_images: slides.html |
| 29 | + @for file in assets/images/* ; do \ |
| 30 | + if ! grep -U $${file##*/} slides.html > /dev/null; then \ |
| 31 | + echo $$file; \ |
| 32 | + fi; \ |
| 33 | + done; |
| 34 | + |
| 35 | +speaker-notes.html: slides.adoc |
| 36 | + @docker run --rm --volume ${PWD}:/convert vshn/slides-notes-exporter:1.0 html /convert/slides.adoc |
| 37 | + |
| 38 | +speaker-notes.pdf: slides.adoc |
| 39 | + @docker run --rm --volume ${PWD}:/convert vshn/slides-notes-exporter:1.0 pdf /convert/slides.adoc |
| 40 | + |
| 41 | +.PHONY: speaker-notes |
| 42 | +speaker-notes: slides.adoc |
| 43 | + @docker run --rm --volume ${PWD}:/convert vshn/slides-notes-exporter:1.0 /convert/slides.adoc |
| 44 | + |
| 45 | +.PHONY: docker |
| 46 | +docker: slides.pdf |
| 47 | + docker build -t syntroductionv2:1.0 . |
13 | 48 |
|
14 | 49 | .PHONY: clean |
15 | 50 | clean: |
16 | | - find . -maxdepth 1 -name '*.adoc' | sed 's/.adoc$$/.html/' | xargs rm -f |
17 | | - find . -maxdepth 1 -name '*.adoc' | sed 's/.adoc$$/.pdf/' | xargs rm -f |
18 | | - find . -maxdepth 1 -name 'theme' | xargs rm -rf |
| 51 | + find . -maxdepth 1 -name 'Caddyfile' | xargs rm -f; \ |
| 52 | + find . -maxdepth 1 -name 'Guardfile' | xargs rm -f; \ |
| 53 | + find . -maxdepth 1 -name '*.html' | xargs rm -f; \ |
| 54 | + find . -maxdepth 1 -name '*.pdf' | xargs rm -f; \ |
| 55 | + find . -maxdepth 1 -name 'theme' | xargs rm -rf; \ |
19 | 56 | find . -maxdepth 1 -name 'node_modules' | xargs rm -rf |
0 commit comments