AIProjectsPersonalOpenClaw

I turned 25,000 texts into a book

I had a day off from rotation yesterday. No rounds, no prerounding, no attending to impress. Just coffee, my laptop, and a vague idea.

By midnight I had a 22-page magazine-style PDF book and a deployed website to go with it.

Here's what happened.

The idea

My girlfriend Vicky and I have been long distance since day one. She's in Taiwan. I'm in LA doing clerkships. We've been together since September and we've generated somewhere north of 25,000 messages between us — Instagram DMs, iMessage, FaceTime — just... a lot.

I've been running OpenClaw (an AI assistant framework) on a Mac mini at home. A few weeks ago I had it parse all our message exports and build a VICKY.md — essentially a structured soul document about our relationship. Who said what, when, how we talk to each other, what we've been through.

I read it back and it was kind of overwhelming. Not in a bad way. In a "oh, this is a real thing" way.

Yesterday I thought: what if I turn this into a book? A Valentine's gift, a few weeks late.

The pipeline

The basic architecture:

  1. Source data — iMessage export + Instagram DM export, both already parsed into VICKY.md
  2. Content layer — I wrote the actual prose manually, using VICKY.md as reference. Five chapters: The Origin → Long Distance → Finally Together → The Hard Part → Valentine's Day
  3. Layout engine — WeasyPrint (HTML/CSS → PDF). I tried fpdf2 first and immediately hit its wall: no text wrapping around images, no real CSS layout. WeasyPrint treats your HTML like a browser would, then handles page breaks, margins, and print-specific properties cleanly.
  4. Photo pipeline — 527 photos from our shared album, loaded into a local picker UI, selected 15, exported to the build script
  5. Deploy — Next.js site at vicky.derricklin.dev, PDF hosted in public/

The whole thing — idea to deployed website — took one day.

What actually worked

WeasyPrint is underrated for this use case. If you need a document with real layout — floated images, multi-column sections, proper typography — it's the right tool. The learning curve is mostly "unlearn the things that don't apply to print."

Having the source material already structured mattered a lot. I wasn't trying to remember what happened in September. I had 25,000 messages distilled into a reference doc. The writing was fast because the facts were just there.

The local photo picker was worth building. 527 photos is too many to manually scroll through. I built a simple HTML file that grouped photos by date range into chapters, let me click to select, and exported filenames. Spent 30 minutes on the picker, saved more than that in scrolling.

What didn't

Photo resolution and cropping are annoying at print scale. Phone photos are shot for screens, not 300dpi print. Some looked fine. Some were soft. The full-width banner crops were the worst — you're taking a 4:3 portrait shot and displaying it as a wide landscape banner, which means object-fit: cover is doing a lot of work.

The file:// protocol problem. I opened the photo picker as a local HTML file in Chrome and nothing loaded — Chrome blocks cross-origin local file access. Solution: python3 -m http.server. Should have known this.

Whitespace on page breaks. WeasyPrint's page break behavior is predictable but not smart. Chapters that don't fill a page leave dead space. I removed page-break-before: always from chapter headers and let content flow — better, but not perfect.

The actual cost

This whole project ran on my Mac mini through OpenClaw. The AI parts — writing, editing, building the website, fixing bugs — cost real money in API calls.

I also realized I'd been defaulting to Claude Opus for everything, including heartbeat checks and cron jobs. Opus is $15/$75 per million tokens. I switched to Sonnet as the default ($3/$15), Gemini Flash for lightweight crons (basically free), added context pruning, and capped context at 80k tokens to trigger compaction earlier.

Cost for running AI infra dropped significantly overnight. The book, the website, the photo pipeline — I'd estimate the whole thing cost under $5 on a well-configured setup.


The book isn't perfect. Some photos are soft. A few page breaks are awkward. The password is still placeholder because I haven't given it to her yet.

But I read it back and it's real. Five chapters about how two people found each other on Instagram DMs, built a relationship across 16 time zones, navigated the hard parts, and ended up here.

She flies in March 3rd. That's the deadline.

Tools used: OpenClaw, WeasyPrint, Next.js, Tailwind, Vercel, Python, Claude Sonnet 4.6, Gemini Flash