cat articles/n-diaries-summary
Summarizing same-date diary entries from secon.dev and sending them to Discord
I have accumulated four or five years of old diary entries on secon.dev. Sometimes I look back at past entries from the same date, but there are many days when I skip them. I think occasionally touching past records helps keep memories fresh, so skipping them feels wasteful.
The reason I skip them is that accessing old diaries is troublesome. They are shown in the footer of same-date diary pages, but I still do not go look very often. Also, if a diary entry is long, reading all of it is a bother. I want someone to tell me the gist.
So I wrote an implementation that reduces the access friction by posting to a family Discord channel, used only by my wife and me, while summarizing past diary entries from the same date. Posting to Discord is easy with a webhook. I also made the Discord message use as little screen space as possible, since ordinary links expand and consume too much area, so it can be read quickly.
Summarizing old diaries is also easy because it just sends them to OpenAI. To get used to LCEL, I wrote the implementation in LCEL even though it is verbose. LCEL is easy once you get used to it, and being able to use LangSmith for debugging is convenient.
