-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (32 loc) · 881 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
SAMPLE=./pandoc_latex_levelup.sample
MD=$(SAMPLE).md
PDF=$(SAMPLE).pdf
TEX=$(SAMPLE).tex
FILTER=./pandoc_latex_levelup.py
DIST=dist
sdist:
python setup.py sdist
install:
python setup.py install
pypi:
twine upload $(DIST)/*
test: basic_test $(TEX) $(PDF)
basic_test:
echo 'hello world' | pandoc -t json | python -tt ./pandoc_latex_levelup.py
%.tex: %.md
pandoc --filter $(FILTER) --toc --number-sections $(MD) -o $(TEX)
%.pdf: %.md
pandoc --filter $(FILTER) --toc --number-sections $(MD) -o $(PDF)
testpypi: sdist
twine upload $(DIST)/* -r testpypi
#mkvirtualenv test-pandoc-latex-levelup
#workon test-pandoc-latex-levelup
pip install --user -i https://testpypi.python.org/pypi pandoc-latex-levelup
pip uninstall pandoc-latex-levelup
#rmvirtualenv test-pandoc-latex-levelup
docker:
docker build .
clean:
rm -f $(PDF)
rm -f $(TEX)
rm -fr $(DIST)