Skip to the content.
zoplicate banner

👉 zotero target version Version for Zotero 7 Downloads for Zotero 7👈 👉zotero target version Version for Zotero 6 Downloads for Zotero 6👈

GitHub License Using Zotero Plugin Template GitHub Repo stars


A plugin that does one thing only: Detect and Manage duplicate items in zotero.

The plugin can detect if the newly imported item is a duplicate of an existing item in the library. If so, it will prompt you to process the duplicate items.

The actions you can take are:

  1. Keep This: Save the last imported item and delete the rest.
  2. Keep Others: Delete the last imported item and save the rest.
  3. Keep All: Keep both the new item and the existing item.
  4. Merge Manually: Go to the Duplicate Panel and merge the duplicate item manually.

Starting from Version 2.0.0, the plugin will support Bulk Merge functionality.

If you find this project helpful, please consider giving it a star ⭐. It would be a great encouragement for me!

[!NOTE] We use the same method as Zotero to detect and merge duplicate items.

See Zotero Documentation - Duplicate Detection for more details.

Changelog

v2.2.0

Click here to show more.

In this version, we have made the following changes:

  1. NEW!: We have added “Smart” Merge functionality (Only available in Zotero 7 now).
    • When merging duplicate items, the function will fill in the missing information of the retained item with the duplicates.
    • Thanks endfreude’s idea mentioned in issue #15.

v2.1.0

Click here to show more.

In this version, we have made the following changes:

  1. NEW!: We have added the Suspend and Restore functionality (Only available in Zotero 7 now).
    • Please see Bulk Merge section below for more details.
  2. 🧬 CHANGE!: We have changed the behavior of Keep Others action.
    • Previously, the Keep Others action will delete the last imported item and save ALL the rest existing items.
    • Now, the action will Merge the existing items based on the Master Item preferences in Settings.
  3. 🐛 FIX!: We have fixed a bug that caused the tags could not be loaded correctly in v2.0.0.

v2.0.0

Click here to show more.

In this version, we have made the following changes:

  1. NEW!: We have added the Bulk Merge functionality (Only available in Zotero 7 now).
    • Bulk Merge: Merge all duplicate items in the library automatically.
    • You can find the Bulk Merge button in the Duplicate Items panel.
    • Please see Bulk Merge section below for more details.
    • Thanks csdaboluo’s idea mentioned in issue #8.
  2. 🐛 FIX!: We have fixed a bug that caused the dialog height to be too high when importing duplicate items in bulk.
  3. 🐛 FIX!: Now Zotero will auto-select the remained item after merging duplicate items.

v1.1.0

Click here to show more.

In this version, we have made the following changes:

  1. 🧬 CHANGE!: We have changed the processing method of duplicate items.

    Previously, we use the Trash method to process duplicate items, i.e., delete the duplicate items. However, this method will cause the loss of some information of the duplicate items.

    • E.g., notes, tags, collections, attachments.

    In this version, we use the Merge method to process duplicate items. This method will copy all the aforementioned information to the retained item, and then delete the duplicate items.

    • NOTE: If you are using ZotFile, the Merge method will copy the file link of the duplicate items to the retained item.
    • However, users relying on Zotero’s default attachment storage may encounter duplication issues if the newly imported item contains attachments.

Thanks ChinJCheung’s idea mentioned in issue #5.

Install

  1. Download .xpi file according to the version of Zotero you are using.
  2. Then, in Zotero, click Tools -> Add-ons and drag the .xpi onto the Add-ons window. See how to install a Zotero addon.

Usage

Settings

In Zotero, click Edit -> Settings, go to Zoplicate tab, and you will see the settings.

zoplicate settings

  1. You can select the actions you want to take when duplicate items are detected.
    • Always Ask is the default option if you have not changed the settings.
  2. You can select the version of duplicate items to use as the master item.
    • Earliest Added is the default option if you have not changed the settings.

Duplicate Detection

By default, or you have selected Always Ask in the settings, a dialog will pop up when you import a new item that is a duplicate of an existing item.

zoplicate dialog

The dialog will show the duplicate items and the actions you can take.

  1. Select the action you want to take and click Apply to process the duplicate items.
  2. Click Go to Duplicates to go to the Duplicate Items panel and merge the duplicate items manually.
  3. Click Cancel to dismiss the dialog and save the import of the new item and the existing items.
  4. Check Use this action by default to remember the selected action in default settings. Then the next time you import a duplicate item, the selected action will be applied automatically.

Multiple Duplicate Items

When you import multiple duplicate items, or import another duplicate item before you process the previous duplicate items, the dialog will show all the duplicate items and the actions you can take.

zoplicate dialog

  1. You can select different actions for different duplicate items.
  2. Click the header of action columns to select the same action for all duplicate items.
  3. Use this action by default option will be shown only when you select the same action for all duplicate items.

Bulk Merge

Inspired by csdaboluo’s idea and ZoteroDuplicatesMerger, we have added the Bulk Merge functionality in Version 2.0.0.

In the Duplicate Items panel, you can find the Bulk Merge button:

zoplicate bulk merge

You can also find it when you select one or more duplicate items:

zoplicate bulk merge

[!WARNING]

  1. Before clicking the button, please make sure you have properly configured the Master Item preferences in Settings.
  2. The Bulk Merge functionality will take a while to complete if you have a large number of duplicate items.
  3. This functionality is only available in Zotero 7 now. I will check compatibility and try to migrate to Zotero 6.

You will see the progress of the bulk merge process: zoplicate bulk merge process

Suspend Bulk Merge

You can click the Suspend button to suspend the bulk merge process.

A dialog will pop up to confirm your action: zoplicate bulk merge suspend

  1. Click Resume to resume the bulk merge process.
  2. Click Cancel to cancel the bulk merge process.
    • Check Restore Deleted Items to restore the duplicate items that have been merged.
    • Note that the Restore action is only effective if you click Cancel.

[!TIP]

If you want to Restore the duplicate items that have been merged, you can go to Trash panel and restore them.

  1. Select the duplicate items you want to restore.
  2. Click Restore to Library button to process.

Contributing

👋 Welcome to Zoplicate! We’re excited to have your contributions. Here’s how you can get involved:

  1. 💡 Discuss New Ideas: Have a creative idea or suggestion? Start a discussion in the Discussions tab to share your thoughts and gather feedback from the community.

  2. Ask Questions: Got questions or need clarification on something in the repository? Feel free to open an Issue labeled as a “question” or participate in Discussions.

  3. 🐛 Issue a Bug: If you’ve identified a bug or an issue with the code, please open a new Issue with a clear description of the problem, steps to reproduce it, and your environment details.

  4. Introduce New Features: Want to add a new feature or enhancement to the project? Fork the repository, create a new branch, and submit a Pull Request with your changes. Make sure to follow our contribution guidelines.

  5. 💖 Funding: If you’d like to financially support the project, you can do so by sponsoring the repository on GitHub. Your contributions help us maintain and improve the project.

Thank you for considering contributing to Zoplicate. We value your input and look forward to collaborating with you!

Acknowledgements

The icons used in this project are from Flaticon: