Translations of this page:

Chapter 13: Metadata Tab

HWZT chapter 13 (Metadata Tab): mostly informational, all works in Scaffold 2.0 with no deltas (other than those previously described). However the next chapter (14, from which comes the following quote) “builds upon the translator started in [this chapter]” and assumes that, having “already created [this] translator you can find it again by opening Scaffold and clicking on [icon=Load From Database].” There are two problems with this statement, in descending seriousness:

  1. this chapter (13) does not describe saving the tutorial translator
  2. the icon's title is merely “Load” in Scaffold 2.0

So, to create and save the tutorial translator, do

  1. Close any running Scaffold 2.0 instances.
  2. Ensure the first sample page is open in your browser and has focus.
  3. Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog=“Zotero Scaffold”.
  4. If you are not already in tab=Metadata, select that.
  5. In field=Label, enter
    How to Write a Zotero Translator
  6. In field=Creator, enter your name
  7. In field=Target, enter
    /member-projects/zotero-guide
  8. Scaffold 2.0 will not save a translator without code (and it will silently refuse to do so), so switch to tab=Code, and enter
    function detectWeb(doc, url) {
      var x = "                     346                       " 
      x = x.replace(/^\s*|\s*$/g, '');
      Zotero.debug(x); 
    }

    (though any working code should do).

  9. Click icon=Save (second from left, looks like some tabs): your translator should save silently.

To test your translator saved properly,

  1. Close any running Scaffold 2.0 instances.
  2. Ensure the first sample page is open in your browser and has focus.
  3. Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog=“Zotero Scaffold” with little data in tab=Metadata.
  4. Hit icon=Load (the non-OS UI item closest to the upper left of the dialog) to popup dialog=“Load Translator”.
  5. Scroll through the “Load Translator” table until you see Label=
    How to Write a Zotero Translator

    The labels are in lexicographic order (after the first few), so expect to see it between label=“History Cooperative” and label=“Hurricane Digital Memory Bank”.

Next: Chapter 14: Scaffold DetectWeb Tab

dev/how_to_write_a_zotero_translator_2nd_edition/chapter_13.txt · Last modified: 2011/04/03 16:23 by debweb