Add makefile and example

This commit is contained in:
Maximilian Blochberger committed 2021-03-11 13:02:01 +01:00
1 parent 211f3e6c62
commit 11eaf5b33b
6 files changed
+211 -6

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
.PHONY: all clean
.SUFFIXES: .dot .pdf .svg .tex
DB = db.sqlite3
DOT = dot
DOTTOTEX = dot2tex
MANAGE = ./manage.py
TAGDAG = $(MANAGE) tagdag --threshold 1
all: graphs/citations.svg graphs/sok.svg
clean:
rm -f graphs/*.dot
rm -f graphs/*.svg
.dot.pdf:
$(DOT) -Tpdf -o$*.pdf $<
.dot.svg:
$(DOT) -Tsvg -o$*.svg $<
.dot.tex:
$(DOTTOTEX) -f tikz --usepdflatex $< > $@
graphs/citations.dot: $(DB) sok/management/commands/citations.py
$(MANAGE) citations --pk --min-citations 10 > $@
graphs/sok.dot: $(DB) sok/management/commands/tagdag.py
$(TAGDAG) > $@