Command line export from bib file to bib file

I’m trying to export entries from a bib file that match a particular group to another bib file. I’m trying this:
jabref -n --exportMatches 'groups="export"',export.bib,bib test.bib to export the export category to a separate file.

Here’s my example input file test.bib

@Article{Shmoe2000,
  author  = {Joe Shmoe},
  journal = {J. B. S.},
  title   = {Random topic},
  year    = {2000},
  groups  = {export},
}

@Article{Doe2002,
  author  = {Jone Doe},
  journal = {Sciency},
  title   = {Stuff},
  year    = {2002},
}

@Comment{jabref-meta: databaseType:bibtex;}

@Comment{jabref-meta: grouping:
0 AllEntriesGroup:;
1 StaticGroup:export\;0\;1\;0x8a8a8aff\;\;\;;
}

When I run the command the output file is not a bib file but is an html file. How do I create a bibtex output file? I can do it from the GUI, but I want a command line version that I can run automatically. I’m using Jabref 5.9.

Thanks for your question, this was a bug in 5.9 and is fixed in 5.10

  • We fixed an issue where the command line export using --exportMatches flag does not create an output bib file. #9581

You can use the latest dev version index - powered by h5ai v0.30.0 (https://larsjung.de/h5ai/) from here or wait a bit as we plan to release 5.10 this weekend :wink:

1 Like

Thank you so much for fixing it. It’s working as I expect in 5.10.

1 Like