2

Zotero translators handout

Embed Size (px)

DESCRIPTION

Handout with the basic of building a zotero translator in scaffold.

Citation preview

Page 1: Zotero translators handout

This is example code for a scraper type translator. It pulls informaon from a webpage to populate a Zotero item’s metadata.Built in scaffold it uses XPaths to tell Zotero where in the HTML informaon can be found.

Zotero has many item types, this allows the user to specify what type of item Zotero should assign. Complete list of item types available at hp://aurimasv.github.io/z2csl/typeMap.xml

Detect tells Zotero if the page it is currently on is one that contains a potenal item.

Title tells Zotero where the item’s tle can be found, this is a required field.

Zotero can also aach items to its records. The first item is simply a snapshot of the webpage. The second is the image file found on the webpage, which allows Zotero to download and associate images with its records.

You can assign paths for all the metadata elements that a Zotero item type has. The list of elements can be found at the same link from above.

The mulscraper is what allows Zotero to add mulple entries from a search results page. You need to add a detect so Zotero knows it is on a results page. Where to find the tles of each item to generate the list of possible entries, and the URL that leads to the individual item page where it can scrape the metadata.

You use what are known as regular expressions to tell Zotero how to clean up the metadata

Creating zotero translators using scaffold

Page 2: Zotero translators handout

Resources for creating zotero translators

Firefoxwww.mozilla.org

Zotero for Firefoxwww.zotero.org

Scaffoldwww.zotero.org/support/dev/translators/scaffold

HHow to Write a Zotero Translator (now out of date but sll useful)hp://niche-canada.org/member-projects/zotero-guide/chapter1.html

Updates to the previous guidehp://www.zotero.org/support/dev/how_to_write_a_zotero_translator_plusplus

Zotero Documentaonhp://www.zotero.org/support/dev/translators/codinghp://www.zotero.org/support/dev/translators/framework