Programmatic reference insertion to the flat ODF XML document
Hello!
I wondered if there are existing solutions to insert references to existing `.fodt` file? The use case is to change references being already inserted to document by Mendeley, to equivalent Zotero references assuming the libraries of both reference managers contain the same papers. I can parse flat XML in python, but couldn't find proper solution to programmatically insert Zotero references. I believe it might be implemented within LibreOffice Wire Protocol framework (https://www.zotero.org/support/dev/client_coding/libreoffice_plugin_wire_protocol) but may be there are better solutions. I am not fluent in js and Java so modifying the official Zotero integration plugin (https://github.com/zotero/zotero-libreoffice-integration) is not an option for now.
I wondered if there are existing solutions to insert references to existing `.fodt` file? The use case is to change references being already inserted to document by Mendeley, to equivalent Zotero references assuming the libraries of both reference managers contain the same papers. I can parse flat XML in python, but couldn't find proper solution to programmatically insert Zotero references. I believe it might be implemented within LibreOffice Wire Protocol framework (https://www.zotero.org/support/dev/client_coding/libreoffice_plugin_wire_protocol) but may be there are better solutions. I am not fluent in js and Java so modifying the official Zotero integration plugin (https://github.com/zotero/zotero-libreoffice-integration) is not an option for now.
There are some issues with mendeley2zotero import. Some citations did not exist in imported collection. As well pdf annotations looked very strange (annotation text was separated from the original part selected, instead having been linked to a sticky note). In result of this behavior I have a part of library items imported via "canonical" imported, with remain part imported manually, re-annotated also manually and merged if necessary with existing items. So, identifiers and citekeys might differ from those were present in the Mendeley library.
Could you please clarify some more things on interoprating items among different reference managers? What is the mechanism and what it rely on?
In Word, if you choose toggle field code for a citation, you could see the underlying csl fields as inserted by Zotero or Mendeley. Not sure how that works in LibreOffice.
If you imported items with the importer included in Zotero, and did not delete them, and later merged items imported in some other way with them, then they should still be linked with your document. Otherwise you will need to reinsert those items manually from your Zotero library. You can check to see if the item is linked to your library when clicking on the citation bubble and checking whether a "Show in Library" button appears. There will soon be a better, unified way to check all items cited in the document, but for now this is your only option.
Do note that it's not a problem to have cited items in a document that are not connected to your library unless you need to modify the item metadata in Zotero and want that reflected in your document.