Assert bibtex is correct
This commit is contained in:
parent
3591f0cb1f
commit
db7553782f
7
bmc.py
7
bmc.py
@ -25,7 +25,12 @@ def checkBibtex(filename, bibtex_string):
|
|||||||
bibtex = bibtex.get_entry_dict()
|
bibtex = bibtex.get_entry_dict()
|
||||||
try:
|
try:
|
||||||
bibtex = bibtex[bibtex.keys()[0]]
|
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] ")
|
check = tools.rawInput("Is it correct? [Y/n] ")
|
||||||
except:
|
except:
|
||||||
check = 'n'
|
check = 'n'
|
||||||
|
Loading…
Reference in New Issue
Block a user