I made a translator: how do I make it public?

Hi all,
I wrote a simple translator for the site of the research group I belong.

http://www.ubc.uevora.pt/index.php?option=com_jombib&Itemid=61

We publish a good number of references (actually 6200 but very soon they will be 20000+) for the conservation biology field and I have been asked to make them "zotero compatibles".

As I have control also on the page output I adapted it at the tutorial on how write a translator with Scaffold, so it took only a few hours.

The translator can indeed be better, but for now it work pretty fairly.

In particular I have a couple of questions for now:

what is the name field for storing the keywords (bibtex field "keywords") and how do I change the "entrytype", example (referring to the Bibtex format): @BOOK{ or @ARTICLE{

thanks in advance
  • The best way to make a Zotero translator public is to post it here: http://groups.google.com/group/zotero-dev and then post on this message board that you have done so. Politely request that someone review it and if all goes well it should be made available in short order.

    How you change the entry type depends largely on how you've decided to write your code.

    Your doWeb function should at some point tell Zotero what kind of entry you are creating. You say your code already works, so you must have something like this already.

    Most translators follow the following pattern:

    var newItem = new Zotero.Item("book");

    The variable name is unimportant, but the rest is needed.

    This entry would obviously be a book. If you want to change it to something else, simply change the word between the quotes. Use camelCase for entry types that use more than 1 word: new Zotero.Item("journalArticle") for example.

    If you need to know what entry types are available just go to any saved Zotero entry and click on the drop down menu and copy the spelling you see there.

    To create keywords, the name field is "tags". It creates an array, so you can add multiple tags. The easiest way I know to make tags is : newItem.tags[y] = locationOfTagsGoesHere.

    If you have more than 1 tag, use a loop to iterate through your list of tags and put them all into Zotero.

    Hope that answers your questions

    Adam
  • Hi again,
    thanks for the advices.

    I made the final adjustments to the translator and then I posted it on the zotero-dev mailing list as asked.

    http://groups.google.com/group/zotero-dev/browse_thread/thread/6bb2833ba124e735


    Taka care
Sign In or Register to comment.