Load and use (pipe) existing export translators
Hi, I'm very new to writing translators, so please forgive my ignorance.
What I'm trying to accomplish is to load BetterBibTeX extension which does almost precisely what I need except I'd like to embed it in some of my own syntax.
I've got a basic export translator that has it's own doExport() method, but I'm trying to load a different translator and get the result of the export in a string.
I've tried:
var item;
while(item = Zotero.nextItem())
{
var translator = Zotero.loadTranslator("import");
translator.setTranslator("f895aa0d-f28e-47fe-b247-2ea77c6ed583");
var test = translator.translate(item);
//var test = translator.doExport(item);
}
but it returns an error.
What I'm trying to accomplish is to load BetterBibTeX extension which does almost precisely what I need except I'd like to embed it in some of my own syntax.
I've got a basic export translator that has it's own doExport() method, but I'm trying to load a different translator and get the result of the export in a string.
I've tried:
var item;
while(item = Zotero.nextItem())
{
var translator = Zotero.loadTranslator("import");
translator.setTranslator("f895aa0d-f28e-47fe-b247-2ea77c6ed583");
var test = translator.translate(item);
//var test = translator.doExport(item);
}
but it returns an error.
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
Consider if BibTeX with post-processing will do what you need. otherwise you'll need to run a fully custom export translator.