Summarise text under headings
Part of Obsidian guides🔸Published with Share Note
In your daily notes, you might have a “Health” heading where you log your daily health information. If you want to collect the text under these headings from all of your notes, you can do this with Dataview.
Here is a working demo vault which you can download to test with:
It will collect the sections under each of your requested daily note headings, and summarise them by day inside a single note:
How to set up
The latest version of this guide can always be found here.
Step 1:
Install Dataview, and turn on Javascript queries:
Step 2:
Create a new note and paste this code:
You’ll need to update the two variables headings
and pages
at the top to match the location and format of your own files.
Customisation
If you want to output a link to the notes instead of just the note titles, change:
to:
This will output [[Full/Path/To/File.md|Note title]]
just like you would create a normal link in any of your notes.
Asked in these threads:
- How do I retrieve and paste what is written after a particular heading? (Sep 9, 2023)
- Funnel all headings blocks with specific tags into a new note (Jan 5, 2023)
- Create note from sections of other notes (Dec 17, 2022)
- Dataview: query sections of notes (Dec 10, 2022)
- Coalesce headings into one file? (Dec 6, 2022)