I have a similar idea:
We can define a special code block element like this:
```obsidian-search
date:<2020-01-30
in-text:Hello World
tag:abc
```
This idea inspired by search engine commands. Because we have a multi-line editable block, using a DSL is available:
- use newline to separate keywords
- provide
AND, OR as logical operator, and use AND as default one.
- provide
xxx: prefix-command as search commands to search special domain content such as date:, tag:, stared: and so on (in-text: is the default).
We can specify a unique identifier for our search commands, such as obsidian-search or shorter, and re-write the rendering process of markdown’s code block.
And then, for programming performance, We can keep a cache for searching, such as save a list of search results in a file named ${search patterns} | hash, and provide automatic or manual refresh functions.
In addition, which features we needed are all able to classify into three parts:
- UI (display style, interaction etc.)
- Organization (how can we manage notes, attachments etc.)
- Content (formal language, DSL, special patterns etc.)
In my opinion, good classification brings pretty conversions.