-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (33 loc) · 888 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
47
48
SHELL := /bin/zsh
# Extract the export file name from the Org file
FILENAME := $(shell grep '#+EXPORT_FILE_NAME' thesis.org | cut -d':' -f2 | xargs)
all:
# rm -fr ./out/* || true
# if [ "$(ls -A ./out)" ]; then rm -fr ./out/*; fi
find ./out/ -mindepth 1 -delete
# DEBUG=1 doomscript ...
doomscript ./org-export.el
latexmk -shell-escape -bibtex -pdf "$(FILENAME).tex"
mv "$(FILENAME)".{pdf,html,txt} ./out
cp -r img-gen-dir out
# gen gitlab index page
python3 gen-index-page.py "$(FILENAME)"
c: clean
clean:
latexmk -c
rm -f "./$(FILENAME)-blx.bib"
rm -f "./$(FILENAME)."*
rm -fr "_minted-$(FILENAME)"
# ".auctex-auto/"
o: open
open:
open "./out/index.html"
op:
open "./out/$(FILENAME).pdf"
oh:
open "./out/$(FILENAME).html"
cat:
open "./out/$(FILENAME).txt"
spell:
# cat thesis.org | aspell --lang=de list | uniq | wc -l
aspell --lang=de -c thesis.org