curated-epub-audiobooklisted
Install: claude install-skill annexiao/read-the-best-first
# Curated EPUB + Audiobook
## Overview
Pipeline: acquire the texts → strip everything that is not the author's content → order them (this is the heart) → build an EPUB → optionally synthesize an .m4b audiobook with a local TTS model. The reader's contract: best pieces first, so they can stop at their own break-even point.
**The deliverables are three**: the ranked **EPUB**, the **.m4b audiobook** (when requested), and the **ranking record** (`.ranking.json` + `.ranking.md`). Stripping happens BEFORE the EPUB is built, so every downstream artifact inherits clean content.
Scripts live in this repo's `scripts/` directory. The audiobook stage has its own reference: **REQUIRED SUB-SKILL** `kokoro-local-tts` (deploying and running the local model).
## Stage 1: acquire
- **Book**: you already have the EPUB. Go to Stage 2.
- **Substack**: better than scraping — the archive API returns a structured post list: `https://<pub>.substack.com/api/v1/archive?sort=new&limit=50&offset=N` (paginate by offset), each entry carrying date, title, canonical_url, and `audience`. `"everyone"` = free, fetch the canonical_url directly; `"only_paid"` yields only a preview without your subscription's auth. Gotcha: a profile URL (`substack.com/@handle`) is not the publication domain; resolve it from the profile page and sanity-check post dates (stale sibling publications exist).
- **Blog / essay site**: find the archive/index page listing all posts, extract `(url, title)` pairs, download each page (p