Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dev:translators:scaffold [2017/11/12 19:53] – external edit 127.0.0.1dev:translators:scaffold [2018/02/09 03:06] – Update further, add new screenshot zuphilip
Line 7: Line 7:
 ====== Scaffold - an IDE for Zotero translators ====== ====== Scaffold - an IDE for Zotero translators ======
  
-Translators are stored as individual JavaScript files in the "translators" subdirectory of the [[:zotero_data|Zotero data directory]]. While translators can be edited with any tool, Scaffold is a Firefox add-on dedicated to writing Zotero translators, offering advantages such as real-time testing and debugging.+Translators are stored as individual JavaScript files with additional metadata at the top and tests at the bottom in the "translators" subdirectory of the [[:zotero_data|Zotero data directory]]. While translators can be edited with any tool, Scaffold is dedicated to writing Zotero translators, offering advantages such as real-time testing and debugging.
  
 Scaffold supports editing and testing web translators and import translators. Search and export translators can not yet be tested using the IDE. Scaffold supports editing and testing web translators and import translators. Search and export translators can not yet be tested using the IDE.
 +
 +
 ===== Installation ===== ===== Installation =====
  
-  * [[https://github.com/zotero/scaffold/releases/latest|Install Scaffold]]+Scaffold does run within Zotero 5.0 as an [[:plugins|plugin]], which is installed by the following steps:
  
-Scaffold 3 includes support for the [[dev:translators:testing|automated translator testing]] system that was introduced in Zotero 2.1.9as well as for specifying [[dev:translators:connectors|connector compatibility]]. Documentation for these features is not yet available.+  * Download the XPI file of the [[https://github.com/zotero/scaffold/releases/latest|latest release of Scaffold]] 
 +  * Open Zotero 
 +  * Tools -> Add-ons -> (gear wheel) -> Install Add-on From File 
 + 
 +Previously to Zotero Version 5.0Scaffold was a Firefox Plugin.
  
-Scaffold does not run in Zotero Standalone. 
  
-**Note:** Scaffold will not work correctly when Zotero Standalone is open, as Zotero in Firefox will switch to "connector mode", disabling key features that Scaffold relies upon. Just make sure to keep Zotero Standalone closed while using Scaffold, and everything should work well. 
 ===== Interface ===== ===== Interface =====
  
-After installation, the "Tools" menu in Firefox should contain a "Scaffold" item. (If you don't have a Tools menu, see the Firefox instructions on how to [[https://support.mozilla.org/en-US/kb/what-happened-to-the-file-edit-and-view-menus|show the Menu Bar again]].)  +After installation, the "Tools" menu in Zotero should contain a "Scaffold" item.
  
 Selecting the Tools menu's "Scaffold" item opens the main Scaffold window: Selecting the Tools menu's "Scaffold" item opens the main Scaffold window:
  
-{{:dev:scaffold2.0-metadata.png?640&nocache&nolink|}}+{{:dev:translators:scaffold.png?640&nocache&nolink|}}
  
 ==== Top buttons ==== ==== Top buttons ====
Line 36: Line 40:
  
 {{:dev:detectweb.png?nocache&nolink|}} **Run detectWeb** \\  {{:dev:detectweb.png?nocache&nolink|}} **Run detectWeb** \\ 
-Saves and runs the ''detectWeb'' function of the translator code on the site loaded in the most recently selected tab.+Saves and runs the ''detectWeb'' function of the translator code on the site loaded in the browser tab.
  
 {{:dev:doweb.png?nocache&nolink|}} **Run doWeb** \\  {{:dev:doweb.png?nocache&nolink|}} **Run doWeb** \\ 
-Saves and runs the ''doWeb'' function of the translator code on the site loaded in the most recently selected tab.+Saves and runs the ''doWeb'' function of the translator code on the site loaded in the browser tab. 
 + 
 +{{:dev:translators:detectimport.png?nocache&nolink|}} **Run detectImport** \\  
 +Saves and runs the ''detectImport'' function of the translator code on the content entered in the Import tab. 
 + 
 +{{:dev:translators:doimport.png?nocache&nolink|}} **Run doImport** \\  
 +Saves and runs the ''doImport'' function of the translator code on the content entered in the Import tab. 
  
 ==== Tabs ==== ==== Tabs ====
Line 45: Line 56:
 **Metadata** \\ Shows the translator metadata. Translator IDs can be generated via the "Generate" button. The target regular expression can be tested with the "Test Regex" button. **Metadata** \\ Shows the translator metadata. Translator IDs can be generated via the "Generate" button. The target regular expression can be tested with the "Test Regex" button.
  
-**Code** \\ The text box in this tab contains the translator's JavaScript code:+**Code** \\ The text box in this tab contains the translator's JavaScript code. The editor supports syntax highlighting, folding of code parts, and search and replace. 
 + 
 +**Import** \\ For import translator you can copy here test data to import. 
 + 
 +**Tests**\\ This tab contains the data for all test cases saved with the translator, which is currently open. 
 + 
 +**Testing**\\ This is a list of all test cases for the current translator, which you can run, check or update.
  
-{{:dev:scaffold2.0-code.png?640&nocache&nolink|}}+**Browser**\\ You can open specified URLs in the browser tab and then test the detection and data extraction for that website.
  
 ==== Debug Output ==== ==== Debug Output ====
Line 108: Line 125:
 In the translator load window, import translators are arranged in alphabetical order at the bottom of the list. In the translator load window, import translators are arranged in alphabetical order at the bottom of the list.
  
-**Note:** The screenshots on this page do not reflect the changes made in Scaffold 2.1.2 to add support for import translators. 
  
 ===== Scaffold Troubleshooting ===== ===== Scaffold Troubleshooting =====
dev/translators/scaffold.txt · Last modified: 2023/01/30 09:02 by boconnell