The key to exporting is translate.js
It seems that the translate() method is supposed to take an argument (line 702) but this argument doesn't appear to work, at least not for me.
To get the export to save files I had to do this:
translatorObj = new Zotero.Translate("export");
var possibleTranslators = translatorObj.getTranslators();
t = possibleTranslators[0]; //Zotero RDF
t.displayOptions["exportFileData"] = true; //This works
translatorObj.setTranslator(t);
It seems that the translate() method is supposed to take an argument (line 702) but this argument doesn't appear to work, at least not for me.
It also seems that if you try to run the RDF translator without a file target it doesn't generate the output as a string, whereas this works fine for MODS output.
You can see more at our Trac site where we are working towards an add-on that will supplement Zotero and use the notifier to log all changes to your library out to disk.
On 11/2/09 12:15 AM, Peter Sefton wrote:Don't know what you mean by this.It seems that the translate() method is supposed to take an argument (line 702) but this argument doesn't appear to work, at least not for me.
t.displayOptions["exportFileData"] = true;
This may be a current limitation of RDF support—Simon would be able to comment.
It also seems that if you try to run the RDF translator without a file target it doesn't generate the output as a string, whereas this works fine for MODS output.
The Notifier is primarily used for UI updates, which are a bit more forgiving, so let us know if you run into any glitches/inconsistencies.
You can see more at our Trac site where we are working towards an add-on that will supplement Zotero and use the notifier to log all changes to your library out to disk.
No, it just doesn't do what you think it does. That parameter exists
only to allow callers to exclude attachment items on import—for example,
in the PDF recognizer, which only needs to save a regular item even if
the translator supports snapshots. It defaults to true, as indicated, so
there's never any need to pass true.
I'll add a comment to clarify this.
> I have to set the displayOptions on the translator itself
That is correct.