[Tex/LaTex] Automatically remove fields from .bib file containing biblatex entries such as @Thesis

bibitembiblatexbibtexbibtool

I need to automatically remove certain fields – e.g. abstract, review, group, and file – from .bib files that contain not only bibtex entries but also (newer) biblatex entries such as @Thesis. This is the same as asked and answered in this question, but for files including biblatex entries.

This is how an example entry for a @Thesis in the .bib file might look like:

 @Thesis{Author_18_TheThesis,
  author      = {Mr Author},
  title       = {The Thesis},
  type        = {Doctoral Dissertation},
  institution = {Department of Documents, University of Stackexchange},
  year        = {2018},
  abstract    = {This is the abstract.},
  file        = {:author/Author_18_TheThesis.pdf:PDF},
  review      = {This is the review.},
  groups      = {publications},
}

bibtool, which is the accepted answer is the referred question, does not yet seem to support such entries and skips them with a warning:

@Thesis{Author_18_TheThesis,
_^
*** BibTool ERROR:  (line 123 in ./yourbibliography.bib): Unknown entry type

*** BibTool WARNING: Skipping to next '@'

How would you automatically remove such fields from .bib files containing biblatex entries? (I would prefer solutions that run on a Linux machine).

Best Answer

Andrew Swann's answer using bibtool originally linked in the OP does work, provided the resource biblatex is given (ht to moewe).

So, for a file remove-fields.rsc:

preserve.keys = On
preserve.key.case = On
resource{biblatex}
delete.field = { abstract }
delete.field = { review }
delete.field = { groups }
delete.field = { file }

The command:

bibtool -r remove-fields ./references.bib -o new.bib

will result in:

@Thesis{      Author_18_TheThesis,
  Author    = {Mr Author},
  Title     = {The Thesis},
  Type      = {Doctoral Dissertation},
  Institution   = {Department of Documents, University of Stackexchange},
  Year      = {2018},
  ispreprintpublic={test}
}
Related Question