-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
84 lines (66 loc) · 2.48 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
default: all
all: render pdf git
################################################
# CODE
################################################
J=jupyter nbconvert --ExecutePreprocessor.kernel_name=python3 --ExecutePreprocessor.timeout=0 --allow-errors --execute
JM=$(J) --to markdown --stdout # for dev
JN=$(J) --to notebook --inplace # for the final touch
#################@#################@#################@#################
#################@#################@#################@#################
install:
pip install -r requirements.txt
run:
$(JM) FastMotionDetection.ipynb
render:
$(JN) FastMotionDetection.ipynb
################################################
# MANUSCRIPT
################################################
SRC = Grimaldi-etal-BiolCybernetics
SLUG = grimaldi-23-bc
# SRC_rev = Pasturel_etal2019
DIR_rev = revision_0
SRC_rev = $(DIR_rev)/$(SRC)
#LATEXMK = latexmk -pdf -pdflatex=lualatex
LATEXMK = latexmk -pdf
BIBTEX = bibtex
################################################
pdf: $(SRC).pdf
diff: $(SRC)_trackedchanges.pdf
################################################
LATEXMK = latexmk -bibtex -pdf
# -pdflatex=pdflatex
################################################
$(SRC).pdf: $(SRC).tex FastMotionDetection.bib
$(LATEXMK) $(SRC).tex
# post-production
$(SRC)_trackedchanges.tex: $(SRC).tex FastMotionDetection.bib $(SRC_rev).tex
latexdiff --flatten --graphics-markup=both $(SRC_rev).tex $(SRC).tex > $(SRC)_trackedchanges.tex
GROUPID = 4776796
zotero_fetch_bib:
# limited to 100 items :-(
wget "https://api.zotero.org/groups/4776796/items?format=bibtex&limit=100&start=0" -O FastMotionDetection.bib
# curl https://api.zotero.org/groups/$(GROUPID)/items?format=bibtex > FastMotionDetection.bib
response_to_reviewers.pdf: response_to_reviewers.tex $(SRC).tex $(SRC).bib
$(LATEXMK) response_to_reviewers.tex
touch:
touch *.tex
# blog:
# cp Grimaldi-etal-BiolCybernetics.pdf /Users/laurentperrinet/metagit/blog/hugo_academic/content/publication/grimaldi-23-bc/grimaldi-23-bc.pdf
blog:
cp $(SRC).pdf ~/quantic/blog/hugo_academic/content/publication/$(SLUG)/$(SLUG).pdf
git:
git pull
git commit -am'Another pass'
git push
# macros
%.pdf: %.tex
$(LATEXMK) $<
%.pdf: %.svg
$(INKSCAPE) --without-gui $< --export-pdf=$@
%.png: %.svg
$(INKSCAPE) --without-gui $< --export-png=$@ -d 450
# cleaning macro
clean:
rm -f *.dvi *.fls *.ilg *.ind *idx *.bcf *.run.xml *.dvi *.ps *.out *.log *.aux *.bbl *.blg *.fdb_latexmk *.snm *.nav *.toc *.info *.synctex.gz* $(SRC).pdf *-nup.pdf