What I’m trying to do
i want to tidy up my notes and add nestedtags on some pages without them and just having tags
eg. example #wip → #wip/write
Manually search for them can be easy via search with "#wip ", but i want to do this to multiple root tags, and i wanna make see how many are they. i want to use dataview because i want to later add more criterias so i can batch select attributes to chooose the nested tags.
But I haven’t been able to isolate the file.etags without nested tags. I tried using list split that can be used to list subfolder on file.folder but it returns error (probably because file.etags are items)
Desired Summary output
Etag | Count |
---|---|
#wip | 2 |
#health | 1 |
… | … |
Desired pages output
Page | Etag |
---|---|
[[abc]] | #wip |
[[abc2]] | #wip #Health |
… | … |
Undesired pages output
Page | Etag |
---|---|
[[abc]] | #wip #art/write |
[[abc2]] | #wip #Health |
[[abc3]] | #wip/write |
… | … |
Things I have tried
TABLE length(rows) as count
from "2. Main Topics"
flatten regexreplace( filter(file.etags, (t) => startswith(t, "^#\\w+(^/)($|\s|\b)")), "^(#\\w+)/(\\w+)?", "$1" ) as root_tags
group by root_tags
limit 10
TABLE file.etags
from "2. Main Topics"
WHERE regexmatch(file.etags, "^#\\w+(^/)$")
limit 10