feat(cmd export): exclude bibtex fields if specified
This commit is contained in:
parent
b9c65bda39
commit
b208bc45bc
@ -53,6 +53,11 @@ def command(conf, args):
|
|||||||
for p in papers:
|
for p in papers:
|
||||||
bib[p.citekey] = p.bibdata
|
bib[p.citekey] = p.bibdata
|
||||||
|
|
||||||
|
# exclude bibtex fields if specified
|
||||||
|
for field in conf['main']['bibtex_field_excludes']:
|
||||||
|
if field in bib[p.citekey]:
|
||||||
|
del bib[p.citekey][field]
|
||||||
|
|
||||||
exporter = endecoder.EnDecoder()
|
exporter = endecoder.EnDecoder()
|
||||||
bibdata_raw = exporter.encode_bibdata(bib, args.ignore_fields)
|
bibdata_raw = exporter.encode_bibdata(bib, args.ignore_fields)
|
||||||
ui.message(bibdata_raw)
|
ui.message(bibdata_raw)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user