Gunnerkrigg Court (#1362)

Gunnerkrigg Court
This commit is contained in:
InfinityPhase 2019-07-31 19:26:22 -07:00 committed by Eugene
parent a99d2a58c1
commit 092735d678
8 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,12 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
ext {
appName = 'Tachiyomi: Gunnerkrigg Court'
pkgNameSuffix = 'en.gunnerkriggcourt'
extClass = '.GunnerkriggCourt'
extVersionCode = 1
libVersion = '1.2'
}
apply from: "$rootDir/common.gradle"

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

View File

@ -0,0 +1,93 @@
package eu.kanade.tachiyomi.extension.en.gunnerkriggcourt
import android.util.Log
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 GunnerkriggCourt : ParsedHttpSource() {
override val name = "Gunnerkrigg Court"
override val baseUrl = "https://www.gunnerkrigg.com"
override val lang = "en"
override val supportsLatest = false
override fun fetchPopularManga(page: Int): Observable<MangasPage> {
val manga = SManga.create().apply {
title = name
artist = "Tom Siddell"
author = artist
status = SManga.ONGOING
url = "/archives/"
description = "Gunnerkrigg Court is a Science Fantasy webcomic by Tom Siddell about a" +
" strange young girl attending an equally strange school. The intricate story is " +
"deeply rooted in world mythology, but has a strong focus on science (chemistry " +
"and robotics, most prominently) as well.\n\n" +
"Antimony Carver begins classes at the eponymous U.K. Boarding School, and soon " +
"notices that strange events are happening: a shadow creature follows her around;" +
" a robot calls her \"Mummy\"; a Rogat Orjak smashes in the dormitory roof; odd " +
"birds, ticking like clockwork, stand guard in out-of-the-way places.\n\n" +
"Stranger still, in the middle of all this, Annie remains calm and polite to a fault."
thumbnail_url = "https://i.imgur.com/g2ukAIKh.jpgss"
}
return Observable.just(MangasPage(arrayListOf(manga).reversed(), false))
}
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> = Observable.empty()
override fun fetchMangaDetails(manga: SManga): Observable<SManga> {
return Observable.just(manga)
}
override fun chapterListSelector() = """div.chapters option[value~=\d*]"""
override fun chapterListParse(response: Response): List<SChapter> {
return super.chapterListParse(response).reversed()
}
override fun chapterFromElement(element: Element): SChapter {
return SChapter.create().apply {
chapter_number = element.attr("value").toFloat()
setUrlWithoutDomain("/?p=" + element.attr("value"))
name = element.parent().previousElementSibling().text() + " (" + chapter_number.toInt() + ")"
//date_upload // Find by using hovertext above "Tom" on actual comic page
}
}
override fun pageListParse(document: Document): List<Page> =
document.select(".comic_image").mapIndexed { i, element -> Page(i, "", baseUrl + element.attr("src")) }
//<editor-fold desc="Not Used">
override fun imageUrlParse(document: Document): String = 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")
//</editor-fold>
}