Home

Awesome

GitHub release (latest by date) GitHub Downloads all releases GitHub Downloads (latest release)

<!-- [![GitHub Downloads release (by tag)](https://img.shields.io/github/downloads/daeh/zotero-markdb-connect/v0.0.25/total?style=for-the-badge)](https://github.com/daeh/zotero-markdb-connect/releases/tag/v0.0.27) --> <!-- [![GitHub release (with filter)](https://img.shields.io/github/v/release/daeh/zotero-markdb-connect?style=for-the-badge&filter=*v0.1.4*)](https://github.com/daeh/zotero-markdb-connect/releases/tag/v0.1.3) [![GitHub all releases](https://img.shields.io/github/downloads/daeh/zotero-markdb-connect/total?style=for-the-badge&color=forestgreen)](https://github.com/daeh/zotero-markdb-connect/releases/tag/v0.1.3) --> <!-- [![GitHub release (latest by SemVer including pre-releases)](https://img.shields.io/github/downloads-pre/daeh/zotero-markdb-connect/latest/total?style=for-the-badge&label=downloads@prerelease)](https://github.com/daeh/zotero-markdb-connect/releases/tag/v0.1.4) [![GitHub release (by tag)](https://img.shields.io/github/downloads/daeh/zotero-markdb-connect/v0.0.25/total?style=for-the-badge)](https://github.com/daeh/zotero-markdb-connect/releases/tag/v0.0.27) --> <!-- [![GitHub release (latest by date)](https://img.shields.io/github/v/release/daeh/zotero-markdb-connect?style=for-the-badge)](https://github.com/daeh/zotero-markdb-connect/releases/latest) [![GitHub all releases](https://img.shields.io/github/downloads/daeh/zotero-markdb-connect/total?style=for-the-badge&color=forestgreen)](https://github.com/daeh/zotero-markdb-connect/releases/latest) -->

MarkDB-Connect (Zotero Markdown DataBase Connect)

zotero target version Using Zotero Plugin Template

MarkDBConnectScreenshot

This is a plugin for Zotero, a research source management tool. The MarkDB-Connect plugin searches a user-defined folder for markdown files that include a Better BibTeX citekey or Zotero-Item-Key, and adds a colored tag to the corresponding Zotero items.

This plugin was initially designed with the Obsidian markdown editor in mind, and was inspired by the obsidian-citation-plugin workflow. It offers preliminary support for logseq and Zettlr. It can be adapted to other databases that store markdown files outside of Zotero, and to other workflows that generate markdown reading notes linked to Zotero items (such as Zotero's Export Note feature).

Please post any bugs, questions, or feature requests in the GitHub repository's issues.

Plugin Functions

Adds a colored tag to Zotero items for which there are associated reading notes in an external folder.

Supports multiple markdown files for a single Zotero item.

Opens an existing markdown note in Obsidian, logseq, or the system's default markdown note editor (e.g. Zettlr, Typora) from the contextual menu of a Zotero item.

Installation

[!NOTE] Beginning with v0.1.0, MarkDB-Connect will support Zotero 7 exclusively. The last release for Zotero 6 is v0.0.27.

Setup

A markdown file can specify which Zotero item it's linked to using either a Better BibTeX citekey or a Zotero-Item-Key. I recommend using Better BibTeX citekeys when possible.

  1. Using Better BibTeX citekeys to link markdown files to Zotero items.

  2. Using Zotero Item Keys to link markdown files to Zotero items.

    • This is recommended if you created the markdown notes with the Export Note feature of Zotero.

    • The markdown note contents should include the Zotero-Item-Key in a consistent format.

NOTE: multiple markdown files can point to the same Zotero item. But a given markdown file should only be linked to a single Zotero item. A markdown reading note can reference multiple Zotero items throughout the file, but MarkDB-Connect will only link the markdown note to one BetterBibTeX-citekey / Zotero-Item-Key.


Option 1: Using BetterBibTeX citekeys

MarkDB-Connect can extract the BetterBibTeX citekey that specifies which Zotero Item a markdown note corresponds to. The BetterBibTeX citekey can be taken from a markdown file's filename, YAML metadata, or elsewhere in the file's contents.

<details> <summary>configuration details</summary> </details>

Option 2: Using Zotero Item Keys

MarkDB-Connect can extract the Zotero-Item-Key that specifies which Zotero Item a markdown note corresponds to. The Zotero-Item-Key is taken from the markdown file contents using a custom RegExp pattern.

Zotero automatically generates Item Keys, they take the form of ABCD1234, as in zotero://select/library/items/ABCD1234. NB this is not the same as the BetterBibTeX citekey you assigned an item (e.g. mycitekey in zotero://select/items/@mycitekey).

<details> <summary>configuration details</summary> </details>

Example Markdown Note

In this example markdown note (@saxe2017emobtom.md), MarkDB-Connect will use the YAML metadata keyword citekey to find the BetterBibTeX citekey (saxe2017emobtom) that determines which Zotero item to associate with the markdown file. Notice that the markdown file can include other BetterBibTeX citekeys and Zotero-Item-Keys, which are ignored by the plugin.

---
citekey: saxe2017emobtom
zoterouri: zotero://select/library/items/IACZMXU4
bbturi: zotero://select/items/@saxe2017emobtom
doi: 10.1016/j.copsyc.2017.04.019
---

# @saxe2017emobtom

**Formalizing emotion concepts within a Bayesian model of theory of mind**
(2017) _Current Opinion in Psychology_
[Open in Zotero](zotero://select/library/items/IACZMXU4)

The body of notes can include references to other Zotero items.
The _MarkDB-Connect_ plugin will only link this file to one Zotero item
(in this case, it will use the value of the `citekey` property).

Here are links to other papers:

- This one uses [a Zotero URI](zotero://select/library/items/4RJ97IFL)

- This one uses [a BetterBibTeX URI](zotero://select/items/@anzellotti2021opaque)

- This one uses an Obsidian wiki link: [[@cusimano2018cogsci]]
<details> <summary>Example Templates</summary>

Below are example templates for various Obsidian plugins

Template for obsidian-citation-plugin

---
citekey: "{{citekey}}"
title: "{{title}}"
year: {{year}}
authors: [{{authorString}}]
{{#if containerTitle~}} publication: "{{containerTitle}}" {{~else~}} {{~/if}}
{{#if DOI~}} doi: "{{DOI}}" {{~else~}} {{~/if}}
aliases: ["@{{citekey}}", "@{{citekey}} {{title}}"]
tags: 
 - readingNote
---

# @{{citekey}}

**{{title}}**
{{authorString}}
{{#if year~}} ({{year}}) {{~else~}} {{~/if}} {{~#if containerTitle}} _{{containerTitle~}}_ {{~else~}} {{~/if}}
[Open in Zotero]({{zoteroSelectURI}})

Template for ZotLit

Make a file (e.g. zotlit-properties.eta.md) with the following contents, and point to that file in ZotLit settings: Template > Note Properties.

citekey: "<%= it.citekey %>"
title: "<%= it.title %>"
<% if (it.date) { %>year: <%= it.date %><% } %>
authors: [<%= it.authors.map(v => v.firstName v.lastName) %>]
<% if (it.publicationTitle) { %>publication: "<%= it.publicationTitle %>"<% } %>
<% if (it.DOI) { %>doi: "<%= it.DOI %>"<% } %>
aliases: ["@<%= it.citekey %>", "@<%= it.citekey %> <%= it.title %>"]
tags:
 - readingNote
</details>

Suppressing the Zotero security notification

Recent builds of Zotero have introduced a security notification for external links. At present, Zotero does not remember the user's link preferences, so this alert is shown every time an application-specific URI is launched. You can suppress this warning by setting security.external_protocol_requires_permission to false in Zotero's advanced configuration.

Zotero Security Notification

<details> <summary>Instructions for modifying Zotero's advanced config</summary>
  1. Open Zotero Settings
  2. Click the "Advanced" tab
  3. Click the "Config Editor" button
  4. Click the "Accept Risk and Continue" button
  5. Search for security.external_protocol_requires_permission
  6. Double click the security.external_protocol_requires_permission item to toggle its value to false
</details>

Related Projects

Notes

GitHub: Source code repository

This extension uses the zotero-plugin-template.

License

Distributed under the MIT License.

Author

Personal Website BlueSky Twitter