Modifying Monthly Journal Action - consolidating entries

Hello, I am using the Monthly Journal action found here. I would like to modify it so the output looks like this. One draft per month. In each draft, it would show the below. I am having trouble conceptualizing what needs to be changed. Are there any pointers you can think of?

2022-04: Monthly Journal

Monday 25 April 2022

– 10:38 AM - Here is a test
– 11:27 AM - some more text
– 3:56 PM - yet more text

Tuesday 26 April 2022

– 9:21 AM - Here is a test again
– 11:30 AM - some more text again

I think you are asking if that action could be modified to merge multiple entries on the same day under a single heading for that day, rather than adding a daily heading each time.

Short answer: Yes, it would be possible.

Long answer: It would be a somewhat non-trivial modification.

Not toooo bad, but you would need to add logic after the action locates the target draft, it would need to calculate the text that would be used for today’s heading, and search the text of the target draft to see if that string already existed. If it did, just add the new entry…if not, add the heading and the new item.

Thanks! I’ll make a copy of the action and play around with it. If I remember, the searching for where to put the new text is done in the second script in the action. If I get stuck I’ll reply with my code.