When using Zotero for reference management, you may on occasion want to work with the PDF files from outside of Zotero. For example, if you’re a DEVONthink user, you will at some point discover the power of indexing your local Zotero database from DEVONthink. However, when viewing or manipulating the PDF files from outside of Zotero, you may run into the following problem: when looking at a given PDF file, how do you find out which Zotero entry it belongs to?
I developed Zowie (a loose acronym for “Zotero link writer”, and pronounced like the interjection), an open-source program to help deal with this problem. Zowie scans through the files in a local Zotero database, looks up the Zotero bibliographic record corresponding to each PDF file found, and writes a Zotero select link into the PDF file and/or certain macOS Finder/Spotlight metadata fields (depending on the user’s choice). A Zotero select link has the form zotero://select/...
and when opened on macOS, causes the Zotero desktop application to open that item in your database. Zowie thus makes it possible to go from a PDF file opened in an application other than Zotero (e.g., DEVONthink, Adobe Acrobat), to the Zotero record corresponding to that PDF file.
In DEVONthink, I index the folder containing my local Zotero database of PDF files. Using Zowie to write the Zotero select link into the Finder comments of every PDF file means that within DEVONthink, the Zotero link will appear in the Annotations & Reminders inspector, in the Finder Comments box. For example:
The nice thing about having the Zotero select link accessible from DEVONthink is that you can create smart rules to manipulate it further. For example, I use the following smart rule to copy the Zotero select link from the Finder Comments to the “URL” field of each PDF file indexed in DEVONthink:
where the following is the simple embedded script:
Zowie is written in Python. A ready-to-run executable is available for macOS 10.13–10.14; for macOS versions after 10.14, Zowie needs the user to have a Python 3 environment on their computer. Zowie can be downloaded from the project home on GitHub, and is also is available from PyPI for installation via pip
.
As with all such open-source user-contributed software, there are no guarantees about safety, functionality, or support. I hope it works for you, but I can’t promise that something terrible won’t happen to any of your files, or your computer.
Update 2020-12-29: Zowie version 1.1 now processes all files it finds, not just PDF files (because people put more than just PDF files in their Zotero databases). There is a new flag, -f
, that lets you control which files it acts on. In addition, a self-contained ready-to-run binary is now available for macOS versions 10.13 (High Sierra) and 10.14 (Mojave) – no Python needed! (The binary may or may not run on 10.15 or later, depending on your macOS security settings. I hope to work around that limitation eventually.)