zettelkasten

Search IconIcon to open search
Dark ModeDark Mode

Dataview Plugin

#Obsidian

Allows queries in the Obsidian vault. Very powerful but could be intimidating.

Documentations: https://blacksmithgu.github.io/obsidian-dataview/. Basically, there we do two things:

  1. Store data using yaml or inline data fields
  2. Query data using query language (either Dataview Query Language or DataviewJS)

Examples/playground:

Table with week = "2022-W12"

TABLE 
week as Week,
date as hi,
file.path

FROM "050 Periodic"
WHERE week = "2022-W12"

Weekly todo progress

TABLE 
	length(file.tasks.text) as Total,
	length(filter(file.tasks.completed, (t) => t = true)) AS Completed,
	"<progress value='" + (length(filter(file.tasks.completed, (t) => t = true)) / length(file.tasks.text)) * 100 + "' max='100'></progress>" AS Progress

FROM #periodic/weekly
WHERE file.tasks