mrjackphil / obsidian-text-expand

A simple text expand plugin for Obsidian.md
186 stars 12 forks source link

How do I collect blocks matching search #89

Open ksdavidc opened 12 months ago

ksdavidc commented 12 months ago

I have files with structure file 1:

## a
### sub1
## b 
### sub 1
...

file 2:

## a
### sub1
## b 
### sub 1
...

and I want to collate all the a.sub1 blocks

## sub1 (from ## a file 1)
## sub1 (from ## a file 2)
  ... and so on for b, c, d...

I feel like this should be possible, but I can't quite figure out how....

Thanks in advance for any assistance...

ksdavidc commented 12 months ago

Alternately, it would be nice if I could collect specific paragraphs, flagged by a tag or dataview field

[[dataviewField:: name1]]
desired  paragraph 1

more paragraphs

[[dataviewField:: name2]]
paragraph2

more paragraphs to ignore

[[dataviewField:: name1]]
desired  paragraph 3

more paragraphs to ignore

giving result

desired  paragraph 1
desired paragraph 3

(note that paragraph 2 is not collected)

ksdavidc commented 11 months ago

I was able to figure this out using the query control (not official) plugin. I am still curious if this is possible here...but at least I did find a solution...