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 late-2022 snapshot of secon.dev, covering Dropbox-synced Markdown, Next.js static builds, related-article generation, GCS image processing, and planned improvements.
  2. A CLI for finding similar documents in static site generatorssimilar-documents-cli computes TF-IDF and cosine similarity over Markdown or HTML files to generate related-article data for static sites at build time.
  3. Launching AI News and how I used OpenAI behind itHow AI News collects AI, data science, and machine learning topics and uses OpenAI APIs to classify and summarize them in three lines.