I have a .bib file that contains every paper I have on my computer (linked to pdf with Jabref). When I work with a specific project, I only need a subset of these papers (the entire file contains hundreds of entries, way too much). So, I would prefer to have a separate .bib file that contains only the relevant entries. Since I want to manage all the BibTeX entries in a central place and use them separately, it would be great if there is any program that can programmatically (from command line) generates a subset of the BibTeX entries based on a list of information, say, a list of titles. (But not from .aux, as I would need to collect a subset of the original large .bib file before I actually write out the .tex file.)
I know that I could use the "Group" function in JabRef and save all entries in a group as a new .bib file. However, the problem is that this method relies on "GUI operation". I would prefer something run from a script (e.g., Bash or Python) that can be triggered by an event (say, a post-commit hook in Git).
The main advantage of always generating subsets of BibTeX database from a single central database is that every time I need to fix some error or update something in the entries, I can do that in the central database and immediately get an update in all of the other smaller databases by running the script.
Does such a programmatical approach of generating .bib file already exist? Thanks!