aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2022-06-04 12:45:12 -0300
committerSilvio Rhatto <rhatto@riseup.net>2022-06-04 12:45:12 -0300
commit7fdb80308b3710c67dc0fb9329c3afbbfa2aea5c (patch)
tree553c39180386926d7a84fc13d0f9532472c63435
parentce33d2ccae7e88a067cef3d6cb90d3c453953b7e (diff)
downloadbiblio-7fdb80308b3710c67dc0fb9329c3afbbfa2aea5c.tar.gz
biblio-7fdb80308b3710c67dc0fb9329c3afbbfa2aea5c.tar.bz2
Feat: a simple test suite
-rw-r--r--Makefile15
-rw-r--r--README.md5
2 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bf17bd7
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,15 @@
+#
+# 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
+
+lint_pybtex:
+ @cat *.bib > _lint_pybtext.bib
+ @pybtex-convert _lint_pybtext.bib _lint_pybtext.yaml
+ @rm -f _lint_pybtext.bib _lint_pybtext.yaml
diff --git a/README.md b/README.md
index 71ea081..2951fa8 100644
--- a/README.md
+++ b/README.md
@@ -11,3 +11,8 @@ A particular bibliography in BibTeX format.
* If not, move to a broader theme (something about "philosophy of gardening"
goes to "philosophy" if there is no "gardening" theme available).
+
+## Testing
+
+ sudo apt install make biber pybtex
+ make lint