Zotero plugin to export metadata and notes to markdown

I’ve seen a few people here use Zotero. I ended up writing a plugin to export metadata and annotations much like the zotero-roam-export plugin. It’s sort of made for my own workflow, but I thought I’d leave it here in case someone finds it useful: https://github.com/argenos/zotero-mdnotes

What I use the plugin for:

  • Extract metadata from the item and export the highlights from the PDFs using Zotfile (similar to zotero-roam-export ) and save them in markdown files. I get one file for each item selected. Originally I was using a single file per reference, but I’ve found it better to have more atomic notes, and I extract highlights based on color as described here. The metadata file contains links to the highlights/annotations. All those files are saved to a folder in my vault, and I can (optionally) choose to use cite keys (using Better Bibtex) as file names e.g. doe2020aaaa-zotero.md
  • Create a file for my own notes based on the naming above (minus the suffix) doe2020aaaa.md , and transcludes the metadata and adds a header for my notes. This is the one I use to link when I refer to the whole paper and as a sort of table of contents around specific ideas of that paper, i.e. I can “cite” the paper as [[doe2020aaaa]] .
  • Add all those files as linked attachments to the Zotero item, so that if I double click the markdown note is opened with the default markdown app from Zotero (if eventually the URL protocol is implemented, then the link can easily be switched to include obsidian:// ). This basically lets me go from one app to the other. In Obsidian, in the doe2020aaaa file I can write my own notes, and in preview mode I can also click on a link in that opens Zotero and selects the right item. In Zotero I can double click to edit my notes, or open it in Obsidian.

Disclaimer: it’s probably buggy, hacky, etc. I’m not really a javascript developer, I just wanted to automate that a bit.

7 Likes

Thanks very much for the plugin. It works perfectly. Thanks too for the useful notes on your workflow both here and in Zotero best practices.

Such a pleasure to be able to sync both these excellent programs and arrive at a more or less seamless workflow.

1 Like

Hello arg,
this is an amazing contribution. Because of the automatic backlink between notes feature of Zotero, I am considering using Zotero for my Zettelkasten. I just want to be sure that If I want to move my notes in the future to Obsidian or Zettlr, I will be able to do so.

I just installed it alongside these other plugins:

  • Better BibTex for Zotero
  • Zotero LibreOffice Integration
  • Zotfile
  • Zutilo Utility for Zotero
    on a machine running Ubuntu 18.04 and Zotero 5.0.89

I have not been able to export notes though. I select the destination folder and then nothing happens. Do you have any clue about what is going on?

Hi @ToniB, I suspect it’s related to what is being chosen. Unfortunately, I haven’t been able to make the menus context-aware yet (I am planning to add notifications for success/errors, but it’s going to take a little while). At the very top of the readme, there is a link of what needs to be selected for the menus to work: cheatsheet.

Let me know if that doesn’t work out for you! Feel free to reach out in the #academia channel in the Discord server too!

Hey @argentum I finally figure it out thanks to your comment. The problem is that I was trying to export standalone notes. When I export notes inside items, then it works perfectly.

By exporting some I noticed that the “relate” field is not kept in the md note (as a link to those notes), which I guess makes sense because that note could not exist if and I do not create it as well. Since that field is gold, I will not use Zotero as a Zettelkasten tool, yet your script is still pretty cool and I will use it for other ends in my workflow. Thank you again!

Oh yeah, at the moment I haven’t looked into those! Feel free to open an issue for them though, I think they might be easy to add. Would you place them below the H1 header of the md file?

Disclaimer: I do have a few pending requests, and it might take me a little time to get to all of them, but I’ll definitely take a look!