eta-template example to paste as block in Logseq as Markdown (WIP)
I am using BetterBibTeX QuickCopy eta-template to generate blocks for pasting into my https://logseq.com PKM.
I share my code as public gist on github for further refinement.
https://gist.github.com/acsr/7fced5d3f238dc6180fcdb76c9f82803
Currently I am struggling with serializing the relations list properly and have filed in an issue at https://github.com/retorquere/zotero-better-bibtex/issues/2779
There are further challenges like decoding html entities in the notes and fixing the http links as https (can be done in Javascript) and replacing them with select item links (zotero:// style local urls).
I avoid bloating this with the code from the gist.
Tipp: There you also find gists for Apple Automator using Python to convert tags between Logseq Markup and Zotero LF delimited list back and forth.
Feedback and experience welcome
I share my code as public gist on github for further refinement.
https://gist.github.com/acsr/7fced5d3f238dc6180fcdb76c9f82803
Currently I am struggling with serializing the relations list properly and have filed in an issue at https://github.com/retorquere/zotero-better-bibtex/issues/2779
There are further challenges like decoding html entities in the notes and fixing the http links as https (can be done in Javascript) and replacing them with select item links (zotero:// style local urls).
I avoid bloating this with the code from the gist.
Tipp: There you also find gists for Apple Automator using Python to convert tags between Logseq Markup and Zotero LF delimited list back and forth.
Feedback and experience welcome
There are still some flaws in my template to fix for different cases.
See https://gist.github.com/acsr/7fced5d3f238dc6180fcdb76c9f82803 for the current version.
Changes:
– proper handling of missing values
- proper handling of multiselected items after an update in BetterBibTeX due to flaws of the former code of the template.
I received a nice hint by @emilianoeheyns how to use the ETA playground webservice to craft eta templates and test and fix errors there without playing around in the eta-template field of BetterBibTeX. https://eta.js.org/playground
It uses an exported example it.item created via the debug ID creation of BetterBibTeX to test the export template.
You can go with my example shared here in @emilianoeheyns comment (including the hint to the ETA playground):
https://github.com/retorquere/zotero-better-bibtex/issues/2791#issuecomment-1951452904
This can speed up your trial & error a lot
The latest state is that I may go for a dedicated export translator for the creation of Logseq Markdown, freeing up the the BetterBibTeX eta-template for other nonsense.