This is likely going to need me to learn AppleScript and figure out further, but … on the off chance that someone out there as done something similar …
Context
I have a journal database (this is part of a “can I do it in DT3 instead of Roam” experiment), where I have a group for the year, groups within that for months, and groups within each of those for days.
Problem
I’d like to automate “creating a summary note”, within the group for a day (and later, for a month).
If I have individual notes tagged with some particular tag (say #summary or #collect), I’d like to grab “Item links” to them, inserted into a new note (either RTF or Markdown).
Example
If a group contains the note Foo and the note Bar, then this new note would have title containing today’s date, and contents (in the markdown case) similar to
My use case is an overview ToC note for projects, identified by project tag
Here is a extract of my script
tell application id "DNtp"
set selectedTags to get selection
repeat with projectTag in selectedTags
set theNoteName to name of projectTag
set theSource to ""
repeat with theNote in (children of projectTag)
set theName to name of theNote
set theLink to the reference URL of theNote
set theSource to theSource & "<a href=" & (theLink) & ">" & (theName) & "</a><br>"
end repeat
set newRecord to create record with {name:theNoteName, type:formatted note}
set source of newRecord to theSource
set tags of newRecord to {"!Type-ProjectToC", projectTag}
end repeat
end tell