feat(cmd add): exclude bibtex fields if specified
This commit is contained in:
parent
80867675b3
commit
5a10a5631b
@ -116,6 +116,12 @@ def command(conf, args):
|
|||||||
if bibentry is None:
|
if bibentry is None:
|
||||||
ui.error('invalid bibfile {}.'.format(bibfile))
|
ui.error('invalid bibfile {}.'.format(bibfile))
|
||||||
|
|
||||||
|
# exclude bibtex fields if specified
|
||||||
|
for item in bibentry.values():
|
||||||
|
for field in conf['main']['bibtex_field_excludes']:
|
||||||
|
if field in item:
|
||||||
|
del item[field]
|
||||||
|
|
||||||
# citekey
|
# citekey
|
||||||
|
|
||||||
citekey = args.citekey
|
citekey = args.citekey
|
||||||
|
Loading…
x
Reference in New Issue
Block a user