"Burning out" dataviews
See original GitHub issueI’ve started using dataviews in my daily notes via the daily note template. One dataview I’m using lists all the notes I edit that day:
list from "some-folder"
where file.mtime.day = date({{date:YYYY-MM-DD}}).day and file.mtime.month = date({{date:YYYY-MM-DD}}).month and file.mtime.year = date({{date:YYYY-MM-DD}}).year
That ends up inserted in my daily note as a dataview that matches any files edited today. It’s very useful. However, if I edit a file after that day, the list stops showing it, even though I edited a file on that day. Because I’d love to have a history of the files I’ve worked on for any given day, I need some way to “burn out” a dataview—effectively replace its code fence with its markdown result.
I can see this being a button that appears on hovering the code fence when in preview mode, or even a command in the command palette that operates on the dataview under the cursor. Even better would be a way to bake this into the dataview so that it happens automatically after a certain threshold, e.g.
list from "some-folder"
where file.mtime.day = date({{date:YYYY-MM-DD}}).day and file.mtime.month = date({{date:YYYY-MM-DD}}).month and file.mtime.year = date({{date:YYYY-MM-DD}}).year
burnout after {{date:YYYY-MM-DD}}
but I have no idea if such a thing is technically feasible, as I haven’t dug too deeply into Obsidian’s internals. Either way, a way to go from a dataview query to its hardcoded result would be very useful to freeze documents in time.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:48
- Comments:94 (17 by maintainers)
Alright, so I’m finally around to looking at this again. I have two modes which I am planning on supporting directly right away:
These two scenarios should unblock the most important use-cases: data archiving, basic view support in publish and GitHub, migrating away from Dataview, and even being able to see important Dataview-based links in the graph. I can also consider implementing “Bulk Freezing” as a simple automatic job that runs at user-defined intervals or on important operations.
It’s doable, and I’ve had a few people ask about it for another application (Obsidian Publish). Will add support for it in an upcoming release (likely by having it replace or append the fully rendered HTML for tables, and Markdown for everything else).