Skip to content

feat: auto-generate Podcasting 2.0 chapters from episode timestamps#2

Open
ChadFarrow wants to merge 1 commit intoderekross:mainfrom
ChadFarrow:feat/auto-chapters
Open

feat: auto-generate Podcasting 2.0 chapters from episode timestamps#2
ChadFarrow wants to merge 1 commit intoderekross:mainfrom
ChadFarrow:feat/auto-chapters

Conversation

@ChadFarrow
Copy link

Summary

  • Auto-parses timestamp lines (e.g. 00:00 Intro, 1:00:12 - Wrap Up) from episode content at build time and generates Podcasting 2.0 JSON chapter files in dist/chapters/
  • Episodes with an existing chaptersUrl (uploaded JSON) are skipped — auto-parsing is a fallback only
  • Client-side RSS generator now passes through transcriptUrl and chaptersUrl and renders <podcast:transcript> / <podcast:chapters> tags
  • Documents transcript and chapters as optional tags for Kind 30054 in NIP.md

Supported timestamp formats

Tested against real content from Soapbox Sessions and Nostr Compass:

Format Example
MM:SS Title 00:00 Intro
MM:SS - Title 00:00 - Intro
H:MM:SS Title 1:00:12 Wrap Up
HH:MM:SS Title 01:45:35 Outro

Files changed

File Change
src/lib/parseChapters.ts new — parser + JSON generator
src/lib/parseChapters.test.ts new — 12 unit tests
scripts/build-rss.ts generate chapter JSON files during build
src/lib/rssGenerator.ts pass through chaptersUrl/transcriptUrl, render in XML
NIP.md document chapters and transcript tags

Test plan

  • All 24 tests pass (npm test)
  • TypeScript, ESLint, and Vite build pass
  • Verified parser output against real Soapbox Sessions and Nostr Compass content samples

🤖 Generated with Claude Code

Parse timestamp lines in episode content at build time and generate
JSON chapters files for podcast apps. Episodes with an existing
chaptersUrl are skipped. Also passes through transcript/chapters
URLs in the client-side RSS generator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ChadFarrow
Copy link
Author

I used the Soapbox Sessions and Nostr Compass RSS feeds as reference for this but wont know if the chapters worked until this is run. It takes the timestamps and makes PC 2.0 chapters from it so listeners can skip around in the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant