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.

Discord example
Discord example

cat related_articles/n-diaries-summary.yaml

  1. How secon.dev was implemented, December 2022 editionA snapshot of how secon.dev worked in late 2022: Markdown files synced through Dropbox, static builds with Next.js, related-article generation, image processing on GCS, and the parts I wanted to improve next.
  2. Looking back on 2023A personal 2023 retrospective covering work, travel, daily life, technology, social networks, and how I want to spend 2024 at my own pace.
  3. Was the end of Japan's 2022 rainy season unusually early?Using Japan Meteorological Agency data, I checked the standard deviation of rainy-season ending dates to see how unusual the 2022 Kanto-Koshin date really was.