Reproducing an exported Day One markdown journal entry

You’re making some excellent progress :slight_smile:

Thank you so much! :blush: I ought not have posted the initial script until I’d made a bit more progress. :grinning_face_with_smiling_eyes:

Stephen

No worries! And it also could be interesting to others to see the progression.

I was wondering about the “only one markdown file”
Don’t you have multiple files (one for each day) named
“longWeekday & " " & theDay & " " & theMonth & " " & theYear”
I use a search to retrieve the correct file ( set myRecords to search “name:"” & theName & “"”)

I have a similar script running automatically each morning
It creates the daily journal file from a template
The file is then ready for the day’s entries

My filename standard is yyyy-mm-dd Journam [longWeekday]
It works better for sorting (name descending)

Although I’m not currently using DT for journal entries I envisage opening a new markdown file in a Temp group each day and just adding to that during the day. At the end of the day I’d run the script and then move the file to the appropriate year group for journal entries.

I’d not worry about naming the file when opened as the script will take care of that at the end of the day.

I found sorting by name not as good as having the custom metadata field—which allows sorting exactly by date.

Stephen