Custom translator for notes?

Is it possible to write a custom export translator for notes, in the same way that you can for bibliography items?

I've been searching these forums and the docs but I couldn't find anything.

TIA.

Best, Darren
  • edited October 23, 2024
    Hi Darren,

    EDIT: There is a much better solution, thanks to AbeJellinek.
    ---
    I had the same question and got a quick-and-dirty solution working:
    You need to edit the built-in translator “Note Markdown.js”
    (on Windows located in “C:\Users\$USER\Zotero\$YOUR_PROFILE\translators”)

    I changed the name of the original doExport() function to “function orig_doExport()” and simply added my own doExport().

    I'm no longer able to convert notes to Markdown, but I don't need this functionality anyway.

    Best, Henrik
  • Addendum:
    You could also edit the translator "Note HTML.js" and keep the Markdown-translator.
    Both are hard-coded, according to https://github.com/zotero/zotero/blob/a2ed2c8b12e18ce8f55aac564704dbee92e90e0f/chrome/content/zotero/fileInterface.js#L73.
  • No need to edit Note HTML. You can add a new translator and set "configOptions" to { "noteTranslator": true } (see this line).
  • Thanks AbeJellinek, that's a much better solution!
    I can't believe I just needed to look 5 lines up...

    After adding this option and restarting Zotero, everything simply works:
Sign In or Register to comment.