jabref
jabref copied to clipboard
Add feature to merge .bib files into current bib
Closes #12290
This PR introduces a feature that allows for users to merge .bib files in a chosen directory into their current bib. If an imported entry is equal to an existent one, it is silently ignored. If it is a duplicate (according to JabRef's duplication algorithm) or has the same citation key, it can either be silently ignored or the entries are merged, using JabRef's merge dialog (users can configure their preference in the Preferences menu in the "Merge other bib files into current bib" tab). Users can undo/redo this command.
Co-authored-by: Guilherme Ribeiro Pereira [email protected]
Steps to test
- Open (or create) a library
- Go to Files > Merge other libraries into current library...
- Select the directory that contains the .bib files to be merged (these .bib files should have some equal/duplicate/same citation key entries compared to the ones in the library described in step 1)
- Repeat this process changing the duplicate/same citation key handling preferences in File > Preferences > Merge other .bib files into current .bib
Automatic tests were also created for this PR.
Mandatory checks
- [x] I own the copyright of the code submitted and I license it under the MIT license
- [x] Change in
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user) - [x] Tests created for changes (if applicable)
- [x] Manually tested changed features in running JabRef (always required)
- [x] Screenshots added in PR description (if change is visible to the user)
- [x] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
- [x] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.