-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
48 lines (39 loc) · 2.43 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
all: figureB1.svg figureB2.svg figureB3.svg figureB4.svg figureB5.svg figureB6.svg figureB11.svg figureB12.svg figureB13.svg output/depletion/manuscript.html output/translation/manuscript.html
venv: venv/bin/activate
venv/bin/activate: requirements.txt
test -d venv || virtualenv venv
. venv/bin/activate && pip install -Uqr requirements.txt
touch venv/bin/activate
figureB1.svg figureB2.svg figureB3.svg figureB4.svg figureB5.svg figureB6.svg figureB11.svg figureB12.svg figureB13.svg:
julia -e 'using Pkg; Pkg.activate("."); using FcgR; FcgR.figureAll()'
figure%.svg:
julia -e 'using Pkg; Pkg.activate("."); using FcgR; FcgR.figure$*()'
output/%/manuscript.md: venv manuscripts/%/*.md
mkdir -p ./output/$*
. venv/bin/activate && manubot process --content-directory=manuscripts/$*/ --output-directory=output/$*/ --log-level=WARNING
output/%/manuscript.html: venv output/%/manuscript.md figureB1.svg figureB2.svg figureB3.svg
cp *.svg output/$*/
. venv/bin/activate && pandoc \
--from=markdown --to=html5 --filter=pandoc-fignos --filter=pandoc-eqnos --filter=pandoc-tablenos \
--bibliography=output/$*/references.json \
--csl=common/templates/manubot/style.csl \
--metadata link-citations=true \
--include-after-body=common/templates/manubot/default.html \
--include-after-body=common/templates/manubot/plugins/table-scroll.html \
--include-after-body=common/templates/manubot/plugins/anchors.html \
--include-after-body=common/templates/manubot/plugins/accordion.html \
--include-after-body=common/templates/manubot/plugins/tooltips.html \
--include-after-body=common/templates/manubot/plugins/jump-to-first.html \
--include-after-body=common/templates/manubot/plugins/link-highlight.html \
--include-after-body=common/templates/manubot/plugins/table-of-contents.html \
--include-after-body=common/templates/manubot/plugins/lightbox.html \
--mathjax --variable math="" \
--include-after-body=common/templates/manubot/plugins/math.html \
--include-after-body=common/templates/manubot/plugins/hypothesis.html \
--output=output/$*/manuscript.html output/$*/manuscript.md
coverage.cob:
julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Pkg.activate("."); Pkg.test("FcgR"; coverage=true); coverage = process_folder(); LCOV.writefile("coverage-lcov.info", coverage)'
pip3 install --user lcov_cobertura
python3 ~/.local/lib/python3.7/site-packages/lcov_cobertura.py coverage-lcov.info -o coverage.cob
clean:
rm -rf *.svg venv output