From db7553782f53e5c81d15c2837a250ea53c521665 Mon Sep 17 00:00:00 2001 From: Phyks Date: Mon, 9 Jun 2014 14:55:24 +0200 Subject: [PATCH] Assert bibtex is correct --- bmc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bmc.py b/bmc.py index dd4c0b5..96d1654 100755 --- a/bmc.py +++ b/bmc.py @@ -25,7 +25,12 @@ def checkBibtex(filename, bibtex_string): bibtex = bibtex.get_entry_dict() try: bibtex = bibtex[bibtex.keys()[0]] - print(bibtex_string) + # Check entries are correct + assert bibtex['title'] + assert bibtex['authors'] + assert bibtex['year'] + # Print the bibtex and confirm + print(parsed2Bibtex(bibtex)) check = tools.rawInput("Is it correct? [Y/n] ") except: check = 'n'