working blind on Zotero translators
Hi all.
I have inherited some Zotero translators that I have to update and maintain. I am working on a system that is not connected to the internet, and all of the translators are customized for our internal sites' various document types.
I know that Zotero has a Scaffold tool for developing and editing translators, but I can't get our sites' pages to load in the browser tab of Scaffold (issue with certs). I have been using Notepad++ to edit the translators, but I have not found an easy consistent way to get direct feedback in the process. I saw a Zotero.debug() function, but I enabled debugging and while the output log was quite lengthy, it never logged anything I attempted to output to it. I have also tried to use an alertMessage() function (bascially alert()) to pass back information on what the translator sees, but I have not had any luck producing an alert message, and I read somewhere that Zotero is contained and won't access the browser window to send the alert (though I think one of the translators did at one point issue an alert that was coded into the translator by the original author). Console.log() doesn't work either.
The only success I have had with getting direct feedback so far was to hard replace metadata on my new Zotero item with variables from the javascript and then see them show up when the item is saved to the library. It has only limited success, and isn't practical for the amount of work I have to do and the amount of direct feedback I need in order to understand why a translator is no longer finding various metadata.
In sum, I need a way to quickly get feedback from within functions to see what values went into the function and how values are changing within the function. Otherwise, I just have blank spots where metadata should be and no way to figure out where it's failing.
Thanks for any help you can provide here.
I have inherited some Zotero translators that I have to update and maintain. I am working on a system that is not connected to the internet, and all of the translators are customized for our internal sites' various document types.
I know that Zotero has a Scaffold tool for developing and editing translators, but I can't get our sites' pages to load in the browser tab of Scaffold (issue with certs). I have been using Notepad++ to edit the translators, but I have not found an easy consistent way to get direct feedback in the process. I saw a Zotero.debug() function, but I enabled debugging and while the output log was quite lengthy, it never logged anything I attempted to output to it. I have also tried to use an alertMessage() function (bascially alert()) to pass back information on what the translator sees, but I have not had any luck producing an alert message, and I read somewhere that Zotero is contained and won't access the browser window to send the alert (though I think one of the translators did at one point issue an alert that was coded into the translator by the original author). Console.log() doesn't work either.
The only success I have had with getting direct feedback so far was to hard replace metadata on my new Zotero item with variables from the javascript and then see them show up when the item is saved to the library. It has only limited success, and isn't practical for the amount of work I have to do and the amount of direct feedback I need in order to understand why a translator is no longer finding various metadata.
In sum, I need a way to quickly get feedback from within functions to see what values went into the function and how values are changing within the function. Otherwise, I just have blank spots where metadata should be and no way to figure out where it's failing.
Thanks for any help you can provide here.
-
dstillmanedited 5 days agoPlease post development questions to zotero-dev. (We've asked you to do this twice before.)
This discussion has been closed.