Adding a New Source

December 6, 2025 ยท View on GitHub

Quick Start

python scripts/add-source.py

Answer 4 questions:

  1. Source name (e.g., NovelFull)
  2. Website URL (e.g., https://novelfull.com)
  3. Language code (e.g., en)
  4. Is it a Madara site? (y/n)

What Gets Generated

Madara Sites (zero-code)

@MadaraSource(
    name = "MySite",
    baseUrl = "https://mysite.com",
    lang = "en",
    id = 12345L
)
object MySiteConfig

That's it! KSP generates everything else.

Regular Sites (with KSP annotations)

@Extension
@AutoSourceId(seed = "MySite")
@GenerateFilters(title = true, sort = true, sortOptions = ["Latest", "Popular"])
@GenerateCommands(detailFetch = true, chapterFetch = true, contentFetch = true)
abstract class MySite(deps: Dependencies) : SourceFactory(deps = deps) {
    // Just update the CSS selectors
}

Finding CSS Selectors

  1. Open the website in Chrome/Firefox
  2. Right-click any element โ†’ "Inspect"
  3. Find the class name or tag
  4. Test: document.querySelector(".your-selector")

Common Selectors

ElementTry These
Novel card.novel-item, .book-item, .post
Titleh1, .title, h3.name
Coverimg, .cover img
Chapters.chapter-list li, ul.chapters a
Content.chapter-content p, .text p

Build & Test

./gradlew :sources:en:mysource:assembleDebug