Skip to content

mdelobelle/obsidian-multiselect

Repository files navigation

Description

This plugin leverages the great Dataview plugin capabilities to select multiple values returned by a query and include them in your note

You can beta-test it with BRAT: mdelobelle/obsidian-multiselect/

for example

  • select some [[]] from your '#Ingredient' notes as required ingredients for a recipe
  • select some of your [[]] from your '#Staff' notes as participants for a meeting note
  • select some [[]] from your '#Favorite && #Song' notes as songs for a playlist note and so on...

Seing all the links related to a query helps selecting them faster and not forgetting some.

Settings

Important: Activate dataview js queries and inline js queries

drawing

You can Add/Change/Remove as many queries has you want

Add a query by hitting "+".

drawing

You'll have to set a name, a description and the query. The query has to be written in the dataviewjs syntax: https://blacksmithgu.github.io/obsidian-dataview/api/intro/ and has to return a dataArray

drawing

There will be one command per query. Each one is name "Multi Select: {description of the query}"

Once created, you can modify the query by hitting the pencil button or remove it by hitting the garbage button

Usage

  1. In live preview, position the cursor where you want to include links

drawing

  1. open the command palette and select the query that you want to execute

drawing

  1. Select the results that you want to paste at the cursor position

drawing

  1. You can select an alias for the link display when the target note contains aliases in its frontmatter

  2. Set append and prepend strings (default prepend string: none, default append string: ", ")

drawing

  1. Hit the checkmark button to paste the links in your note: Et voilà!

drawing

About

Select multiple notes and include their links the current note

Resources

License

Stars

Watchers

Forks

Packages

No packages published