Adding a New Source
December 6, 2025 ยท View on GitHub
Quick Start
python scripts/add-source.py
Answer 4 questions:
- Source name (e.g.,
NovelFull) - Website URL (e.g.,
https://novelfull.com) - Language code (e.g.,
en) - 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
- Open the website in Chrome/Firefox
- Right-click any element โ "Inspect"
- Find the class name or tag
- Test:
document.querySelector(".your-selector")
Common Selectors
| Element | Try These |
|---|---|
| Novel card | .novel-item, .book-item, .post |
| Title | h1, .title, h3.name |
| Cover | img, .cover img |
| Chapters | .chapter-list li, ul.chapters a |
| Content | .chapter-content p, .text p |
Build & Test
./gradlew :sources:en:mysource:assembleDebug