aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 67d6eb6ac024b86f75eb0a59ee7203589050113d (plain)
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
#
# Makefile with common procedures for managing a BibTeX repository.
#

lint: lint_biber lint_pybtex

# Thanks https://tex.stackexchange.com/questions/173621/how-to-validate-check-a-biblatex-bib-file#173622
lint_biber:
	@find -name '*.bib' -exec biber --tool -V {} \;
	@#rm -f *.bibertool* *.blg* _bibertool.bib
	@find -name '*.bibertool*'    -exec rm {} \;
	@find -name '*.blg*' 				  -exec rm {} \;
	@find -name '*_bibertool.bib' -exec rm {} \;

lint_pybtex:
	@#cat *.bib > _lint_pybtext.bib
	@find -name '*.bib' -exec cat {} \; > _lint_pybtext.bibs
	@mv _lint_pybtext.bibs _lint_pybtext.bib
	@pybtex-convert _lint_pybtext.bib _lint_pybtext.yaml
	@rm -f _lint_pybtext.bib _lint_pybtext.yaml

tidy:
	@#bibtex-tidy -m bib/*.bib
	@find -name *.bib -exec bibtex-tidy -m {} \;

yaml:
	@./bin/biblio-yml > _biblio.yml