Custom export translators?

Is it possible to set custom export translators?

Use case: I want to be able to export a certain folder as a keep-updated .bib with the option to select from a number of custom translators, in this case, different better biblatex translators that omit certain information.

e.g. One of them would export all fields while the other would export a very cleaned up version that only includes authors, title, date, and journal, and doi for example. While I might have another custom translator that includes the file path and url.

I know the BetterBibLatex plugin lets you set these filters but they apply to every export, so we would have to manually go and edit those every time we want to export. It would be much better to just select from a predefined list of custom translators.

If I modify a translator in the translators folder, it doesn't show up in the export options.

Is this even possible?
  • Generally the answer is yes -- you'll want to make sure to change not just the translator title but also the unique id and then restart Zotero for the custom translators to register.
    I don't exactly know what BBT does in terms of additional functionality for translators and if that works in custom translators, but I'd think it does. If you can't get it to work, test with stock bibtex, and if it works there, ask the BBT developer for advice on his github.
  • edited March 26, 2023
    I know the BetterBibLatex plugin lets you set these filters but they apply to every export, so we would have to manually go and edit those every time we want to export. It would be much better to just select from a predefined list of custom translators.
    You can use a single postscript and test for the export directory in a postscript (Translator.exportDir), or you can use external per-directory preferences or external per-directory postscripts. Using any one of these will disable the cache for those exports though.

    While I think the modified translators should work (not sure about caching, but you can disable the cache in the modified translators), I don't expect auto-export for non-BBT translators to work currently. The auto-export DB actively checks that only BBT translations get inserted, mostly to validate the per-auto-export settings, but it also vets the translationID.

    As an aside, for modified BBT translators I think it could be made to work, but not for all translators in general; all auto-exports happen on a worker thread, and for that I emulate a subset of the translator environment in the worker. Stuff that translators expect may be missing there.
Sign In or Register to comment.