Cornell University Library

Digital Scholarship Guides

Zotero optimization guide

There are several easy-to-use plugins and scripts that can help optimize your use of Zotero.

Scripts vs. Plugins

Scripts are independently developed and deployed pieces of JavaScript that can be executed in Zotero desktop using the Tools > Developer > Run JavaScript setting. These scripts are written by random individuals contributing to the Zotero community, and are not affiliated with Zotero’s team or vetted in any way.

Plugins are independent pieces of software (generally, a series of scripts), usually Cross-Platform Install (.xpi) files, that function in Zotero through the Tools > Plugins setting. Zotero maintains a list of plugins on their official website. This list is not comprehensive, but includes some of the most-used and best-supported plugins. You can also search for plugins on GitHub. Note that Zotero does not guarantee that any of the plugins on this list are secure, reliable, updated, nor active. Be sure to check information about the file on GitHub or the hosting repository before downloading.

Installing Scripts

To run scripts:

  1. Open Zotero.
  2. Open the settings menu bar on your device and click Tools.
  3. Under Tools, select Developer > Run JavaScript.
  4. Download the script you want to use (the JavaScript file, ending in .js) from GitHub or another repository.
  5. Copy the code from the JavaScript file and paste it into the pop-up box.
  6. To execute the script, click Run.

Note that some scripts will ask you to do something—like select the files you want to bulk edit—before you click Run. For specific instructions on how to operate each script, check the documentation on the script’s page on GitHub or another repository. If no documentation is available, you can reach out to the Digital CoLab for assistance and troubleshooting.

Installing Plugins

To install plugins:

  1. Download the desired .xpi file to your computer.
  2. Open Zotero.
  3. Open the settings menu bar on your device and click Tools.
  4. Under Tools, select Plugins.
  5. In the newly opened “Plugins Manager” window, click the Settings gear icon.
  6. Select “Install Plugin from File” and click on the .xpi file. The plugin should now be active.

Note that you will be unable to download .xpi files by default on Firefox. If you’re having issues downloading .xpi files, try a different browser.

Common Scripts & Plugins

Bulk Editing

thalient-ai’s zotero-bulk-edit script can aid in editing the fields and item types for multiple entries at once, a feature not currently native to Zotero 7. This script builds off of Henrik Schönemann’s Search & Replace script, which enables batch-editing in Zotero. Note that Search & Replace is usable, but has been archived by the developer, and is not currently being supported.

Pinning Items

Dominic-DallOsto’s zotero-pin-items plugin enables you to pin specific items from your library collections to the top of the screen, which can be helpful for quickly accessing documents you refer to all the time. To pin items:

  1. Right click on the item in Zotero.
  2. Click “Pin Item” at the bottom of the options menu.
    The plugin allows you to sort pins in a particular order as well.

Optical Character Recognition (OCR)

OCR can turn your PDFs into machine-readable documents that can be highlighted, copies, and more. Note that Apple computers now have built-in OCR for downloaded PDFs. However, if you’d like Zotero to perform OCR on your items using Tesseract, you can use the zotero-ocr plugin by the Universitätsbibliothek Mannheim to do so.

The setup for this plugin is more complex than others, so please reference the documentation on the Zotero OCR GitHub page. If this plugin does not performs OCR to your satisfaction, or if your PDF is in a language other than English, librarians in the Digital CoLab can assist you. Please refer to the Zotero at Cornell LibGuide and the Text as Data LibGuide.

Obsidian Integration

Better Notes is an extremely popular plugin that allows you to sync notes between Zotero and Obsidian. The syncing operates both ways: when you edit the note in Obsidian, the Zotero note will update and vice versa. To sync a note:

  1. Right click on the note in Zotero and click “Export Note.”
  2. In the new pop-up box, select “Convert linked notes to standalone exports” and check the “Set auto-sync for each note” box.
  3. In the next window, select your Obsidian vault folder where you’d like the notes to go. You can select the top vault folder, or a specific folder within your vault.
  4. Click “Open” . Your note should appear in Obsidian.

These notes are like any ordinary note in Obsidian, but have metadata that allows them to sync with Zotero. You can hide this metadata table if you wish, but we advise against changing it, as this can distort the syncing. You can use this notes in Canvases, apply other Obsidian plugins to them, and generally treat them as regular notes

Zotero CLI

If you’d like to manage Zotero through the command line instead of the GUI application, you can do so using the zotero-cli script bye Johannes Baiter. This script differs from others in that you download it through the command line. Note that the Zotero CLI script is dependent on Python and pip. To install:

  1. Open a command-line interface.
  2. Run $ pip install zotero-cli.

Finding Scripts & Plugins

While scripts and plugins are developed and posted all over the web, here are some places you can start searching:

Plugins

Scripts

Note that Cornell University Library is not responsible for anything linked on this page, and as such, cannot guarantee the security, safety, or proper use of any of these scripts or plugins.

Saving Space

If you’re having trouble with storage space on Zotero, and are unable to pay for upgraded storage, there are a few command-line tools that can help optimize and compress the size of PDFs.

WARNING

The following section introduces breaking changes to your local Zotero directory, and can result in loss of functions is executed incorrectly. The code below has not been rigorously tested, nor extensively peer-reviewed, and we can make no guarantees that it will be successful nor that it will not result in loss of function. Proceed at your own risk, and make sure to create a backup of your Zotero library before proceeding.

gs-batch

gs-batch is a command-line tool written by kompre that executes a Ghostscript script on PDF files in any directory on your computer.

on this page