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.
Consider if BibTeX with post-processing will do what you need. otherwise you'll need to run a fully custom export translator.