As I am trying to converge on the best way to use Obsidian, I am trying to use daily notes and tag some of the lines for reuse, e.g.
ID of John: 2343
during military actions, sin(x) can be greater than 1
#todo repaint the house
#pro #todo install the new plugin
we need to investigate the use of Obsidian better #todo
I would like to build a dynamic page where all lines with #todo would be gathered in one place, in a dynamic page.
I had a look at Dataquery, but it seems that the sources are limited:
Dataview generates data from your vault by pulling information from Markdown frontmatter and Inline fields
My questions:
is there a way to extract lines with a specific tag? (JS is very fine for me)
Dataview (not Dataquery) works with metadata. But inside dataviewjs you can play with any js code and use dataview to output/render the results from any js code.
I’m not versed in JS, but I guess you need to create a code to explore the content of files via Obsidian api (app.vault.getMarkdownFiles() or using the dataview (dv.io.load), parsing the content with the regex help. But I imagine you can face performance issues…
The content of the bullet-point lists is metadata. Then, if you use this format, you can play only with dataview language without more complex js code.
But remember: these solutions produce dynamic results, not a static content. I.e., the outputted results doesn’t exist as md content.
See if the Tasks plugin will work for you? It can pull all blocks with a checkbox containing a certain tag, and lets you edit them with a dialog box. Not quite an “extract” but it could be useful.
Or, you could just try obsidian’s inbuilt query like so: