Note-level additional metadata for use of plugins

Plugins can be used to extend Joplin a lot and it opened up many new possibilities. However, as long as notes are concerned, plugins affects only the note body.

I want to propose a mechanism to store per-note metadata for plugins.

Here is roughly what I'm thinking.

  1. A JSON field for plugin metadata. Sqilte supports it. I'm considering a schema like this:
  "plugin.namespace": {},
  "plugin2.namespace": {},
  1. An API to read meta from that field.
  2. An API to store meta. BUT, it will only support a plugin to update meta in it's namespace.
  3. Filters in this field.

A plugin can create it's own database and store any data there.

But, do they get synced like notes?

No. There's a somewhat related discussion here Synchronising plug-in data across apps (specifically for Favorites) - #4 by yodahome

Also this: Feature request/discussion: Custom API metadata

Basically, many possibilities will open if plugins can add metadata in notes. Especially with filtering support, one can create an interactive dashboard based on custom fields.

It's indeed be discussed a few times and we might add something like this at some point. What use case do you have in mind @uroybd?

I think it is only necessary to provide a universal and syncable storage api like the chrome/vscode plugin. As for the association with the note data, the plugin maintains itself, which can also avoid putting the plugin data in the sqlite notes.


In terms of specific usage scenarios, I think that the existing templates and task managers can benefit from this, no longer limited to using them as notes, but you can save them in a more suitable data format

Here's a scenario I have in mind:

(a) I export reading notes from my ebook reader and store them in Joplin.
(b) I also write reviews for them and store them in Joplin naturally. These reviews have extra data like rating (currently just markdown generated by the Templates plugin). I link my notes (if I have any for that review). Backlink Plugin allows me to create automatic backlinks from notes to reviews and that's really helpful.
(c) I can create an overview page for all reviews using the Note Overview plugin. But that's pretty much limited. For example, I cannot search by rating.

If we have a way to get and set note metadata data via a plugin, we can:
(a) Allow (preferably with an option to disable/enable) to add field data as meta from the Templates plugin in the note.
(b) Note Overview plugin can implement read and query (SQLite supports query in JSON field) on those custom metadata to provide richer filtering and sorting.

Similarly, the Kanban plugin can be re-implemented without depending on notebooks or tags.

Hi @laurent

Is there a chance of implementing this?

I've provided a scenario just above.

I'm sure you're very busy, but can you take a look into it whenever you can?