https://github.com/bethibande/kotatsu-java-stub
A java-wrapper for the kotatsu-parsers library
https://github.com/bethibande/kotatsu-java-stub
java kotatsu kotlin
Last synced: 2 months ago
JSON representation
A java-wrapper for the kotatsu-parsers library
- Host: GitHub
- URL: https://github.com/bethibande/kotatsu-java-stub
- Owner: Bethibande
- License: gpl-3.0
- Created: 2024-12-21T15:41:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-10-19T18:06:59.000Z (8 months ago)
- Last Synced: 2025-10-20T01:44:01.663Z (8 months ago)
- Topics: java, kotatsu, kotlin
- Language: Java
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kotatsu java stub
This is a project that wraps the MangaParser class and its functionality of the [kotatsu-parsers](https://github.com/KotatsuApp/kotatsu-parsers) library.
The original library is written in kotlin and uses kotlin coroutines, which makes it difficult to use in Java projects.
### Download
```kotlin
repositories {
mavenCentral()
google()
maven("https://pckg.bethibande.com/repository/maven-releases/")
maven("https://jitpack.io")
}
dependencies {
implementation("com.bethibande:kotatsu-kotlin:21.12")
implementation("com.bethibande:kotatsu-java:21.12")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.10.2")
}
```
### Usage example
```java
private static KotatsuParser createParser(final MangaParserSource source) {
final KotatsuParser parser = KotatsuParser.of(source);
final RateLimits rateLimits = RateLimits.of(5_000);
return KotatsuParser.withRateLimit(rateLimits, parser);
}
public static void main(String[] args) throws IOException {
final KotatsuParser parser = createParser(MangaParserSource.MANGADEX);
// Note that operations like getList are performed in a blocking manner and are meant to run on virtual threads for peak performance.
final List mangas = parser.getList(new MangaSearchQuery.Builder()
.order(SortOrder.ADDED)
.offset(0)
.build());
for (final Manga manga : mangas) {
System.out.println(manga);
}
final ResourceDownloader downloader = new ResourceDownloader(parser);
final MangaResource favicon = downloader.getAnyFavicon();
Files.write(Path.of("favicon"), favicon.stream().readAllBytes());
}
```