Assert bibtex is correct

This commit is contained in:
Phyks 2014-06-09 14:55:24 +02:00
parent 3591f0cb1f
commit db7553782f
1 changed files with 6 additions and 1 deletions

7
bmc.py
View File

@ -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'