Zotero Integration

By Sandra Schloen, May 2013

Updated by Miller Prosser, August 2016

OCHRE can fully integrate the entries in your Zotero bibliographic database, along with their tags without having to copy and/or import any of the data into OCHRE. Follow the steps below to set up OCHRE for Zotero integration.

In your Zotero library, go to Settings, Feeds/API. Create a new private key for OCHRE to use (you only need one key for your project). Currently, OCHRE only supports read-only operations, but features requiring write-access may be added in the future.

PLEASE NOTE: if you manage multiple keys for different groups, you will also need to specify read/write access for the key so that your OCHRE project can access it. Please contact the OCHRE Data Service if this applies to your project.

Configure the Bibliographies Inbox hierarchy to grant access to Zotero via the API. Enter the key information from Zotero (created above) in the appropriate fields in OCHRE so that OCHRE can communicate with your Zotero library. OCHRE will do the rest. PLEASE NOTE: if you have configured a Group library, then you must also provide the Group ID on the Access/Paths tab. The Group ID is usually a six digit number. It appears in the URL when you navigate to the library settings page of Zotero.

Within that hierarchy you can create items whose Zotero item keys are entered under “Catalogue Codes.” You would do this only if you wanted a copy of the Zotero item represented by a corresponding item within OCHRE. This is allowed, but not necessary, and would require a certain amount of coordination and maintenance. Typically you would skip this step.

The Zotero item key can be found embedded in the web address of the bibliography item in the online version of Zotero. It is typically eight characters long: e.g. AZ34GH83. Enter this code in the Zotero link field, then click the arrow? button.

If you View this item, OCHRE will look up the details from Zotero and present a Zotero-like View of this item.

The pick list in the View will retrieve a formatted bibliographic citation from Zotero.

AN INTEGRATED APPROACH!

Consider, instead, a different approach whereby we DO NOT actually import items into OCHRE or make them mirror OCHRE items. Here, for example, is an OCHRE query that queries against the Zotero database directly.


TO QUERY ZOTERO ITEMS:

Link the Predefined OCHRE variables into your project’s taxonomy in an appropriate context:

The Zotero API is currently somewhat limiting in which fields can be queried. Item type refers the values like Book, Book Section, Journal Article. The search term variable will search widely including title, publisher, and others.

Here is what a query for the Zotero tag “zoophyte” looks like in OCHRE:

And here is the result if you Perform the query. OCHRE fetches the result directly from Zotero but displays the resulting items as if they were OCHRE items. Notice that we’re using the Zotero icon to distinguish them from actual OCHRE items.

Click any item, as usual, to View its details (here we get the Zotero (default API) view).

TO LINK TO ZOTERO ITEMS FROM OCHRE:

Let’s say you want to use some of these bibliographic items from Zotero within OCHRE. Here is an example of how you can link these to a resource item within OCHRE.

Select the resource item to which you want to link the Zotero bibliographic items.

  1. Click its Links tab.

  2. Flip the Query Results into Checklist mode.

  3. Check on the items you want to link in.

  4. Use the Link-Checklist button to link them.

The resulting Links will look like this. Note that these links are now part of the description of this item and will be saved as part of the OCHRE database. That is, these are permanent OCHRE links based on the Zotero keys for these items. If you close OCHRE and come back into a new session, these links will still be here. OCHRE will know how to fetch the items as needed. Note that if the item is inadvertently deleted from the Zotero library (an act over which OCHRE has no control), OCHRE will have a backup label to identify the name of the item that was deleted. This will avoid a generic broken link. For example, if the item “A catalogue of British fossils” is deleted, the list would show (in place of the missing link) “<A catalogue of British fossils>”.

Here is what it looks like in the View of the Resource item.

Just as a final example, this is what a “Zotero tag”-based query would look like in end-user mode.

If, in this context, you click the “Select…” button, OCHRE will fetch your master list of tags from the Zotero database and make them available here as valid pick- list options.

If we select “alternation of generations” we get the same result as we would if we did this in Zotero:

We can do a variety of things with the queries. Here, for example, we’re asking for all Zotero entries tagged with BOTH zoophyte and alternation-of-generations.

Zotero bibliography items can be linked as Bibliography alongside native OCHRE bibliography items.

Click the Eye of Horus button to view a link. Click the reed leaf button to edit the page reference of the link.

We hope this gives you a sense as to how we can integrate Zotero bibliographic data within OCHRE with a minimum of duplication and additional effort. Also, the connection we’re creating is a very tight one, and makes it hard, even, to distinguish items that are native to Zotero vs. those that are native to OCHRE. In fact, we don’t need to distinguish them and can mix and match them as needed; OCHRE will keep straight where to find the actual content.

Quick-link to Zotero items

Having given OCHRE access to your Zotero bibliography as described above, you can use the Linked Items pane to search your bibliography directly. Simply select Zotero as the Category of link target and enter a search term in the Find item by name field. OCHRE will automatically use the API information already established to search the Zotero library and return a list of matching results. Flip into the Checklist Display format and use the insert-checklist button to link an item into an appropriate context in the usual way.