A Zotero plugin to export item metadata and notes as markdown files
A Zotero plugin to export item metadata and notes as markdown files.
Tested with Zotero v5.0.89 in Ubuntu 18.04.
Right now the menu is not context-aware, so read below to see what has to be selected for the menu to correctly create the files.
| What you want to do | What to select | Menu | | ------------------------------------------------------------ | -------------- | --| | Export Zotero item metadata file | Zotero Item |
Export to markdown| | Export Zotero notes to markdown | Zotero Note |
Export to markdown| | Create a file for your own notes | Zotero Item |
Create mdnotes file| | Batch export all of the above | Zotero Item |
Batch export to markdown|
Based on your configuration, any of the above actions adds the created files as linked files to Zotero.
With the exception of
Create mdnotes file(for your own notes), you will be asked to choose a path. The file name(s) are automatically chosen based on the naming convention described in the section for each menu. You can read more about how to configure Mdnotes here
To access the menu right-click on an item or note:
Install by downloading the latest version.
It is highly recommended that you have the following plugins installed:
I have not tested without them, so I can't guarantee nothing will break.
I assume the exported metadata and Zotero note files are replaceable.
Create Notes filemenu to do so.
The format used to export Zotero notes is somewhat hardcoded and relies on Zotfile's default format. Let me know if this doesn't work for you.
v0.0.3 - Since forbidden characters for Windows file names can get quite complex and I can't test in Windows nor invest much time in this, I've made a few assumptions about the title of your notes. If those assumptions are not met, the file with the extracted notes won't be created and batch export won't work. Check if your note
uses anything other than the default Zotfile format, or if the note title contains more than one parenthesis this might fail.
has any other special character in the first line (which is used as part of the file name), it will also fail. The only cases I'm checking are forward slashes
Pull requests are welcome to handle this in a smarter way.
v0.0.3: Zotfile-extracted annotations include characters that are invalid for Windows file names. For that reason, the date is changed to follow an ISO format and stripping time, i.e.
yyyy-mm-dd. This might not always work correctly depending on your timezone and it might be better to fix it directly in Zotfile (see this issue). For more details about Mdnotes, see Notes and Known Limitations.
If you move or rename your markdown files, the links in Zotero will be outdated. The only solution is to manually locate them.
So far I've been creating one or two notes at a time, as I've been needing them, i.e. I have not tested exporting large numbers of items or notes.
I can only work on this on my spare time, so it might take me a while to fix your issue. That being said, I'll try to point you in the right direction if you open an issue. Pull requests are most definitely welcome if you can spare some time.
This plugin is based and was inspired by zotero-roam-export.