-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (33 loc) · 974 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
39
40
41
42
43
44
45
46
SHELL := /bin/zsh
# default out file name
ifneq ($(prefix),)
outfile = $(prefix)-$(shell date '+%Y%m%d%S')
else
outfile = $(shell date '+%Y%m%d%S')
endif
files_in = $(pwd)
ifneq ($(in_dir),)
files_in = $(in_dir)/$(in_file)
endif
# # out folder name
# out_dir = $(pwd)/out
# # markdown folder input
# in_dir = $(pwd)/in
# STYLE=chmduquesne
style=custom
# html-to-pdf engine (wkhtmltopdf, weasyprint, prince)
engine=weasyprint
# ridiculousness
r = '\t\U0001F44C'
pdf:
@echo $(files_in)
# @echo -e $(r) '\t\e[34mgenerating $(outfile).pdf ...\e[0m ' $(r)
# @pandoc --standalone --pdf-engine=$(engine) \
# --css=$(style).css --output $(out_dir)/$(outfile).pdf $(in_dir)/$(in_file); \
init: dir
dir:
mkdir -p $(out_dir)
clean:
rm -f $(out_dir)/*
# old version used this command in a shell script which, in the end, wasn't necessary
# cd ~/.bulbil/mdtopdf/ && make prefix="$FLAGS_prefix" in_file="$FLAGS_infile" in_dir="$FLAGS_indir" out_dir="$FLAGS_outdir"