Skip to content

Adding items to Zotero with Chickenfoot

Here I report a few code fragments that you can try in Chickenfoot to create a Zotero item from the contents in the selected tab of your browser. (For a bit of context for what I'm talking about here, see my previous post Data Unbound » Accessing Zotero via Chickenfoot: a warm up exercise.)

There's a difference between the Zotero function that is invoked if an appropriate translator is found verses when there is no translator (and you have to then "create a new item from current page". (It would be helpful to show you how I deduced what these code fragments should be — I hope to do so later.)

When there is an appropriate translator, you invoke Zotero_Browser.scrapeThisPage:

var Zotero_Browser = chromeWindow.Zotero_Browser;

When there isn't — and you add the page to Zotero as a web page using ZoteroPane.addItemFromPage:

var ZoteroPane = chromeWindow.ZoteroPane;

Yet to figure out: How to ask Zotero whether for the selected tab there is an appropriate translator to use.

{ 2 } Trackbacks

  1. […] We can now build on what was presented in the previous blog post: Adding items to Zotero with Chickenfoot. […]

  2. […] tab, even if a given tab had a translator that could be used to save the item. As explained in Adding items to Zotero with Chickenfoot, you can use Zotero_Browser.scrapeThisPage to invoke the appropriate translator for tab. The reason […]

Post a Comment

You must be logged in to post a comment.