A few people have posted about how they use Zotero (see, e.g., here and here, and also the pages here). AFAIK no one has done what you ask, but I have ideas about how it could be done.
First, I assume you are not using linked attachments, or else you wouldn’t be able to index the Zotero storage folder at all. My own setting in Zotero Preferences ▹ Advanced ▹ Files and Folders looks like this:
In the “data directory location”, Zotero creates a folder named storage
, which (as you probably noticed if you’re already indexing it) is a pile of subfolders having names like X34Q57FX
.
Unfortunately, at this file system level, Zotero does not distinguish or provide any indication at all of which record a folder is associated with: it’s all one homogeneous single-level pile of folders with attachments (PDFs for most people) within them. It turns out the X34Q57FX
folder names are keys that only have meaning to Zotero. This, in turn, means that from the standpoint of indexing in DEVONthink, it’s impossible to provide DEVONthink with any clue about any given folder’s membership in a Zotero collection.
The following are some ideas for possible workarounds. I haven’t implemented any of these myself and don’t know of anyone who has, but based on what I know and have done so far, these seem like they would work:
- Use an external (to DEVONthink) process to annotate either the folders themselves, or the files inside the folders (or both). For example, the external process could add Finder-level tags to the PDF files inside the various
X34Q57FX
folders, and different tags could represent different Zotero group names. This would allow you to index all of storage
in DEVONthink as usual, and then use a smart group to provide a view on a subset of items by searching for particular tags.
- Provide a way for DEVONthink to ask (somehow) Zotero about the collection membership of any given item indexed in the
storage
folder. Then you could (e.g.) create a smart rule that triggers on new additions imported in the indexed folder, runs some code to ask about the group membership of that item, and (e.g.) set a custom metadata field storing the group membership name. This would put the Zotero group name in a field on every Zotero PDF file in DEVONthink, and let you easily do things in DEVONthink (like create smart groups) based on the field value.
Option #1 would still require a way to ask Zotero about the group membership of any given item found in storage
, so both options require a method to do that. A potential problem with option #1 is that I don’t know whether Zotero’s handling of the storage
folder contents will preserve any attributes like tags or other things done to the folders and/or files, or cause problems in Zotero, so there’s chance #1 would be more fragile than option #2. But that’s just speculation.
As to methods to ask Zotero dynamically, I have actually been working on a general-purpose command-line tool to do that, and even have it working internally. I’m using it right now to get the BibTeX citekeys and store them in a custom metadata field. The tool is not ready for public use, but I hope to get it out there soon-ish. Alternatively, if you use Alfred, it might be possible to use ZotHero as part of a workflow that gets the necessary info.