Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
dev:scaffold [2011/04/05 16:35] – add more troubleshooting ajlyon | dev:scaffold [2011/04/15 11:16] – rmzelle | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Scaffold - an IDE for Zotero translators ====== | + | See [[/support/dev/translators/ |
- | + | ||
- | Translators in Zotero 2.x are stored as individual JavaScript files in the " | + | |
- | + | ||
- | ===== Installation ===== | + | |
- | + | ||
- | Separate versions of Scaffold exist for Zotero 2.0 and 2.1: | + | |
- | + | ||
- | [[http://bitbucket.org/rmzelle/scaffold/ | + | |
- | (compatible with Zotero 2.1.x, released February 27, 2011) | + | |
- | + | ||
- | [[http:// | + | |
- | + | ||
- | ===== Interface ===== | + | |
- | + | ||
- | After installation, | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | ==== Top buttons ==== | + | |
- | + | ||
- | {{: | + | |
- | Opens the "Load Translator" | + | |
- | + | ||
- | {{: | + | |
- | Saves the translator you are currently working on. Provide a unique label and translator ID for your translator if you don't want to overwrite an existing translator. New translator IDs can be automatically generated via the " | + | |
- | + | ||
- | {{: | + | |
- | Saves and runs the '' | + | |
- | + | ||
- | {{: | + | |
- | Saves and runs the '' | + | |
- | + | ||
- | ==== Tabs ==== | + | |
- | + | ||
- | **Metadata** \\ Shows the translator metadata. Translator IDs can be generated via the " | + | |
- | + | ||
- | **Code** \\ The text box in this tab contains the translator' | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | ==== Debug Output ==== | + | |
- | + | ||
- | The main strength of Scaffold is its ability to provide you with immediate feedback, which can dramatically speed up translator development. After a code change, a single click suffices to run the modified translator and generate debug output. The following types of debug output can be generated: | + | |
- | + | ||
- | === Metadata === | + | |
- | When the "Test Regex" button in the " | + | |
- | + | ||
- | < | + | |
- | 09:54:11 ===> | + | |
- | </ | + | |
- | + | ||
- | === detectWeb and doWeb === | + | |
- | + | ||
- | When the "Run detectWeb" | + | |
- | + | ||
- | Debug output for the '' | + | |
- | + | ||
- | < | + | |
- | 19:19:43 detectWeb returned type " | + | |
- | </ | + | |
- | + | ||
- | Debug output for the '' | + | |
- | + | ||
- | < | + | |
- | 19:24:21 Returned item: | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | + | ||
- | 19:24:21 Translation successful | + | |
- | </ | + | |
- | + | ||
- | If running '' | + | |
- | + | ||
- | ===== Scaffold Troubleshooting ===== | + | |
- | * **Why does my translator work in Scaffold but not when I click on the address bar icon in my browser? | + | |
- | Scaffold runs the functions '' | + | |
- | + | ||
- | This can differ from the active document in Firefox when the '' | + | |
- | + | ||
- | * **Why won't my attachments save?** | + | |
- | * **Why do some fields show in the output pane but not in the created item?** | + | |
- | The output pane in Scaffold shows the item object as Zotero is about to save it-- it does not in fact save the object. As an item is saved, the contents of some fields may change. | + | |
- | + | ||
- | The attachment information in the output pane of Scaffold merely says what Zotero is going to try to save; as the attachments are saved, they may be discarded if their actual MIME type differs from the one specified, as can happen when PDFs or other attachments are hidden by providers behind an interstitial terms or copyright notice page. | + | |
- | + | ||
- | Fields that are not allowed for the specified item type will be discarded, even if they show up in the output pane of Scaffold. | + |