docs/.vitepress/configs/markdown/index.ts
429 lines · 17667 bytes
1import MdMTables from 'markdown-it-multimd-table'
2// @ts-expect-error
3import MdReg from 'markdown-it-regexp'
4import type { MarkdownRenderer } from 'vitepress'
5import { headersPlugin } from '../markdown/headers'
6import { figure } from '@mdit/plugin-figure'
7import { imgLazyload } from '@mdit/plugin-img-lazyload'
8import { align } from '@mdit/plugin-align'
9import { imgSize } from '@mdit/plugin-img-size'
10import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
11import { emojiRender } from './emoji'
12
13const tooltips: {
14 [key: string]: {
15 title?: string
16 icon?: string
17 content: string
18 }
19} = {
20 miruro: {
21 content: `
22 - Nice and minimal UI.
23 - Scrapes HiAnime (Zoro & Bun), AnimeKai (Arc & Gut) Animepahe (Kiwi), Gogo (Gogo & Vid), AnimeZ (Jet).
24 - Has built-in AniList support.`
25 },
26 AnimeStream: {
27 content: `
28 - Scrapes from Crunchyroll.
29 - UI is really basic.
30 - Browser has to support DRM.`
31 },
32 AnimeNexus: {
33 content: `
34 - Generally good video quality.
35 - Has multi-language softsub.
36 - Library size isn't that big. Good for recent airing shows.
37 - ⚠️ Has optimization issues on lower-end phones, may work better on different browsers. Doesn't support Safari / WebKit.`
38 },
39 KAA: {
40 content: `
41 - KAA encodes are on Videstreaming and Catstream. Birdstream scrapes Bilibili.
42 - Good for airing anime.
43 - Has good amount of missing old titles, but you can request them in their support server.`
44 },
45 AnimeKai: {
46 content: `
47 - Huge library.
48 - Re-encodes shows for smaller size.
49 - Mix of Web and Blu-ray releases.
50 - Anilist scraper is buggy. Adds PV, Specials & Extra entries even though it doesn't have the uploads.`
51 },
52 Zoro: {
53 content: `
54 - Huge library.
55 - Has multi-language softsub.
56 - Re-encodes shows for smaller size.`
57 },
58 Sudatchi: {
59 content: `
60 - Smaller library size. Good for new airing.
61 - Re-encoded to smaller filesize.
62 - Uses IPFS
63 - Only 1080p atm for most.`
64 },
65 AniZone: {
66 content: `
67 - Re-encoded to smaller file size.
68 - Very small library size.
69 - Good for airing shows.`
70 },
71 Animepahe: {
72 content: `
73 - Uploads mini encoded files, best if you want smaller files or have low bandwidth.
74 - Has a good amount of missing titles.
75 - Some titles don't get regular update.`
76 },
77 AllManga: {
78 content: `
79 - UI is really cluttered.
80 - Video quality fluctuates quite a bit.
81 - Players are a mix of self-hosted and scrapers.
82 - Luf-mp4 and Vid-mp4 are gogo scrapers.
83 - OK and AK have multiple resolutions.
84 - SW player is 720p only.`
85 },
86 Animotvslash: {
87 content: `
88 - Small library size.`
89 },
90 WCO: {
91 content: `
92 - Has both anime and cartoons.
93 - Library size is pretty good including old stuff.
94 - Uploads are compressed to mini-encode and low res.
95 - Movie uploads are paywalled. You can bypass some using wco.tv.`
96 },
97 OtakuStreamers: {
98 content: `
99 Although new releases are in 1080p, older releases are a mixed bag, ranging from 480p to 720p.`
100 },
101 AnimeRealms: {
102 content: `
103 Scrapes HiAnime (Soft), AnimePahe (Pahe), AnimeHeaven (Heaven - 720p).`
104 },
105 Enimoe: {
106 content: `
107 Scrapes HiAnime (Kaido), AnimeKai (Rose), AniZone (Zone), Anify (Violet), AnimeNoSub (Stack), FireAnime (Fire), Hikari (Cope), AnimeFox (Fox).`
108 },
109 Gojo: {
110 content: `
111 Scrapes AnimeOwl (Strix), AnimePahe (Pahe), AnimeZ (Zaza).`
112 },
113 ComicK: {
114 content: `
115 - Minimal compression
116 - Aggregates from various scanlation groups
117 - There's a 2/3 hour upload delay for most chapters sourced from scanlators' sites
118 - Has official translations
119 - Reader isn't as good as mangadex.`
120 },
121 MangaDex: {
122 content: `
123 - Uploads without compression
124 - Best reader UI (for a web reader)
125 - Uploads from various scanlation groups
126 - No official translations, barring some exceptions.
127 - Removes content upon DMCA takedown request, has already done so for 7000+ titles.`
128 },
129 WeebCentral: {
130 content: `
131 - Has official translations
132 - Compresses chapter images
133 - Chapter updates are relatively slow
134 - You can use AL sync with atsu.`
135 },
136 Batoto: {
137 content: `
138 - Has both scanlated and official releases
139 - Has some exclusive uploads
140 - Decent filtering options with site theme options
141 - Not an aggregator (unlike sister site Mangapark). Upload depends on manual upload. So has missing comics
142 - Has a lot of dupe entries.
143 - Images are compressed WEBP.`
144 },
145 MangaFire: {
146 content: `
147 - The UI is very clean with notification system
148 - Uploads both chapter (multi-lang) & volume releases
149 - Basic reader UI
150 - Watermark on almost every manga chapters
151 - Manga uploads are up to x1600.`
152 },
153 tron: {
154 content:
155 '[Comikey](https://comikey.com/), [J-Novel Club](https://j-novel.club/), [K Manga](https://kmanga.kodansha.com/), [Kodansha](https://kodansha.us/), [Manga UP!](https://global.manga-up.com/), [Seven Seas](https://sevenseasentertainment.com/), [SQUARE ENIX](https://squareenixmangaandbooks.square-enix-games.com/en-us), [VIZ](https://www.viz.com/), [Yen Press](https://yenpress.com/)'
156 },
157 anadius: { content: '[VIZ](https://www.viz.com/)' },
158 Danke: {
159 content:
160 '[Kodansha](https://kodansha.us/), [Seven Seas](https://sevenseasentertainment.com/), [VIZ](https://www.viz.com/), [Yen Press](https://yenpress.com/)'
161 },
162 DMF: {
163 content:
164 '[J-Novel Club](https://j-novel.club/), [Kodansha](https://kodansha.us/), [ONE PEACE BOOKS](https://www.onepeacebooks.com/), [Seven Seas](https://sevenseasentertainment.com/), [VIZ](https://www.viz.com/), [Yen Press](https://yenpress.com/)'
165 },
166 Empy: {
167 content:
168 '[Glacier Bay Books](https://glacierbaybooks.com/), [MANGA Plus](https://mangaplus.shueisha.co.jp/)'
169 },
170 Lord_ne: {
171 content:
172 '[Crunchyroll](https://store.crunchyroll.com/collections/manga/), [Lezhin Comics](https://www.lezhinus.com/en), [Yen Press](https://yenpress.com/)'
173 },
174 LuCaZ: {
175 content:
176 '[Kodansha](https://kodansha.us/), [Seven Seas](https://sevenseasentertainment.com/), [Yen Press](https://yenpress.com/)'
177 },
178 Oakminati: {
179 content:
180 '[MANGA Plus](https://mangaplus.shueisha.co.jp/), [Manga UP!](https://global.manga-up.com/) (Main), [SQUARE ENIX](https://squareenixmangaandbooks.square-enix-games.com/en-us)'
181 },
182 Rillant: {
183 content:
184 '[K Manga](https://kmanga.kodansha.com/), [Kodansha](https://kodansha.us/), [MANGA Plus](https://mangaplus.shueisha.co.jp/), [VIZ](https://www.viz.com/)'
185 },
186 Shellshock: {
187 content:
188 '[Kodansha](https://kodansha.us/), [VIZ](https://www.viz.com/), [Yen Press](https://yenpress.com/)'
189 },
190 Shizu: {
191 content:
192 '[Kodansha](https://kodansha.us/), [SuBLime](https://www.sublimemanga.com/), [VIZ](https://www.viz.com/), [Yen Press](https://yenpress.com/)'
193 },
194 Stick: {
195 content:
196 '[Cross Infinite World](https://www.crossinfworld.com/), [VIZ](https://www.viz.com/), [Yen Press](https://yenpress.com/)'
197 },
198 SWId: {
199 content:
200 '[Kodansha](https://kodansha.us/), [Seven Seas](https://sevenseasentertainment.com/), [Yen Press](https://yenpress.com/)'
201 },
202 TooManyIsekai: {
203 content:
204 '[J-Novel Club](https://j-novel.club/), [K Manga](https://kmanga.kodansha.com/), [Kodansha](https://kodansha.us/), [Manga UP!](https://global.manga-up.com/), [ONE PEACE BOOKS](https://www.onepeacebooks.com/), [Seven Seas](https://sevenseasentertainment.com/)'
205 },
206 Trite: {
207 content:
208 'Cover-to-cover (c2c) scans of physical-only books by various publishers.'
209 },
210 Ushi: {
211 content:
212 '[Seven Seas](https://sevenseasentertainment.com/), [Yen Press](https://yenpress.com/)'
213 },
214 AGR: {
215 content: 'Formerly Animated Glitched Scans and Animated Glitched Comics'
216 },
217 Scylla: { content: 'Formerly Scylla Scans' },
218 Flame: { content: 'Formerly Flame Scans' },
219 hive: { content: 'Formerly Infernal Void Scans, Void Scans and Hive toon' },
220 realm: { content: 'Formerly Realm Scans, Rizz Comics and Realm Oasis' },
221 utoon: { content: 'Formerly Manhwa Freak, freak scans, freak comics' },
222 Shiru: { content: 'Hard fork of Miru' },
223 Hakuneko: { content: 'For Linux, you have to use old one atm.' },
224 HDoujinDownloader: { content: 'Has a limit of 25 chapters per day.' },
225 CbxConverter: {
226 content:
227 'The version of Magick inside is really outdated. If you use it, download ImageMagick-[Latest_Version]-portable-Q8-x64.zip from the Imagemagick site, take the magick.exe from there and replace it in CbxConverter folder.'
228 },
229 BangumiList: {
230 content: 'Maintained by chinese devs, but lists JP schedule too.'
231 },
232 ComicRanking500: {
233 content:
234 "The rankings here are based on POS (point-of-sale) data from various bookstore chains in Japan's offline market. Books that primarily sell online or are heavily focused on online stores may rank lower on this list."
235 },
236 JosuKe: {
237 content:
238 "The site doesn't get updated often, visit their twitter for more recent graphs."
239 },
240 Flud: { content: 'Has a VPN-only option.' },
241 imgdanke: {
242 content: "Optional for GUI, but doesn't support Pingo v1+ at the moment."
243 },
244 Misskey: { content: 'Registrations are currently limited to Japan only.' },
245 Boorusphere: {
246 content: 'Repo is archived, but still works as of October 25, 2024.'
247 },
248 VocaloidRadio: {
249 content: 'Stream URL (192kbps): https://vocaloid.radioca.st/stream'
250 },
251 xManager: {
252 content:
253 "Due to Spotify changes, it doesn't work well in a lot of regions. Switch to echo."
254 },
255 Nicotine: {
256 content: 'A client for the Soulseek peer-to-peer file sharing network, primarily used for music.'
257 },
258 Koisuru: {
259 content:
260 'Subtitle files only, you need to get the episodes from another source.'
261 },
262 Spoilerplus: {
263 content:
264 "Image host is geo-restricted, so won't load pages in every region. Tested for the US."
265 },
266 Oppai: {
267 content: 'Late releases, but less compressed than other aggregators.'
268 },
269 nHentai: { content: 'Most popular. Decent UI, but compresses images.' },
270 Akuma: { content: 'E-Hentai clone.' },
271 HDoujin: { content: 'Side project of Schale Network, similar to nHentai.' },
272 Hitomi: { content: 'Big library, but difficult to navigate.' },
273 IMHentai: { content: 'Big library and great search filters.' },
274 PandaBackup: {
275 content:
276 'Archive of stuff removed from E-Hentai due to DMCA complaints. Has some obscure stuff deleted on most sites.'
277 },
278 SchaleNetwork: {
279 content: 'Formerly Koharu, has Fakku/Irodori rips (official TLs).'
280 },
281 Yabai: { content: 'E-Hentai clone.' },
282 HenTalkNexus: { content: 'Fakku/Irodori rips (official TLs).' },
283 EHentai: {
284 content:
285 "The Mangadex of doujins, almost every doujin is first uploaded here before being scraped by other sites. The online viewer compresses the images, but has the option to download in original quality. [ExHentai](https://exhentai.org/) is its sister site, which also hosts the more extreme and questionable content. You'll need an account on E-Hentai to gain access."
286 },
287 Rule34xxx: {
288 content: `
289 - Boasts a larger content library compared to Paheal.
290 - Features an extensive tagging system, allowing searches based on descriptions or depicted acts.
291 - Allows larger file uploads, up to 100MB.
292 - Searching is more user-friendly compared to Paheal.`
293 },
294 Rule34Paheal: {
295 content:
296 'Categorizes content by characters, franchises, events (such as holidays), animations, and sound, but limits uploads to 10MB.'
297 },
298 YACReader: {
299 content: `
300 - Has all the standard features, keeps last read history.
301 - Doesn't have built-in library like MComix, only the history.
302 - The bundled YACLibrary is excellent.
303 - Has lots of customization.
304 - Can act as a local manga server, like Calibre.
305 - But the server client for [Android](https://play.google.com/store/apps/details?id=com.yacreader.yacreader&hl=en&gl=US) and [iOS](https://apps.apple.com/ca/app/yacreader-comic-reader/id635717885) is paid.`
306 },
307 CDisplayEx: {
308 content: `
309 - Has a minimalist UI.
310 - Fast and simple reader with good amount of configuration.
311 - Has Nearest, Draft, linear and Lanczos (with various level) as scaling options.
312 - Not FOSS and not maintained since the development team has marked it as complete.
313 - No library view, only recent reads.`
314 },
315 OpenComic: {
316 content: `
317 - Nice clean UI, has dark mode.
318 - Has all the standard functions, including recent history.
319 - Has AniList tracking and controller support.
320 - Supports Lanczos and other scaling methods.`
321 },
322 MComix: {
323 content: `
324 - Minimal & responsive UI with good amount of customization.
325 - Has a nice library option and remembers last reading options.
326 - Has 3 scaling options: Normal, Bilinear (default) and Hyperbolic.`
327 },
328 SumatraPDF: {
329 content: `
330 - Very simple program with all the standard features.
331 - Doesn't have a library, but keeps track of recently opened files.
332 - Can open a variety of ebook formats (PDF, epub, mobi, cbz/cbr, DjVu, XPS, CHM).`
333 },
334 Yomikiru: {
335 content:
336 'Simple UI with all the basic settings. Has AniList tracking.'
337 },
338 kohi: { content: 'For now, you need to manually install and update the APK(s) from the "apk" folder in the repository. The install and URL buttons are currently non-functional.' },
339 ni3x: { content: 'Focuses on Torrents and Ero anime' },
340 secozzi: { content: 'For Jellyfin and Stremio' },
341 kei: { content: 'Maintained by former Tachiyomi contributors' },
342 yuzono: { content: 'By Komikku dev. Mirrors Keiyoushi repo with a few extra extensions' },
343 yuani: { content: 'By Anikku dev. Mirrors Kohi-den repo with a few extra extensions' },
344 demo: { content: 'Demo tooltips for start page' },
345 mirai: { content: 'Syncs the Mangayomi repository and includes their own plugins' },
346 megarepo: { content: 'Adds all the repo present in /recloudstream/cs-repos' },
347 dab: { content: 'Downloads from the Qobuz streaming platform, which only supports FLAC, not the other formats mentioned in the About page.' },
348 echo: { content: 'Use "extension" as code to load all the extensions.' },
349 cubari: { content: 'Scrapes MangaDex, WeebCentral, MangaKatana & scanlators.' },
350 akari: { content: 'Scrapes MangaKakalot.' },
351 komik: {content: 'Mostly up to the artist. Some of them are R2L too.'},
352 atosho: {content: 'Offers both DDL hosts and Usenet as download options, but only keeps uploads up to 16GB. DDL files might be auto-deleted by the hosts due to inactivity, unlike Usenet files. You can try [magicNZB](https://magicnzb.com/) for free Usenet downloads, as it allows temp-mails and does not require a CC.'},
353 linew: {content: 'In 2019, they rebranded LINE WEBTOON as WEBTOON. In some regions, it is still branded as LINE WEBTOON.'},
354 amdl: {content: 'We have not tested their software, use the web downloader for your own security. Best for downloading separate songs instead of albums. For audio quality, use "Original Quality".'},
355 webtooni: {content: 'Not uploading for a while.'},
356 hef: {content: 'Does not have all the recent fan projects.'},
357 cupscale: {content: 'Cupscale is not good for color and pages with no screentone.'},
358 kazamakase: {content: 'Does not get much update but has info about old comics.'},
359 mangarawspoil: {content: 'Has unusual geo-restrictions. Everything works in Japan, but some content may also be accessible in other regions. Although the watermarks differ, the content remains the same.'},
360 animez: {content: 'Rips 1080p from Kai.'},
361 kureha: {content: 'The site doesn’t offer a search option. To find a specific title, use Google: `LN/WN Title site:vn-meido.com`'},
362 aninow: {content: 'Scrapes HiAnime(ZoroX) and AnimePahe(BunnyCDN). Aninow is their own uploads.'},
363 zunime: {content: 'Scrapes HiAnime(yuki), Aniwave.se(miko) Animepahe(pahe) & Anizone (shiro)'},
364 mangaclan: {content: `Scrapes Zinmanga and MangaNato`},
365 vidbox: {content: `Scrapes MangaFire`}
366}
367
368export function configureMarkdown(md: MarkdownRenderer) {
369 md.use(emojiRender)
370 md.use(imgLazyload)
371 md.use(align)
372 md.use(figure)
373 md.use(tabsMarkdownPlugin)
374 md.use(imgSize)
375 md.use(headersPlugin)
376 md.use(MdMTables, {
377 multiline: true,
378 rowspan: true,
379 headerless: true,
380 multibody: true,
381 aotolabel: true
382 })
383 renderTooltip(md)
384 renderInlineTooltip(md)
385}
386
387function renderInlineTooltip(md: MarkdownRenderer) {
388 md.use(
389 MdReg(
390 /\^\[(.*?)\]\((.+?)\)/,
391 ([, cont, hint]) =>
392 '<VTooltip theme="hint">' +
393 span(md.renderInline(cont)) +
394 '<template v-slot:popper>' +
395 md.renderInline(hint) +
396 '</template></VTooltip>'
397 )
398 )
399}
400
401function renderTooltip(md: MarkdownRenderer) {
402 md.use(
403 MdReg(/==(.+?)==/, ([, cont]) => {
404 const keys = Object.keys(tooltips)
405 if (!keys.includes(cont)) return 'No tooltip found for ' + cont
406 const item = tooltips[cont]
407
408 const icon = item.icon ? `icon="${item.icon}"` : ''
409 const title = item.title ? `title="${item.title}"` : ''
410 const props = icon + title
411 const renderedContent = md.render(item.content)
412
413 return `<Tooltip ${props}>` + renderedContent + '</Tooltip>'
414 })
415 )
416}
417
418function span(
419 content: string,
420 attrs: Record<string, any> | undefined = undefined
421) {
422 let html = '<span'
423 if (attrs)
424 for (const [key, value] of Object.entries(attrs)) {
425 html += ` ${key}="${value}"`
426 }
427 html += `>${content}</span>`
428 return html
429}