You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm exploring whether I could use DataviewJS to surpercharge my weekly summary notes.
Basically, i'd like to extract all the tags that I used in each Dailynotes, and simply provide a Table with each tag and the line associated with the tag.
I'm stuck at the step of extracting all the tags used in a given week.
Basically doing this (suggested by ChatGPT)
// Getting the current date, year, month, and week numberletcurrentDate=moment();letcurrentYear=currentDate.format('YYYY');letcurrentMonth=currentDate.format('MM');letcurrentWeek=currentDate.format('W');// Creating an empty Set to store unique tagslettags=newSet();// Going through all the notesdv.pages().where(p=>p.file.path.includes(`Journal/${currentYear}/${currentMonth}/W${currentWeek}`)).forEach(page=>{// Accessing the tags from the page metadata and adding them to the Setif(page.tags){page.tags.forEach(tag=>tags.add(tag));}});// Creating a table with the tagsdv.table(["Tags"],Array.from(tags).map(tag=>({"Tags": tag})));
However the tags accessed are related to the FrontMatter tags I believe, not the tags contained in the note.
Because I get nothing out.
Anyone has an idea, or an API tip how I can achieve this here ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi !
I'm exploring whether I could use DataviewJS to surpercharge my weekly summary notes.
Basically, i'd like to extract all the tags that I used in each Dailynotes, and simply provide a Table with each tag and the line associated with the tag.
I'm stuck at the step of extracting all the tags used in a given week.
Basically doing this (suggested by ChatGPT)
However the tags accessed are related to the FrontMatter tags I believe, not the tags contained in the note.
Because I get nothing out.
Anyone has an idea, or an API tip how I can achieve this here ?
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions