Pick a random paper from Zotero

Here’s how to select a paper at random from Zotero.

  1. In Zotero, select the folder you want to select the paper from.
  2. Open up the Javascript dialog at:

Tools → Developer → Run Javascript

Paste in the following code

var ZoteroPane = Zotero.getActiveZoteroPane();
var currentCollection = ZoteroPane.getSelectedCollection();
var items = currentCollection.getChildItems();
var i = Math.floor(Math.random() * items.length);
var item = items[i]
item._displayTitle

This will show the title of a random paper.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s