-
Notifications
You must be signed in to change notification settings - Fork 1
Handling duplicated entries gracefully #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have added a new commit addressing duplicate keys. Let me know if this is enough. Detecting duplicated entries (I mean, same entries with different keys, even if not perfectly equal) could be also interesting to address, but that problem is not that trivial... |
Tried it on the toy example I made and it seems to handle it quite nicely! I also threw it at my ~400 citation PhD bib file, and it warned about a dozen duplicates. Seemed to go on to complete correctly thereafter, so I'd call this a success - cheers Jaime! One other observation (not sure if this is intentional or not but), it puts out the repeated entry warning twice, right at the start, and just before the patched file info. I think the duplicate entries/different keys enhancement would be well worthwhile - but agreed, not easy. For my own thesis I grepped and string replaced through my .tex files to find incorrect multiple keys to correct them at the document compile time (but it would have been easier to have resolved it upstream in the bib file). |
Maybe we can use |
At present, if a bib entry is repeated, the whole process will exit with no attempt to continue/skip over/ remedy the situation meaning one has to then go hunting manually.
This can be replicated with:
(Examples are in my fork of the repo and PR to come).
Invoking the script gives the user the following traceback:
Since duplicated entries aren't strictly an issue for use with TeX (a warning is usually given, but I believe compilation will continue without error, and duplicates are skipped). It would be good if the script could gracefully handle this scenario, even if the solution is just to skip the entry, and warn, as TeX does.
The text was updated successfully, but these errors were encountered: