Skip to content
GuotuanWangPublic

About

Zotero 7/8/9/10 plugin for collection-scoped duplicate detection | Zotero 分类范围查重插件

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Collection De-dup (CESI)

中文文档

A Zotero 7/8/9/10 plugin that detects and manages duplicate references within a selected collection scope. It helps researchers clean up their Zotero libraries efficiently by finding duplicates based on DOI, ISBN, or normalized title matching, and provides safe options to organize or remove them.

Why This Plugin?

Zotero's built-in duplicate detection works across the entire library, but researchers often need to find duplicates within a specific collection or its subcollections. Collection De-dup fills this gap by providing scoped, collection-level duplicate detection with flexible processing options.

Features

  • Scoped Duplicate Detection — Scan a single collection or include all its subcollections
  • Multiple Matching Rules
    • Exact DOI match
    • Exact ISBN match
    • Normalized title + year/creator tolerance (handles minor metadata variations)
  • Two Processing Modes
    • Organize: Create a "Duplicates" subcollection and collect all duplicate copies (non-destructive)
    • Clean up: Keep the best item in each group and send the rest to trash (reversible via Zotero trash)
  • Smart Best-Item Selection — Automatically keeps the item with the most complete metadata (DOI > ISBN > longer title > more complete date > earlier added)
  • Bilingual UI — Available in English and Simplified Chinese as separate installable variants
  • Two Access Points — Tools menu entry and collection right-click context menu
  • Settings Pane — Appears in Zotero Settings with default scan and result-handling options
  • Zotero 7, 8, 9 & 10 Compatible (verified for Zotero 10.0.1)

Installation

  1. Download the latest .xpi file from the Releases page:
    • collection-dedup-en-x.x.x.xpi — English UI
    • collection-dedup-zh-CN-x.x.x.xpi — Simplified Chinese UI
  2. Open Zotero
  3. Go to Tools → Plugins
  4. Click the gear icon → Install Add-on From File...
  5. Select the downloaded .xpi file

Both language variants can be installed simultaneously — they use different add-on IDs.

Usage

  1. Select exactly one collection in Zotero's left panel (Zotero 10 supports multi-selection)
  2. Trigger duplicate detection via either:
    • Tools → Find Duplicates in Selected Collection...
    • Right-click the collection → Find Duplicates in This Collection...
  3. Choose whether to include subcollections in the scan
  4. Review the duplicate groups in the results window
  5. Choose an action:
    • Move to Duplicates Collection — Adds duplicate copies to a new subcollection for review
    • Send to Trash — Keeps the best item, moves others to trash

Settings

Open Zotero Settings and select Collection De-dup (CESI) to configure:

  • Whether Include Subcollections is checked by default in the scan confirmation dialog
  • The child collection name used by Move to Duplicates Collection

Build from Source

git clone https://github.com/GuotuanWang/cesi.git
cd cesi
npm run build

Output files will be in the dist/ directory:

  • collection-dedup-en-x.x.x.xpi
  • collection-dedup-zh-CN-x.x.x.xpi

Run the compatibility checks with:

npm test

updates.json points to GitHub Release assets. For v0.4.0, create the v0.4.0 tag and attach both XPI files listed above.

How Duplicate Detection Works

The plugin uses a Union-Find algorithm to efficiently group duplicate items:

  1. Phase 1 — DOI Index: Items sharing the same normalized DOI are grouped
  2. Phase 2 — ISBN Index: Items sharing any ISBN are grouped
  3. Phase 3 — Title Matching: Items with identical normalized titles are compared with tolerance:
    • Year: ±1 year difference allowed (missing year also matches)
    • Creator: First author's last name + first initial must match (missing creator also matches)

Title normalization removes punctuation, collapses whitespace, and lowercases text to handle minor formatting differences.

Project Structure

collection-dedup/
├── bootstrap.js           # Core plugin logic (shared reference)
├── manifest.json          # Plugin manifest template
├── package.json           # Build configuration
├── prefs.js               # Default plugin preferences
├── preferences.xhtml      # Zotero Settings pane template
├── preferences.css        # Zotero Settings pane styles
├── scripts/
│   ├── build-xpi.sh       # Build script for XPI packages
│   └── test-compatibility.js # Compatibility checks
├── variants/
│   ├── en/                # English variant
│   │   ├── bootstrap.js
│   │   ├── manifest.json
│   │   ├── prefs.js
│   │   ├── preferences.xhtml
│   │   └── preferences.css
│   └── zh-CN/             # Chinese variant
│       ├── bootstrap.js
│       ├── manifest.json
│       ├── prefs.js
│       ├── preferences.xhtml
│       └── preferences.css
├── updates.json           # Zotero automatic update manifest
└── dist/                  # Build output (XPI files)

License

MIT

Contributing

Issues and pull requests are welcome! If you find a bug or have a feature request, please open an issue.

About

Zotero 7/8/9/10 plugin for collection-scoped duplicate detection | Zotero 分类范围查重插件

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages