Add various French extensions to Madara (#16850)
* Add various french extensions to Madara * Rename class and source to MangaHubFr to distinguish it better from OG MangaHub * Forgot comma to separate className and pkgName
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 83 KiB |
|
@ -0,0 +1,9 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.fr.karatcamscans
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
|
class KaratcamScans : Madara("Karatcam Scans", "https://karatcam-scans.fr", "fr", dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.ENGLISH)) {
|
||||||
|
override val mangaSubString = "projets"
|
||||||
|
}
|
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 47 KiB |
|
@ -0,0 +1,9 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.fr.mangahubfr
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
|
class MangaHubFr : Madara("MangaHub.fr", "https://mangahub.fr", "fr", dateFormat = SimpleDateFormat("d MMMM yyyy", Locale.FRENCH)) {
|
||||||
|
override fun chapterListSelector() = "li.wp-mangas-chapters"
|
||||||
|
}
|
|
@ -1,94 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.fr.mangasorigines
|
package eu.kanade.tachiyomi.extension.fr.mangasorigines
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
|
||||||
import org.jsoup.nodes.Document
|
|
||||||
import org.jsoup.nodes.Element
|
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
class MangasOrigines : Madara("Mangas Origines", "https://mangas-origines.fr", "fr", SimpleDateFormat("dd/MM/yyyy", Locale("fr"))) {
|
class MangasOrigines : Madara("Mangas Origines", "https://mangas-origines.xyz", "fr", SimpleDateFormat("MMMM d, yyyy", Locale("fr"))) {
|
||||||
override val useNewChapterEndpoint = true
|
override val useNewChapterEndpoint = true
|
||||||
|
override val mangaDetailsSelectorStatus = "div.summary-heading:contains(statut) + div.summary-content"
|
||||||
private fun String.removeFireEmoji() = this.substringAfter("\uD83D\uDD25 ")
|
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
|
||||||
return super.popularMangaFromElement(element).apply {
|
|
||||||
title = title.removeFireEmoji()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
|
||||||
val manga = SManga.create()
|
|
||||||
with(document) {
|
|
||||||
select("div.post-title h1").first()?.let {
|
|
||||||
manga.title = it.ownText().removeFireEmoji()
|
|
||||||
}
|
|
||||||
select("div.author-content > a").eachText().filter {
|
|
||||||
it.notUpdating()
|
|
||||||
}.joinToString().takeIf { it.isNotBlank() }?.let {
|
|
||||||
manga.author = it
|
|
||||||
}
|
|
||||||
select("div.artist-content > a").eachText().filter {
|
|
||||||
it.notUpdating()
|
|
||||||
}.joinToString().takeIf { it.isNotBlank() }?.let {
|
|
||||||
manga.artist = it
|
|
||||||
}
|
|
||||||
select("div.manga-excerpt").let {
|
|
||||||
if (it.select("p").text().isNotEmpty()) {
|
|
||||||
manga.description = it.select("p").joinToString(separator = "\n\n") { p ->
|
|
||||||
p.text().replace("<br>", "\n")
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
manga.description = it.text()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
select("div.summary_image img").first()?.let {
|
|
||||||
manga.thumbnail_url = imageFromElement(it)
|
|
||||||
}
|
|
||||||
select("div.summary-content").last()?.let {
|
|
||||||
manga.status = with(it.text()) {
|
|
||||||
when {
|
|
||||||
// There's no support for LICENSED and PUBLISHING_FINISHED
|
|
||||||
contains("Complété") -> SManga.COMPLETED
|
|
||||||
contains("Annulé") -> SManga.CANCELLED
|
|
||||||
contains("En pause") -> SManga.ON_HIATUS
|
|
||||||
contains("En cours") -> SManga.ONGOING
|
|
||||||
else -> SManga.UNKNOWN
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val genres = select("div.genres-content a")
|
|
||||||
.map { element -> element.text().lowercase(Locale.ROOT) }
|
|
||||||
.toMutableSet()
|
|
||||||
|
|
||||||
// add tag(s) to genre
|
|
||||||
select("div.tags-content a").forEach { element ->
|
|
||||||
if (genres.contains(element.text()).not()) {
|
|
||||||
genres.add(element.text().lowercase(Locale.ROOT))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// add manga/manhwa/manhua thinggy to genre
|
|
||||||
document.select(seriesTypeSelector).firstOrNull()?.ownText()?.let {
|
|
||||||
if (it.isEmpty().not() && it.notUpdating() && it != "-" && genres.contains(it).not()) {
|
|
||||||
genres.add(it.lowercase(Locale.ROOT))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
manga.genre = genres.toList().joinToString(", ") { it.capitalize(Locale.ROOT) }
|
|
||||||
|
|
||||||
// add alternative name to manga description
|
|
||||||
document.select("div.summary-heading:contains(Autre) + .summary-content").firstOrNull()?.ownText()?.let {
|
|
||||||
if (it.isBlank().not() && it.notUpdating()) {
|
|
||||||
manga.description = when {
|
|
||||||
manga.description.isNullOrBlank() -> altName + it
|
|
||||||
else -> manga.description + "\n\n$altName" + it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return manga
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 45 KiB |
|
@ -0,0 +1,7 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.fr.raijinscans
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
|
class RaijinScans : Madara("Raijin Scans", "https://raijinscans.fr", "fr", dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.FRENCH))
|
|
@ -160,6 +160,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Jiangzaitoon", "https://jiangzaitoon.co", "tr", isNsfw = true, overrideVersionCode = 2),
|
SingleLang("Jiangzaitoon", "https://jiangzaitoon.co", "tr", isNsfw = true, overrideVersionCode = 2),
|
||||||
SingleLang("Kalango Scan", "https://kalangoscan.online", "pt-BR"),
|
SingleLang("Kalango Scan", "https://kalangoscan.online", "pt-BR"),
|
||||||
SingleLang("Kami Sama Explorer", "https://leitor.kamisama.com.br", "pt-BR", overrideVersionCode = 2),
|
SingleLang("Kami Sama Explorer", "https://leitor.kamisama.com.br", "pt-BR", overrideVersionCode = 2),
|
||||||
|
SingleLang("Karatcam Scans", "https://karatcam-scans.fr", "fr", isNsfw = true),
|
||||||
SingleLang("KawaScans", "https://kawascans.com", "en", overrideVersionCode = 1),
|
SingleLang("KawaScans", "https://kawascans.com", "en", overrideVersionCode = 1),
|
||||||
SingleLang("Kiara", "https://kiara.cool", "en"),
|
SingleLang("Kiara", "https://kiara.cool", "en"),
|
||||||
SingleLang("Kissmanga.in", "https://kissmanga.in", "en", className = "KissmangaIn", overrideVersionCode = 3),
|
SingleLang("Kissmanga.in", "https://kissmanga.in", "en", className = "KissmangaIn", overrideVersionCode = 3),
|
||||||
|
@ -232,6 +233,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("MangaFreak.online", "https://mangafreak.online", "en", className = "MangaFreakOnline"),
|
SingleLang("MangaFreak.online", "https://mangafreak.online", "en", className = "MangaFreakOnline"),
|
||||||
SingleLang("MangaGG", "https://mangagg.com", "en", overrideVersionCode = 2),
|
SingleLang("MangaGG", "https://mangagg.com", "en", overrideVersionCode = 2),
|
||||||
SingleLang("MangaGreat", "https://mangagreat.com", "en", overrideVersionCode = 3),
|
SingleLang("MangaGreat", "https://mangagreat.com", "en", overrideVersionCode = 3),
|
||||||
|
SingleLang("MangaHub.fr", "https://mangahub.fr", "fr", isNsfw = true, className = "MangaHubFr", pkgName = "mangahubfr"),
|
||||||
SingleLang("MangaHZ", "https://www.mangahz.com", "en", isNsfw = true, overrideVersionCode = 2),
|
SingleLang("MangaHZ", "https://www.mangahz.com", "en", isNsfw = true, overrideVersionCode = 2),
|
||||||
SingleLang("MangaK2", "https://mangak2.com", "en", isNsfw = true),
|
SingleLang("MangaK2", "https://mangak2.com", "en", isNsfw = true),
|
||||||
SingleLang("Mangakik", "https://mangakik.net", "en", overrideVersionCode = 1),
|
SingleLang("Mangakik", "https://mangakik.net", "en", overrideVersionCode = 1),
|
||||||
|
@ -248,7 +250,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("MangaRead.org", "https://www.mangaread.org", "en", className = "MangaReadOrg", overrideVersionCode = 1),
|
SingleLang("MangaRead.org", "https://www.mangaread.org", "en", className = "MangaReadOrg", overrideVersionCode = 1),
|
||||||
SingleLang("MangaRolls", "https://mangarolls.com", "en"),
|
SingleLang("MangaRolls", "https://mangarolls.com", "en"),
|
||||||
SingleLang("Mangas Origines X", "https://x.mangas-origines.fr", "fr", isNsfw = true),
|
SingleLang("Mangas Origines X", "https://x.mangas-origines.fr", "fr", isNsfw = true),
|
||||||
SingleLang("Mangas Origines", "https://mangas-origines.fr", "fr", isNsfw = true, overrideVersionCode = 3),
|
SingleLang("Mangas Origines", "https://mangas-origines.xyz", "fr", isNsfw = true, overrideVersionCode = 4),
|
||||||
SingleLang("MangaSco", "https://manhwasco.net", "en", overrideVersionCode = 2),
|
SingleLang("MangaSco", "https://manhwasco.net", "en", overrideVersionCode = 2),
|
||||||
SingleLang("MangaSiro", "https://mangasiro.com", "en", isNsfw = true),
|
SingleLang("MangaSiro", "https://mangasiro.com", "en", isNsfw = true),
|
||||||
SingleLang("MangaSpark", "https://mangaspark.com", "ar", overrideVersionCode = 2),
|
SingleLang("MangaSpark", "https://mangaspark.com", "ar", overrideVersionCode = 2),
|
||||||
|
@ -348,6 +350,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("ROG Mangás", "https://rogmangas.com", "pt-BR", pkgName = "mangasoverall", className = "RogMangas", overrideVersionCode = 1),
|
SingleLang("ROG Mangás", "https://rogmangas.com", "pt-BR", pkgName = "mangasoverall", className = "RogMangas", overrideVersionCode = 1),
|
||||||
SingleLang("Ragnarok Scanlation", "https://ragnarokscanlation.com", "es", className = "RagnarokScanlation"),
|
SingleLang("Ragnarok Scanlation", "https://ragnarokscanlation.com", "es", className = "RagnarokScanlation"),
|
||||||
SingleLang("RagnarokScan", "https://ragnarokscan.com", "es", overrideVersionCode = 1),
|
SingleLang("RagnarokScan", "https://ragnarokscan.com", "es", overrideVersionCode = 1),
|
||||||
|
SingleLang("Raijin Scans", "https://raijinscans.fr", "fr"),
|
||||||
SingleLang("Rainbow Fairy Scan", "https://rainbowfairyscan.com", "pt-BR"),
|
SingleLang("Rainbow Fairy Scan", "https://rainbowfairyscan.com", "pt-BR"),
|
||||||
SingleLang("Random Scan", "https://randomscans.com", "pt-BR", overrideVersionCode = 5),
|
SingleLang("Random Scan", "https://randomscans.com", "pt-BR", overrideVersionCode = 5),
|
||||||
SingleLang("RawDEX", "https://rawdex.net", "ko", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("RawDEX", "https://rawdex.net", "ko", isNsfw = true, overrideVersionCode = 1),
|
||||||
|
|