<commit_before>package viscel.narration.narrators

import org.jsoup.nodes.Document
import org.scalactic._
import upickle.default
import viscel.narration.Queries._
import viscel.narration.{Metarrator, Templates}
import viscel.scribe.Vurl
import viscel.selection.{Report, Selection}

object MangaHere {

	case class Nar(id: String, name: String, archiveUri: Vurl) extends Templates.AP(
		archiveUri,
		Selection(_).many(".detail_list > ul:first-of-type a").reverse.wrapFlat {elementIntoChapterPointer},
		queryImageNext("#image", ".next_page:not([onclick])")
	)

	object MetaCore extends Metarrator[Nar]("MangaHere") {
		override def reader: default.Reader[Nar] = implicitly[default.Reader[Nar]]
		override def writer: default.Writer[Nar] = implicitly[default.Writer[Nar]]

		override def unapply(vurl: String): Option[Vurl] = if (vurl.toString.startsWith("http://www.mangahere.co/manga/")) Some(Vurl.fromString(vurl)) else None

		val extractID = """http://www.mangahere.co/manga/([^/]+)/""".r

		override def wrap(doc: Document): List[Nar] Or Every[Report] =<commit_msg>improve MangaHere chapter names<commit_after>package viscel.narration.narrators

import org.jsoup.nodes.Document
import org.scalactic._
import upickle.default
import viscel.narration.Queries._
import viscel.narration.{Metarrator, Templates}
import viscel.scribe.Vurl
import viscel.selection.{Report, Selection}

object MangaHere {

	case class Nar(id: String, name: String, archiveUri: Vurl) extends Templates.AP(
		archiveUri,
		doc => queryMixedArchive(".detail_list > ul:first-of-type > li , .detail_list > ul:first-of-type a ")(doc).map(reverse),
		queryImageNext("#image", ".next_page:not([onclick])")
	)

	object MetaCore extends Metarrator[Nar]("MangaHere") {
		override def reader: default.Reader[Nar] = implicitly[default.Reader[Nar]]
		override def writer: default.Writer[Nar] = implicitly[default.Writer[Nar]]

		override def unapply(vurl: String): Option[Vurl] = if (vurl.toString.startsWith("http://www.mangahere.co/manga/")) Some(Vurl.fromString(vurl)) else None

		val extractID = """http://www.mangahere.co/manga/([^/]+)/""".r

		override def wrap(doc: Document): List[Nar] Or Every[Report] =
{'fraction_non_alphanumeric': 0.1455463728191001, 'fraction_numerical': 0.0, 'mean_word_length': 5.873817034700315, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3629980', 'n_tokens_mistral': 765, 'n_tokens_neox': 720, 'n_words': 149}