This is a much needed feature!
I had a look what it would take to implement a Zotero-Logseq bridge. Most of the work would need to be done on the Zotero side.
Zotero stores the pdf annotations and the notes in its sqlite database.
While it Zotero can export notes to .md, the process assembles the note from the database and currently does not include the images.
The images are stored in the zotero/storage folder as .png images, just like the other Zotero items.
In my opinion, the easiest way to go about this in an open interoperable fashion, avoiding interactions with the Zotero database as much as possible, would be the following:
- Zotero needs a plugin that automatically exports all notes as .md files to a folder zotero/exportedNotes and does a one-way synchronization, i.e. when the notes change in the database, it re-exports the corresponding note, but when the .md file is edited on disk, Zotero does not update its database. In principle it would be nice, but too much work initially and not critical. There is a plugin that keeps a synchronized .bib file, so in principle it is possible.
- The exported markdown files link to the images in the zotero/storage folder and should be augmented with zotero:// links to the parent item, the note itself, any pdfs etc.
- Logseq needs a “watch folder” option, i.e. the ability to add folders outside of the Logseq vault and automatically update its index if new files appear in this folder. Such an option would be useful for integration with many other tools.
- Logseq includes the zotero/exportedNotes folder as a read-only watch folder, as changes won’t be propagated back to Zotero, at least initially.
- exportedNotes can be read in Logseq, but not edited.
- Notes created in Logseq can link to, and more importantly, include paragraphs of Zotero notes.
This would permit the following workflow:
- Articles are captured in Zotero (there is no alternative).
- Articles are annotated in Zotero (unless Logseq replicates all of the Zotero notes functionality, there is no realistic alternative either, currently the Logseq pdf reader integration and annotation is still inferior to Zotero. For adding citations, Logseq can directly communicate with Zotero locally, like Office does. Logseq should have a citation picker for Zotero anyway, here is one for vscode: Citation Picker for Zotero - Visual Studio Marketplace).
- If the article has no note, in can be directly referenced in Logseq using the citation picker.
- If the article has a note, that note will be automatically exported into the folder and will be read-only from the Logseq side.
- The notes can then be assembled in Logseq into longer documents.
- Notes will have tags from Zotero, so an advanced Logseq search could automatically assemble notes into topic collections.
- Research is done in Logseq by including the exported Zotero notes using page and block references.
The alternative would be to create a database connection to Zotero and create the notes in Logseq on the fly. I don’t think the Zotero design would allow this, the sqlite DB is locked and can’t even be read if Zotero is running.
While it might seem convenient at first, the Zotero web API is no alternative:
- It would lock users into Zotero subscriptions forever.
- Subscription costs would be substantial, as not only the database, but also the files will have to be online, so the free tier will not be enough. This means $120/y for any larger collection.
- Doesn’t work when offline or if the Zotero servers are down.
- There is no easy or supported way to run a local Zotero server.
- Having all files, notes etc. online is a serious privacy issue. Many researchers do not want all of their research notes leaked. It is just a question of time before the Zotero servers get breached.