Merging many duplicates in Zotero standalone

I'm working on a systematic review that requires importing hundreds of records from different searches with as many as 10 duplicates for particular records. In Zotero Standalone I can see my duplicate list, but it requires me to manually merge each of the replicated titles. Since there are hundreds of titles that require merging, I am wondering if there is a way to merge many different replicated titles at once.
  • No, not currently, but how do you imagine this happening? Duplicates often contain different information in various fields that you need to choose to keep or discard. I simply can't think of the interface that would facilitate merging all duplicates and still giving you this flexibility

    We could probably automate merging of records that are exactly the same (and perhaps some that only differ in Library Catalog and maybe a couple other fields). We could also prefer fields that are filled in over those that are empty.
  • Yes, for many of the duplicates the important citation information is nearly identical. It would be helpful if the user could specify the fields that must match exactly, and then for the remaining fields Zotero could just keep the mismatched info from the record added first (or some other default). In our case, there are only a few fields we care about, so if there are differences in other fields, we aren't concerned.

    What is the chance of this capability being added to Zotero in the next two months?
  • Chances are not very high. Especially because this has to work for everyone without too many knobs, buttons, and options. Other people do care about most of the fields, so we can't just ignore them by default. This could be implemented as a Zotero extension without having to satisfy the above requirement though.

    Take a look at this though: https://github.com/chrisjr/zotero-prevent-duplicates

    It doesn't help after import, but it may help you avoid duplicates before importing.
  • Thanks for your quick response. The link looks helpful.
  • This is a quick and dirty hack for automating the merger of duplicate zotero items.
    In order to use this you will need to have your zotero library open in firefox and have a set of duplicate items selected in the duplicate pane.

    Open a browser tab and enter: chrome://zotero/content/include.js


    Then open the "Web Console" from the developer tools(there are other options like Execute JS too)


    Then paste the following lines into the console:


    var Zot_Dup_Pane = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser").Zotero_Duplicates_Pane;


    //note this will fail on duplicates that are not the same item type or it may crash if you have a large library - in which case I export subsections of the
    //library and merge them in smaller sets - importing them into a new library at the end.
    //You may want to change the while loop into a for loop with smaller iterations so you can control how many records are merged in each go

    while (true){
    Zot_Dup_Pane.merge()


    }
Sign In or Register to comment.