From 30be01221010a0952d439f9d11e219f1b1680e3d Mon Sep 17 00:00:00 2001 From: Johannes Joens <34899572+jopejoe1@users.noreply.github.com> Date: Sat, 3 Apr 2021 01:52:17 +1300 Subject: [PATCH] Zbulu split (#6387) * Create Zbulu.kt * Create ZbuluGenerator.kt * Added default icon * De;eted single source files --- .../default}/res/mipmap-hdpi/ic_launcher.png | Bin .../default}/res/mipmap-mdpi/ic_launcher.png | Bin .../default}/res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher.png | Bin .../zbulu/default}/res/web_hi_res_512.png | Bin .../kanade/tachiyomi/multisrc}/zbulu/Zbulu.kt | 4 +-- .../multisrc/zbulu/ZbuluGenerator.kt | 27 ++++++++++++++++++ src/all/zbulu/AndroidManifest.xml | 2 -- src/all/zbulu/build.gradle | 12 -------- .../extension/all/zbulu/ZbuluFactory.kt | 26 ----------------- 11 files changed, 29 insertions(+), 42 deletions(-) rename {src/all/zbulu => multisrc/overrides/zbulu/default}/res/mipmap-hdpi/ic_launcher.png (100%) rename {src/all/zbulu => multisrc/overrides/zbulu/default}/res/mipmap-mdpi/ic_launcher.png (100%) rename {src/all/zbulu => multisrc/overrides/zbulu/default}/res/mipmap-xhdpi/ic_launcher.png (100%) rename {src/all/zbulu => multisrc/overrides/zbulu/default}/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {src/all/zbulu => multisrc/overrides/zbulu/default}/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {src/all/zbulu => multisrc/overrides/zbulu/default}/res/web_hi_res_512.png (100%) rename {src/all/zbulu/src/eu/kanade/tachiyomi/extension/all => multisrc/src/main/java/eu/kanade/tachiyomi/multisrc}/zbulu/Zbulu.kt (99%) create mode 100644 multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zbulu/ZbuluGenerator.kt delete mode 100644 src/all/zbulu/AndroidManifest.xml delete mode 100644 src/all/zbulu/build.gradle delete mode 100644 src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/ZbuluFactory.kt diff --git a/src/all/zbulu/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/zbulu/default/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from src/all/zbulu/res/mipmap-hdpi/ic_launcher.png rename to multisrc/overrides/zbulu/default/res/mipmap-hdpi/ic_launcher.png diff --git a/src/all/zbulu/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/zbulu/default/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from src/all/zbulu/res/mipmap-mdpi/ic_launcher.png rename to multisrc/overrides/zbulu/default/res/mipmap-mdpi/ic_launcher.png diff --git a/src/all/zbulu/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/zbulu/default/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from src/all/zbulu/res/mipmap-xhdpi/ic_launcher.png rename to multisrc/overrides/zbulu/default/res/mipmap-xhdpi/ic_launcher.png diff --git a/src/all/zbulu/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/zbulu/default/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from src/all/zbulu/res/mipmap-xxhdpi/ic_launcher.png rename to multisrc/overrides/zbulu/default/res/mipmap-xxhdpi/ic_launcher.png diff --git a/src/all/zbulu/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/zbulu/default/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from src/all/zbulu/res/mipmap-xxxhdpi/ic_launcher.png rename to multisrc/overrides/zbulu/default/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/src/all/zbulu/res/web_hi_res_512.png b/multisrc/overrides/zbulu/default/res/web_hi_res_512.png similarity index 100% rename from src/all/zbulu/res/web_hi_res_512.png rename to multisrc/overrides/zbulu/default/res/web_hi_res_512.png diff --git a/src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/Zbulu.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zbulu/Zbulu.kt similarity index 99% rename from src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/Zbulu.kt rename to multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zbulu/Zbulu.kt index d2dda2d3c..ef3cf4686 100644 --- a/src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/Zbulu.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zbulu/Zbulu.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.extension.all.zbulu +package eu.kanade.tachiyomi.multisrc.zbulu import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.model.Filter @@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit abstract class Zbulu( override val name: String, override val baseUrl: String, - override val lang: String = "en" + override val lang: String ) : ParsedHttpSource() { override val supportsLatest = true diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zbulu/ZbuluGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zbulu/ZbuluGenerator.kt new file mode 100644 index 000000000..147b9f09b --- /dev/null +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zbulu/ZbuluGenerator.kt @@ -0,0 +1,27 @@ +package eu.kanade.tachiyomi.multisrc.zbulu + +import generator.ThemeSourceData.SingleLang +import generator.ThemeSourceGenerator + +class ZbuluGenerator : ThemeSourceGenerator { + + override val themePkg = "zbulu" + + override val themeClass = "Zbulu" + + override val baseVersionCode: Int = 1 + + override val sources = listOf( + SingleLang("HolyManga", "https://w15.holymanga.net", "en"), + SingleLang("My Toon", "https://mytoon.net", "en"), + SingleLang("Koo Manga", "https://ww9.koomanga.com", "en"), + SingleLang("Bulu Manga", "https://ww8.bulumanga.net", "en") + ) + + companion object { + @JvmStatic + fun main(args: Array) { + ZbuluGenerator().createAll() + } + } +} diff --git a/src/all/zbulu/AndroidManifest.xml b/src/all/zbulu/AndroidManifest.xml deleted file mode 100644 index 30deb7f79..000000000 --- a/src/all/zbulu/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/all/zbulu/build.gradle b/src/all/zbulu/build.gradle deleted file mode 100644 index bd3fcce45..000000000 --- a/src/all/zbulu/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'zBulu' - pkgNameSuffix = 'all.zbulu' - extClass = '.ZbuluFactory' - extVersionCode = 5 - libVersion = '1.2' -} - -apply from: "$rootDir/common.gradle" diff --git a/src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/ZbuluFactory.kt b/src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/ZbuluFactory.kt deleted file mode 100644 index 79bb2ea5f..000000000 --- a/src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/ZbuluFactory.kt +++ /dev/null @@ -1,26 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.zbulu - -import eu.kanade.tachiyomi.source.Source -import eu.kanade.tachiyomi.source.SourceFactory -import eu.kanade.tachiyomi.source.model.Page -import org.jsoup.nodes.Document - -class ZbuluFactory : SourceFactory { - override fun createSources(): List = listOf( - HolyManga(), - HeavenManga(), - KooManga(), - BuluManga(), - ) -} - -class HolyManga : Zbulu("HolyManga", "https://w15.holymanga.net") -class HeavenManga : Zbulu("HeavenManga", "https://heaventoon.com") -class KooManga : Zbulu("Koo Manga", "https://ww1.koomanga.com") -class BuluManga : Zbulu("Bulu Manga", "https://ww5.bulumanga.net") { - override fun pageListParse(document: Document): List { - return document.select("div.chapter-content img").mapIndexed { i, img -> - Page(i, "", img.attr("abs:src").substringAfter("url=")) - } - } -}