diff --git a/src/en/existentialcomics/build.gradle b/src/en/existentialcomics/build.gradle new file mode 100644 index 000000000..ff07c0efc --- /dev/null +++ b/src/en/existentialcomics/build.gradle @@ -0,0 +1,12 @@ +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' + +ext { + appName = 'Tachiyomi: Existential Comics' + pkgNameSuffix = 'en.existentialcomics' + extClass = '.ExistentialComics' + extVersionCode = 1 + libVersion = '1.2' +} + +apply from: "$rootDir/common.gradle" diff --git a/src/en/existentialcomics/res/mipmap-hdpi/ic_launcher.png b/src/en/existentialcomics/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..b3dbbf2ff Binary files /dev/null and b/src/en/existentialcomics/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/en/existentialcomics/res/mipmap-mdpi/ic_launcher.png b/src/en/existentialcomics/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..0eb4e103c Binary files /dev/null and b/src/en/existentialcomics/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/en/existentialcomics/res/mipmap-xhdpi/ic_launcher.png b/src/en/existentialcomics/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..a5eca115b Binary files /dev/null and b/src/en/existentialcomics/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/en/existentialcomics/res/mipmap-xxhdpi/ic_launcher.png b/src/en/existentialcomics/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..ed9032355 Binary files /dev/null and b/src/en/existentialcomics/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/en/existentialcomics/res/mipmap-xxxhdpi/ic_launcher.png b/src/en/existentialcomics/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..1b6b7fdca Binary files /dev/null and b/src/en/existentialcomics/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/en/existentialcomics/res/web_hi_res_512.png b/src/en/existentialcomics/res/web_hi_res_512.png new file mode 100644 index 000000000..4985c5a3b Binary files /dev/null and b/src/en/existentialcomics/res/web_hi_res_512.png differ diff --git a/src/en/existentialcomics/src/eu/kanade/tachiyomi/extension/en/existentialcomics/ExistentialComics.kt b/src/en/existentialcomics/src/eu/kanade/tachiyomi/extension/en/existentialcomics/ExistentialComics.kt new file mode 100644 index 000000000..34dd75847 --- /dev/null +++ b/src/en/existentialcomics/src/eu/kanade/tachiyomi/extension/en/existentialcomics/ExistentialComics.kt @@ -0,0 +1,88 @@ +package eu.kanade.tachiyomi.extension.en.existentialcomics + +import eu.kanade.tachiyomi.source.model.* +import eu.kanade.tachiyomi.source.online.ParsedHttpSource +import okhttp3.Request +import okhttp3.Response +import org.jsoup.nodes.Document +import org.jsoup.nodes.Element +import rx.Observable + +class ExistentialComics : ParsedHttpSource() { + + override val name = "Existential Comics" + + override val baseUrl = "https://existentialcomics.com" + + override val lang = "en" + + override val supportsLatest = false + + override fun fetchPopularManga(page: Int): Observable { + val manga = SManga.create().apply { + title = "Existential Comics" + artist = "Corey Mohler" + author = "Corey Mohler" + status = SManga.ONGOING + url = "/archive/byDate" + description = "A philosophy comic about the inevitable anguish of living a brief life in an absurd world. Also Jokes." + thumbnail_url = "https://i.ibb.co/pykMVYM/existential-comics.png" + } + + return Observable.just(MangasPage(arrayListOf(manga), false)) + } + + override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable = Observable.empty() + + override fun fetchMangaDetails(manga: SManga) = Observable.just(manga) + + override fun chapterListParse(response: Response): List { + return super.chapterListParse(response).distinct().reversed() + } + + override fun chapterListSelector() = "div#date-comics ul li a:eq(0)" + + override fun chapterFromElement(element: Element): SChapter { + val urlregex = "http://existentialcomics.com/comic/(.*)".toRegex() + val chapterUrl = element.attr("href") + + val number = urlregex.find(chapterUrl)!!.groupValues[1] + + val chapter = SChapter.create() + chapter.url = "/comic/$number" + chapter.name = element.text() + chapter.chapter_number = number.toFloat() + return chapter + } + + override fun pageListParse(document: Document) = document.select(".comicImg").mapIndexed { i, element -> Page(i, "", "http:" + element.attr("src").substring(1)) } + + override fun imageUrlParse(document: Document) = throw Exception("Not used") + + override fun popularMangaSelector(): String = throw Exception("Not used") + + override fun searchMangaFromElement(element: Element): SManga = throw Exception("Not used") + + override fun searchMangaNextPageSelector(): String? = throw Exception("Not used") + + override fun searchMangaSelector(): String = throw Exception("Not used") + + override fun popularMangaRequest(page: Int): Request = throw Exception("Not used") + + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = throw Exception("Not used") + + override fun popularMangaNextPageSelector(): String? = throw Exception("Not used") + + override fun popularMangaFromElement(element: Element): SManga = throw Exception("Not used") + + override fun mangaDetailsParse(document: Document): SManga = throw Exception("Not used") + + override fun latestUpdatesNextPageSelector(): String? = throw Exception("Not used") + + override fun latestUpdatesFromElement(element: Element): SManga = throw Exception("Not used") + + override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used") + + override fun latestUpdatesSelector(): String = throw Exception("Not used") + +}