Skip to content

{ Tag Archives } Chickenfoot

copying to clipboard Zotero citations as HTML w/ chickenfoot

Here's a first pass at a Chickenfoot script that copies selected Zotero items as HTML to the clipboard.  (I couldn't find anything in the Zotero interface to do exactly this function.  There is a  Create Bibliography from Selected Item(s)->Copy to Clipboard but that seems to copy citations as RTF for me.) var Zotero = chromeWindow.Zotero; […]

Also tagged

Range of creator types in Zotero

One thing that I didn't know about Zotero was the range of creator types in Zotero. Here's a Chickenfoot script that you can run to list them: // to explore the range of creatorTypes // to do: figure out how to get localized string for different creator types var Zotero = chromeWindow.Zotero; var creatorTypes = […]

Also tagged

Accessing attributes of Zotero Items

The following Chickenfoot script demonstrates how to access attributes related to Zotero items. (I've run this script on both Zotero 1.0.7 and the latest named release of  Zotero 1.5 Sync Preview (1.5-sync3.5))): // zotero_item_show_pieces.js // code to extract elements of the first selected item // Dec 16, 2008 var Zotero = chromeWindow.Zotero; var ZoteroPane = […]

Also tagged

Getting primary and secondary item types in Zotero

A Chickenfoot script for calculating the primary and secondary Zotero items (which draws upon the code in overlay.js->onLoad(): // based on var Zotero = chromeWindow.Zotero; var itemTypes = Zotero.ItemTypes.getPrimaryTypes(); for(var i = 0; i<itemTypes.length; i++) { output (itemTypes[i]['name'] + ":" + itemTypes[i]['id']); } var itemTypes = Zotero.ItemTypes.getSecondaryTypes(); for(var i = 0; i<itemTypes.length; i++) { output (itemTypes[i]['name'] + ":" + itemTypes[i]['id']); } The output of the script is (for […]

Also tagged

A screencast to show Chickenfoot scripting of Zotero

Several weeks ago, I wrote (a blog post and a post on the zotero-dev group) on how to use Chickenfoot to script Zotero. I'm starting to experiment with creating little videos that I hope will make my technical posts easier to understand. Here's one I just made to illustrate what I wrote about in the […]

Also tagged ,

adding all Firefox tabs to Zotero using Chickenfoot

We can now build on what was presented in the previous blog post: Adding items to Zotero with Chickenfoot. The end goal is to loop through all the tabs and add Each of them as items into Zotero. So we need to figure out how to access the tabs. I would do so here by […]

Also tagged

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 […]

Also tagged

Listing the URLs of all my current Firefox tabs using Chickenfoot

Here's some code I figured out for doing so that I believe should work: var tabBrowser = getTabBrowser(chromeWindow); var tabs = tabBrowser.mTabBox._tabs.childNodes; for (var i=0; i <tabs.length; i++) { var browser = tabBrowser.getBrowserForTab(tabs[i]); output(browser.contentWindow.location); } It took me a while to gather the pieces, and I'll have to explain how I did it — but […]

Also tagged

Accessing Zotero via Chickenfoot: a warm up exercise

I'm currently learning how to program Zotero, specifically how to integrate Zotero with other applications. I document my learning experience to make it easier for others to learn what I've learned. Note that I'm still learning (I'm far from an expert) — so I think my advice will improve over time. But it decided not […]

Also tagged