forked from OZAstroComputingResources/MQCoffee-CodeResources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (29 loc) · 891 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
OPEN=xdg-open
START_SERVER=python3 -m http.server
OUT_FORMAT=revealjs
IN_FORMAT=markdown+yaml_metadata_block
OUTPUT=talk.html
BEAMER_ARGS=--latex-engine=xelatex
REVEALJS_VERSION=3.6.0
REVEALJS_URL=https://github.com/hakimel/reveal.js/archive/$(REVEALJS_VERSION).tar.gz
REVEALJS_FILE=revealjs.tar.gz
REVEALJS_DIR=reveal.js
REVEALJS_UNTARED_DIR=$(REVEALJS_DIR)-$(REVEALJS_VERSION)
PRES_URL=http://localhost:8000/$(OUTPUT)
.PHONY: all clean download_revealjs
all: $(OUTPUT)
$(OUTPUT): outline.md
pandoc $< --output=$@ --from=$(IN_FORMAT) --to=$(OUT_FORMAT) --standalone
download_revealjs: remove_revealjs
wget $(REVEALJS_URL) -O $(REVEALJS_FILE)
tar -xf $(REVEALJS_FILE)
mv $(REVEALJS_UNTARED_DIR) $(REVEALJS_DIR)
rm -f $(REVEALJS_FILE)
remove_revealjs:
rm -rf $(REVEALJS_DIR)
clean:
rm -f $(OUTPUT)
start_server:
$(START_SERVER) &
view: all start_server
$(OPEN) $(PRES_URL)