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
I've been searching these forums and the docs but I couldn't find anything.
TIA.
Best, 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
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.
"configOptions"
to{ "noteTranslator": true }
(see this line).I can't believe I just needed to look 5 lines up...
After adding this option and restarting Zotero, everything simply works:
https://s3.amazonaws.com/zotero.org/images/forums/u6266655/uo96fdgg40l7stebzrqu.png