Update readme
This commit is contained in:
52
README.md
52
README.md
@@ -2,48 +2,50 @@
|
||||
|
||||
Library that provides manga sources.
|
||||
|
||||
[](https://jitpack.io/#nv95/kotatsu-parsers)   [](https://discord.gg/NNJ5RgVBC5)
|
||||
[](https://jitpack.io/#KotatsuApp/kotatsu-parsers)   [](https://discord.gg/NNJ5RgVBC5)
|
||||
|
||||
### Usage
|
||||
|
||||
1. Add it in your root build.gradle at the end of repositories:
|
||||
|
||||
```groovy
|
||||
allprojects {
|
||||
repositories {
|
||||
...
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
}
|
||||
```
|
||||
```groovy
|
||||
allprojects {
|
||||
repositories {
|
||||
...
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Add the dependency
|
||||
2. Add the dependency
|
||||
|
||||
For Java/Kotlin project:
|
||||
For Java/Kotlin project:
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation("com.github.nv95:kotatsu-parsers:$parsers_version")
|
||||
implementation("com.github.KotatsuApp:kotatsu-parsers:$parsers_version")
|
||||
}
|
||||
```
|
||||
|
||||
For Android project:
|
||||
|
||||
For Android project:
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation("com.github.nv95:kotatsu-parsers:$parsers_version") {
|
||||
implementation("com.github.KotatsuApp:kotatsu-parsers:$parsers_version") {
|
||||
exclude group: 'org.json', module: 'json'
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
See for versions at [JitPack](https://jitpack.io/#nv95/kotatsu-parsers)
|
||||
|
||||
|
||||
See for versions at [JitPack](https://jitpack.io/#KotatsuApp/kotatsu-parsers)
|
||||
|
||||
3. Usage in code
|
||||
|
||||
```kotlin
|
||||
val parser = MangaSource.MANGADEX.newParser(mangaLoaderContext)
|
||||
```
|
||||
|
||||
`mangaLoaderContext` is an implementation of the `MangaLoaderContext` class.
|
||||
See [Android](https://github.com/nv95/Kotatsu/blob/devel/app/src/main/java/org/koitharu/kotatsu/core/parser/MangaLoaderContextImpl.kt) and [Non-Android](https://github.com/nv95/kotatsu-dl/blob/master/src/main/kotlin/org/koitharu/kotatsu_dl/env/MangaLoaderContextImpl.kt) implementation examples.
|
||||
```kotlin
|
||||
val parser = MangaSource.MANGADEX.newParser(mangaLoaderContext)
|
||||
```
|
||||
|
||||
Note that the `MangaSource.LOCAL` and `MangaSource.DUMMY` parsers cannot be instantiated.
|
||||
`mangaLoaderContext` is an implementation of the `MangaLoaderContext` class.
|
||||
See [Android](https://github.com/KotatsuApp/Kotatsu/blob/devel/app/src/main/java/org/koitharu/kotatsu/core/parser/MangaLoaderContextImpl.kt)
|
||||
and [Non-Android](https://github.com/KotatsuApp/kotatsu-dl/blob/master/src/main/kotlin/org/koitharu/kotatsu_dl/env/MangaLoaderContextImpl.kt)
|
||||
implementation examples.
|
||||
|
||||
Note that the `MangaSource.LOCAL` and `MangaSource.DUMMY` parsers cannot be instantiated.
|
||||
Reference in New Issue
Block a user