ChatGpt Prompt for creating daily analysis plan.
Another script now. It will be complicated. I want to have a systemd timer that runs the script each day at 7 am. It checks the directory year/month-day-weekday (e.g. 2024/07-21-Sun) for a file named Day.md. It checks whether the file exist and have a front matter (first line is +++). If yes, then the job is done and that’s it. If not, then I want to create the file.
It starts with front matter, which is:
+++
title = 'Analysis of the Day'
date = "2024-07-21T07:00:00+0300"
draft = false
tags = ['daily', 'analysis']
+++
Then, I want you to get some data from the previous day. If today is 2024-07-21, than yesterday is 2024-07-20.
I want you to understand what the previous day is very very clearly. If today is 2024-07-01, than yesterday is 2024-06-30. If today is 2025-01-01 than the previous day is 2024-12-31. You cannot invent months that don’t exist, and you cannot invent days like that. There are day 0 or month 0. Most times there are no day 31, and Februrary (2nd month) has only 28 or 29 days. There are only 12 months. You may use some calendar features, that’s what I’m talking about.
So, you look at the previous day and take the Day.md file from there. If you need, you’re allowed to use a temporary file or two here. But in this case the location of the file should be specified and be in the root of notes directory, not in the temporary file storage, as it should be stored till the update. If needed, you can define yesterday and toady path there, as those are different directories that change daily.
You look at the previous day and take the Day.md file from there. You scan the file till the # Tomorrow
section and copy everything from there to the new file (excluding the title # Tomorrow
).