How wl2bd/thothly works
Thothly turns searched or pasted web, video, and podcast sources into a reviewed compilation, then delivers an EPUB and Markdown twin. The principal workflow is search/paste → discovery → review and selection → compilation → download/read. The graph preserves search, source extraction, optional AI polish and podcast transcription, rendering, job persistence, and the browser workspace. Some backend orchestration is supported by the SOURCE INDEX and README rather than inspected implementation; edges are limited to those references and documented relationships.
Main entry points: runner.py Job runner · router.py Job routes · compose.tsx Compose workspace · page.tsx Compilation reader
Components 23
Browser workspace
- Compose workspace
frontend/components/compose.tsx - Compilation reader
frontend/app/jobs/[id]/page.tsx - Browser history
frontend/lib/history.ts
Search and discovery
- Search aggregation
backend/app/search/service.py - Search providers
backend/app/search - Search triage
backend/app/search/triage.py - Source discovery
backend/app/sources/discovery.py
Compilation jobs
- Job routes
backend/app/jobs/router.py - Review previews
backend/app/jobs/preview.py - Job runner
backend/app/jobs/runner.py - Job repository
backend/app/jobs/repository.py - Book download
backend/app/jobs/router.py
Content processing
- Source extractors
backend/app/sources - Transcript caches
backend/app/sources/transcript_cache.py - Text cleanup
backend/app/pipeline/cleanup.py - LLM client
backend/app/pipeline/llm.py - Podcast transcription
backend/app/pipeline/transcribe.py - Content compiler
backend/app/pipeline/compiler.py - EPUB and cover renderer
backend/app/render/epub.py
Persistence and API
- Search API
backend/app/api/search.py - SQLite database
backend/app/core/database.py - Backend application
backend/app/main.py
Other components
- User
Connections 26
- User → Compose workspace: searches or pastes
- Compose workspace → Search API: searches
- Compose workspace → Job routes: starts job
- Job routes → Job repository: creates and reads
backend/app/jobs/router.py - Job routes → Source discovery: starts discovery
backend/app/jobs/router.py - Search API → Search aggregation: delegates search
backend/app/api/search.py - Search aggregation → Search providers: queries providers
backend/app/search/service.py - Search aggregation → Search triage: triages results
backend/app/search/service.py - Source discovery → Source extractors: resolves sources
backend/app/jobs/phases.py - Job routes → Review previews: builds preview
backend/app/jobs/router.py - Review previews → Source extractors: fetches preview text
backend/app/jobs/preview.py - User → Compilation reader: reviews and reads
- Compilation reader → Job routes: confirms selection
- Job routes → Job runner: starts compilation
backend/app/jobs/router.py - Job runner → Job repository: updates job state
backend/app/jobs/runner.py - Job repository → SQLite database: reads and writes
backend/app/jobs/repository.py - Backend application → SQLite database: initializes database
backend/app/main.py - Job runner → Source extractors: fetches selected content
backend/app/jobs/runner.py - Job runner → Transcript caches: uses transcript cache
backend/app/jobs/runner.py - Job runner → Text cleanup: applies cleanup roles
backend/app/jobs/runner.py - Text cleanup → LLM client: requests polish
backend/app/pipeline/llm.py - Job runner → Podcast transcription: transcribes episodes
backend/app/jobs/runner.py - Job runner → Content compiler: compiles selected text
backend/app/jobs/runner.py - Job runner → EPUB and cover renderer: renders book
backend/app/jobs/runner.py - User → Book download: downloads EPUB or Markdown
- Compilation reader → Browser history: stores history locally