Bibtex type `misc` does not require author
michaelaye opened this issue · comments
The Bibtex entry type "misc" has no required fields (https://en.wikipedia.org/wiki/BibTeX#Entry_types) but bibm
refuses to take this bibtex file:
@MISC{Nasa_undated-bs,
title = "{NASA} {SMD} Annual Report 2018",
author = "{NASA}"
}
$ bibm merge test.bib (py37)
Traceback (most recent call last):
File "/Users/klay6683/miniconda3/envs/py37/bin/bibm", line 10, in <module>
sys.exit(main())
File "/Users/klay6683/miniconda3/envs/py37/lib/python3.7/site-packages/bibmanager/__main__.py", line 748, in main
args.func(args)
File "/Users/klay6683/miniconda3/envs/py37/lib/python3.7/site-packages/bibmanager/__main__.py", line 83, in cli_merge
bm.merge(bibfile=args.bibfile, take=args.take)
File "/Users/klay6683/miniconda3/envs/py37/lib/python3.7/site-packages/bibmanager/bib_manager/bib_manager.py", line 623, in merge
new = loadfile(bibfile)
File "/Users/klay6683/miniconda3/envs/py37/lib/python3.7/site-packages/bibmanager/bib_manager/bib_manager.py", line 499, in loadfile
bibs = [Bib(entry) for entry in entries]
File "/Users/klay6683/miniconda3/envs/py37/lib/python3.7/site-packages/bibmanager/bib_manager/bib_manager.py", line 499, in <listcomp>
bibs = [Bib(entry) for entry in entries]
File "/Users/klay6683/miniconda3/envs/py37/lib/python3.7/site-packages/bibmanager/bib_manager/bib_manager.py", line 133, in __init__
raise ValueError(f"Bibtex entry '{self.key}' is missing author, "
ValueError: Bibtex entry 'Nasa_undated-bs' is missing author, title, or year.
Note, i'm not saying this is a good bibtex entry, as obviously that NASA report has authors, years etc. But formally speaking bibm
shouldn't reject this entry, as it's defined by BibTex to not require any field. Of course bibm
could decide that @misc entries are out of scope for itself.
Right. I'm going to keep this type of entries out of the scope of bibmanager (at least until somebody comes with a reasonable case needing to use a 'misc' entry for a peer-review article).
Thanks.
Reopening this issue, since this is basically the same as #78 (which will be taken care very very soon to allow entries without titles, authors, or year).