From 2c7420e049ee10a1a5a4da55972f465bd08ece6d Mon Sep 17 00:00:00 2001 From: K1ngfish3r Date: Sun, 5 Jan 2025 15:31:27 +0500 Subject: [PATCH] madara update (#1405) * madara customJS * update for boxnovel --- .../multisrc/madara/fortuneeternal/icon.png | Bin 0 -> 23343 bytes scripts/multisrc/madara/README.md | 2 + scripts/multisrc/madara/generator.js | 5 +- scripts/multisrc/madara/sources.json | 21 ++++-- scripts/multisrc/madara/template.ts | 66 ++++++++---------- 5 files changed, 53 insertions(+), 41 deletions(-) create mode 100644 public/static/multisrc/madara/fortuneeternal/icon.png diff --git a/public/static/multisrc/madara/fortuneeternal/icon.png b/public/static/multisrc/madara/fortuneeternal/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..52fe996a810e466ab59c443108a8ce9ddd20b04d GIT binary patch literal 23343 zcmV(;K-<5GP)<-CX?Pf zDfAF}6A(iY#KNlVy2>i+w<{>tb$3Ovu80Ltks>vOBoIgs>61w&lj(it_Fhl_-gEBE zBq(b5ub;dB3qvw9=brOBZ+YJ5d4KP@@c94HtNF8iZ0yKWa|&_)?ViR3o1)u3d-%^C zzvAkR%+W2+8h@+x{eOA!|I-UNm)EODGwe{hFyonhiO+>$d}!|SwH4QY;QH)0|AYf> z`PP&6-EX~eoz%3n?6*VD{Nm0gM*CZ@`CMQBs~xcQM2alOPG>ak?;WsxI5pH=*-$@= zS%1Z47z`9@Z~jS;eeu3(ee(FjQH|d+6j=4@%Wrj4%mDm&2So5uNwM& zjG%qOA1jo>aCa z?;2r*bP_vXeMZ)^@y#B$BmZ94`uy(0+-tvksUs{-0UU4d1Ix+?_8dZT z>}W(&b5FBiek>SjUuBJx*BqX!_HN($rM8;-l}>lLNce-`@%_klpGX^OZVxNs+XibK zh#x)N zcK+PC(O-Yz6S=?E{r`_S;I-q~GKOV8W^lr1{IT@3%?F0iesTz!l0mp*7c$|VxWN=& zf}wv`)YZ=OKJ`iT4se_QEG-E?Bv4$%Sh+{u|pWY~SC-96sF#E}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?-lX?c>E79%=>CsEzURq0000< KMNUMnLSTZwDz88Q literal 0 HcmV?d00001 diff --git a/scripts/multisrc/madara/README.md b/scripts/multisrc/madara/README.md index 0854e9ff6..4fe34afc0 100644 --- a/scripts/multisrc/madara/README.md +++ b/scripts/multisrc/madara/README.md @@ -24,6 +24,8 @@ To add a new source you need to add it to sources.json: exists in the languages (check folder names in "plugins/")) - useNewChapterEndpoint: if the source uses the new chapter endpoint - versionIncrements: needs to be updated everytime the site url is updated + - customJS: custom javascript that will be excuted when getting the text (if + the site has a custom copyright that need to be removed) ### icon diff --git a/scripts/multisrc/madara/generator.js b/scripts/multisrc/madara/generator.js index 43656879f..a57061904 100644 --- a/scripts/multisrc/madara/generator.js +++ b/scripts/multisrc/madara/generator.js @@ -27,7 +27,10 @@ const generator = function generator(source) { }); const pluginScript = ` -${madaraTemplate} +${madaraTemplate.replace( + '// CustomJS HERE', + source.options?.customJs || '', +)} const plugin = new MadaraPlugin(${JSON.stringify(source)}); export default plugin; `.trim(); diff --git a/scripts/multisrc/madara/sources.json b/scripts/multisrc/madara/sources.json index 4718d3647..0b1bef878 100644 --- a/scripts/multisrc/madara/sources.json +++ b/scripts/multisrc/madara/sources.json @@ -4,7 +4,9 @@ "sourceSite": "https://boxnovel.com/", "sourceName": "BoxNovel", "options": { - "useNewChapterEndpoint": true + "useNewChapterEndpoint": true, + "customJs": "chapterText.find(.cha-tit > div).remove()", + "versionIncrements": 1 } }, { @@ -141,7 +143,8 @@ "options": { "useNewChapterEndpoint": true, "lang": "Arabic", - "versionIncrements": 4 + "versionIncrements": 5, + "customJs": "chapterText.find('span[style*=\"opacity: 0; position: fixed;\"]').remove();" } }, { @@ -301,11 +304,12 @@ }, { "id": "azora", - "sourceSite": "https://azorago.com/", + "sourceSite": "https://azoramoon.com/", "sourceName": "Azora", "options": { "useNewChapterEndpoint": true, - "lang": "Arabic" + "lang": "Arabic", + "versionIncrements": 1 } }, { @@ -498,5 +502,14 @@ "lang": "English", "useNewChapterEndpoint": true } + }, + { + "id": "fortuneeternal", + "sourceSite": "https://fortuneeternal.com", + "sourceName": "Fortune Eternal", + "options": { + "lang": "Korean", + "useNewChapterEndpoint": true + } } ] \ No newline at end of file diff --git a/scripts/multisrc/madara/template.ts b/scripts/multisrc/madara/template.ts index c3a457c29..74a4b09dc 100644 --- a/scripts/multisrc/madara/template.ts +++ b/scripts/multisrc/madara/template.ts @@ -14,6 +14,7 @@ type MadaraOptions = { lang?: string; orderBy?: string; versionIncrements?: number; + customJs?: string; }; export type MadaraMetadata = { @@ -45,40 +46,27 @@ class MadaraPlugin implements Plugin.PluginBase { } translateDragontea(text: Cheerio): Cheerio { - if (this.id === 'dragontea') { - const $ = parseHTML(text.html() || ''); - let sanitizedText = $.html() || ''; - sanitizedText = sanitizedText.replace('\n', ''); - sanitizedText = sanitizedText.replace(//g, '\n'); - text.html(sanitizedText); - text.find(':not(:has(*))').each((i, el) => { - // Select only the deepest elements to avoid reversing the text twice - const $el = $(el); - const alphabet = - 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); - const reversedAlphabet = - 'zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA'.split(''); - const text = $el.text().normalize('NFD'); // Normalize the string to separate the accents - const reversedText = text.split(''); - const reversedLetters = [...reversedText] - .map(letter => { - const baseLetter = letter.normalize('NFC'); - const index = alphabet.indexOf(baseLetter); - return index !== -1 - ? reversedAlphabet[index] + letter.slice(baseLetter.length) - : letter; - }) - .join(''); - $el.html( - $el - .html() - ?.replace($el.text(), reversedLetters) - .replace('\n', '
') || '', - ); - }); - } + if (this.id !== 'dragontea') return text; + + const $ = parseHTML(text.html()?.replace('\n', '').replace(//g, '\n') || ''); + const reverseAlpha = 'zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA'; + const forwardAlpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + + text.html($.html()); + text.find('*').addBack().contents().filter((_, el) => el.nodeType === 3).each((_, el) => { + const $el = $(el); + const translated = $el.text().normalize('NFD').split('') + .map(char => { + const base = char.normalize('NFC'); + const idx = forwardAlpha.indexOf(base); + return idx >= 0 ? reverseAlpha[idx] + char.slice(base.length) : char; + }) + .join(''); + $el.replaceWith(translated.replace('\n', '
')); + }); + return text; - } + } getHostname(url: string): string { url = url.split('/')[2]; @@ -258,6 +246,7 @@ class MadaraPlugin implements Plugin.PluginBase { if (this.options?.useNewChapterEndpoint) { html = await fetchApi(this.site + novelPath + 'ajax/chapters/', { method: 'POST', + referrer: this.site + novelPath }).then(res => res.text()); } else { const novelId = @@ -318,10 +307,15 @@ class MadaraPlugin implements Plugin.PluginBase { loadedCheerio('.entry-content') || loadedCheerio('.c-blog-post > div > div:nth-child(2)'); - if (this.id === 'riwyat') { - chapterText.find('span[style*="opacity: 0; position: fixed;"]').remove(); + if (this.options?.customJs) { + try { + // CustomJS HERE + } catch (error) { + console.error('Error executing customJs:', error); + throw error; + } } - chapterText.find('div.text-right').attr('style', 'text-align: right;'); + return this.translateDragontea(chapterText).html() || ''; }