diff --git a/pubs/commands/edit_cmd.py b/pubs/commands/edit_cmd.py index 5ea7679..a3126f9 100644 --- a/pubs/commands/edit_cmd.py +++ b/pubs/commands/edit_cmd.py @@ -59,6 +59,12 @@ def command(conf, args): ui.info(("The metadata of paper '{}' was successfully " "edited.".format(color.dye_out(citekey, 'citekey')))) else: + # exclude bibtex fields if specified + for item in content.values(): + for field in conf['main']['bibtex_field_excludes']: + if field in item: + del item[field] + new_paper = Paper.from_bibentry(content, metadata=paper.metadata) if rp.rename_paper(new_paper, old_citekey=paper.citekey):