LinkToTale — YouTube cartoon to picture book (CLI)

TL;DR

Paste a YouTube link, get a self-contained HTML picture book. The CLI downloads the cartoon, extracts frames, detects scene changes, and uses GPT-4.1 to write a 25–35 page children’s story around the real timeline — in both Polish and English. Cost: ~$0.50 per 12-minute cartoon.

Source code: github.com/rafalmcichon/linktotale (MIT license)

Context

What I observed

My son loves his cartoons. But even 10–15 minutes a day was enough to make him noticeably restless afterward — harder to settle, harder to focus. Cutting cartoons entirely felt unrealistic (he already knew the characters, the stories meant something to him).

What worked better: we’d read a book about the same characters, then watch a short clip — or reverse the order. Afterward we’d rebuild the scenes with Lego, acting out what happened. That loop — read, watch, play — kept him calm and engaged in a way that pure screen time never did.

The gap: the stories he loved existed only as video. There was no book version to hold, read together, or use as a starting point for play.

What I built

A CLI pipeline that turns any subtitled YouTube cartoon into a picture book:

1) Download + extract

2) Scene intelligence

3) AI story generation

4) HTML output

What makes it work

Results

What I took from it

What I’d do next