explaingit

linzhuochen/video-to-notebook

14PythonAudience · researcherComplexity · 4/5ActiveLicenseSetup · hard

TLDR

Python CLI that turns YouTube or Bilibili course playlists into a merged Astro textbook site with a concept encyclopedia, driven by a coding agent like Claude Code or Cursor.

Mindmap

mindmap
  root((video-to-notebook))
    Inputs
      YouTube playlists
      Bilibili playlists
      Coding agent like Claude Code
    Outputs
      Astro static textbook site
      Concept encyclopedia
      Pagefind search index
    Use Cases
      Merge open-course lectures into one book
      Build a bilingual study site
      Generate concept pages from transcripts
    Tech Stack
      Python
      Astro
      Pagefind

Things people build with this

USE CASE 1

Turn a deep learning course playlist into a searchable Astro textbook site

USE CASE 2

Generate a bilingual Chinese and English study guide from lecture videos

USE CASE 3

Build a concept encyclopedia with deep links back to source video clips

USE CASE 4

Drive the multi-stage pipeline with Claude Code or Cursor without an API key

Tech stack

PythonAstroPagefindPyTorch

Getting it running

Difficulty · hard Time to first run · 1h+

Needs Python 3.12+, an Astro 5 build, and either a coding agent that runs the CLI in apply-loop mode or an Anthropic API key.

MIT license, so you can use, modify, and redistribute the code freely as long as you keep the copyright notice.

In plain English

video-to-notebook is a Python command-line tool that turns a few playlists of open-course videos on the same topic into a single static website that reads like a merged textbook with an attached concept encyclopedia. The author points it at YouTube or Bilibili playlists, then a coding agent such as Claude Code, OpenAI Codex, Cursor, or Continue drives the pipeline: it crawls the videos, tags every transcript chunk against an ontology, clusters those tags into a concept graph, plans a chapter order with teaching in mind, and writes each chapter and concept page. Output ships as an Astro-based static site with Pagefind search and optional bilingual Chinese and English versions. A distinctive design choice is that no separate Anthropic API key is required by default. The CLI writes a prompt envelope for each stage to a state directory and exits, and the agent then writes its decisions to a sibling file and re-runs the command with an apply flag. The README also offers an Option B that uses an Anthropic API key directly. Required tooling is Python 3.12 or newer, and the build uses Astro 5 for the static site. Three design principles run through the README. First, source fidelity: each chapter and concept page must reflect how the lecturer actually explained the idea, including verbatim phrasings, analogies, and named citations, and any framing the agent adds on top must carry an explicit marker. Second, no fabrication: when source chunks are too thin, the agent is told to stop and debug the pipeline rather than fill the gap from training data, and common bug patterns are listed for the agent to check. Third, textbook-note depth rather than magazine-summary depth, with target chapter lengths, numbered sections, math derivations annotated line by line, colour-coded callouts, a runnable PyTorch skeleton when a model is introduced, and five to seven takeaways anchored to lecturer examples. The rendered output includes a textbook table of contents, a chapter reading view with a left sidebar, a TL;DR callout, a right-side mini-map, and deep links back to the source video clips, alongside an encyclopedia of illustrated concept pages with interactive widgets and counter-example misconceptions. The project is MIT licensed and is in early development.

Copy-paste prompts

Prompt 1
Run video-to-notebook on a YouTube playlist of CS231n lectures and produce a static Astro site
Prompt 2
Walk me through the prompt envelope flow where the CLI writes a state file and the agent re-runs with an apply flag
Prompt 3
Help me wire it up using the Option B path with an Anthropic API key directly
Prompt 4
Add bilingual Chinese and English output to an existing build
Prompt 5
Explain how the chapter planning stage clusters transcript tags into a concept graph
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.