From 6416171121e4559f219432a48379dd52abaf7148 Mon Sep 17 00:00:00 2001 From: rhahao <26148770+rhahao@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:29:08 +0300 Subject: [PATCH] feat(locales): add pidgin (west africa) language --- README.md | 2 +- example/sample.ts | 426 +++++++++--------- src/browser/utils.browser.ts | 3 +- src/common/date_parser.ts | 6 +- src/common/parsing_rules.ts | 3 +- src/locales/languages.ts | 1 + src/locales/wes-pgw/text.json | 15 - src/node/utils.node.ts | 3 +- test/enhancedParsing/list.json | 3 +- test/fixtures/mwb_PGW_202411.js | 308 +++++++++++++ test/fixtures/w_PGW_202411.js | 30 ++ test/fixtures/{w_Z_202411js => w_Z_202411.js} | 0 12 files changed, 567 insertions(+), 233 deletions(-) delete mode 100644 src/locales/wes-pgw/text.json create mode 100644 test/fixtures/mwb_PGW_202411.js create mode 100644 test/fixtures/w_PGW_202411.js rename test/fixtures/{w_Z_202411js => w_Z_202411.js} (100%) diff --git a/README.md b/README.md index 56a77447..dddcf5a1 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Italian Japanese Korean Malagasy -Polish, Portuguese Brazil +Pidgin (West Africa), Polish, Portuguese Brazil Romanian, Russian Spanish, Swedish Tagalog, Tandroy, Tankarana, Turkish, Twin diff --git a/example/sample.ts b/example/sample.ts index 60479808..77394743 100644 --- a/example/sample.ts +++ b/example/sample.ts @@ -1,227 +1,229 @@ import { loadEPUB } from '../src/node/index.js'; -const JW_CDN = 'https://app.jw-cdn.org/apis/pub-media/GETPUBMEDIALINKS?'; +const JW_CDN = 'https://b.jw-cdn.org/apis/pub-media/GETPUBMEDIALINKS?'; const WOL_E = 'https://wol.jw.org/wol/dt/r1/lp-e'; const months = [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December', + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', ]; type issue = { - issueDate: string; - currentYear: number; - language: string; - hasEPUB: any; + issueDate: string; + currentYear: number; + language: string; + hasEPUB: any; }; const fetchIssueData = async (issue: issue): Promise => { - try { - if (issue.hasEPUB) { - const epubFile = issue.hasEPUB[0].file; - const epubUrl = epubFile.url; - - const epubData = await loadEPUB({ url: epubUrl }); - return epubData; - } - - if (!issue.hasEPUB) { - return []; - } - } catch (err: any) { - throw new Error(err); - } + try { + if (issue.hasEPUB) { + const epubFile = issue.hasEPUB[0].file; + const epubUrl = epubFile.url; + + const epubData = await loadEPUB({ url: epubUrl }); + return epubData; + } + + if (!issue.hasEPUB) { + return []; + } + } catch (err: any) { + throw new Error(err); + } }; export const fetchData = async (language: string, issue: string | undefined, pub: string | undefined) => { - let data = []; - - if (!issue && !pub) { - for await (const pub of ['mwb', 'w']) { - const issues = []; - - if (pub === 'mwb') { - let notFound = false; - - // get current issue - const today = new Date(); - const day = today.getDay(); - const diff = today.getDate() - day + (day === 0 ? -6 : 1); - const weekDate = new Date(today.setDate(diff)); - const validDate = weekDate.setMonth(weekDate.getMonth()); - - const startDate = new Date(validDate); - const currentMonth = startDate.getMonth() + 1; - const monthOdd = currentMonth % 2 === 0 ? false : true; - let monthMwb = monthOdd ? currentMonth : currentMonth - 1; - let currentYear = startDate.getFullYear(); - - do { - const issueDate = currentYear + String(monthMwb).padStart(2, '0'); - const url = - JW_CDN + - new URLSearchParams({ - langwritten: language, - pub, - output: 'json', - issue: issueDate, - }); - - const res = await fetch(url); - - if (res.status === 200) { - const result = await res.json(); - const hasEPUB = result.files[language].EPUB; - - issues.push({ issueDate, currentYear, language, hasEPUB: hasEPUB }); - } - - if (res.status === 404) { - notFound = true; - } - - // assigning next issue - monthMwb = monthMwb + 2; - if (monthMwb === 13) { - monthMwb = 1; - currentYear++; - } - } while (notFound === false); - } - - if (pub === 'w') { - let notFound = false; - - // get w current issue - const today = new Date(); - const url = `${WOL_E}/${today.getFullYear()}/${today.getMonth() + 1}/${today.getDate()}`; - - const res = await fetch(url); - const data = await res.json(); - - const wData = data.items.find((item: any) => item.classification === 68); - const publicationTitle = wData.publicationTitle; - - const findYear = /\b\d{4}\b/; - const array = findYear.exec(publicationTitle); - let currentYear = +array![0]; - - const monthsRegex = `(${months.join('|')})`; - - const regex = new RegExp(monthsRegex); - const array2 = regex.exec(publicationTitle); - - let monthW = months.findIndex((month) => month === array2![0]) + 1; - - do { - const issueDate = currentYear + String(monthW).padStart(2, '0'); - const url = - JW_CDN + - new URLSearchParams({ - langwritten: language, - pub, - output: 'json', - issue: issueDate, - }); - - const res = await fetch(url); - - if (res.status === 200) { - const result = await res.json(); - const hasEPUB = result.files[language].EPUB; - - issues.push({ issueDate, currentYear, language, hasEPUB: hasEPUB }); - } - - if (res.status === 404) { - notFound = true; - } - - // assigning next issue - monthW = monthW + 1; - if (monthW === 13) { - monthW = 1; - currentYear++; - } - } while (notFound === false); - } - - if (issues.length > 0) { - const fetchSource1 = fetchIssueData(issues[0]); - const fetchSource2 = issues.length > 1 ? fetchIssueData(issues[1]) : Promise.resolve([]); - const fetchSource3 = issues.length > 2 ? fetchIssueData(issues[2]) : Promise.resolve([]); - const fetchSource4 = issues.length > 3 ? fetchIssueData(issues[3]) : Promise.resolve([]); - const fetchSource5 = issues.length > 4 ? fetchIssueData(issues[4]) : Promise.resolve([]); - const fetchSource6 = issues.length > 5 ? fetchIssueData(issues[5]) : Promise.resolve([]); - const fetchSource7 = issues.length > 6 ? fetchIssueData(issues[6]) : Promise.resolve([]); - - const allData = await Promise.all([ - fetchSource1, - fetchSource2, - fetchSource3, - fetchSource4, - fetchSource5, - fetchSource6, - fetchSource7, - ]); - - for (let z = 0; z < allData.length; z++) { - const tempObj: any = allData[z]; - if (tempObj.length > 0) { - for (const src of tempObj) { - const date = src.mwb_week_date || src.w_study_date; - - const prevSrc = data.find((item) => item.mwb_week_date === date || item.w_study_date === date); - - if (prevSrc) { - Object.assign(prevSrc, src); - } - - if (!prevSrc) { - data.push(src); - } - } - } - } - } - } - - for (const src of data) { - if (src.mwb_week_date) { - src.week_date = src.mwb_week_date; - delete src.mwb_week_date; - } - - if (src.w_study_date) { - src.week_date = src.w_study_date; - delete src.w_study_date; - } - } - } - - if (issue && pub) { - const url = JW_CDN + new URLSearchParams({ langwritten: language, pub, output: 'json', issue }); - - const res = await fetch(url); - - if (res.status === 200) { - const result = await res.json(); - const hasEPUB = result.files[language].EPUB; - const issueFetch = { issueDate: issue, currentYear: +issue.substring(0, 4), language, hasEPUB: hasEPUB }; - - data = await fetchIssueData(issueFetch); - } - } - - return data; + let data = []; + + if (!issue && !pub) { + for await (const pub of ['mwb', 'w']) { + const issues = []; + + if (pub === 'mwb') { + let notFound = false; + + // get current issue + const today = new Date(); + const day = today.getDay(); + const diff = today.getDate() - day + (day === 0 ? -6 : 1); + const weekDate = new Date(today.setDate(diff)); + const validDate = weekDate.setMonth(weekDate.getMonth()); + + const startDate = new Date(validDate); + const currentMonth = startDate.getMonth() + 1; + const monthOdd = currentMonth % 2 === 0 ? false : true; + let monthMwb = monthOdd ? currentMonth : currentMonth - 1; + let currentYear = startDate.getFullYear(); + + do { + const issueDate = currentYear + String(monthMwb).padStart(2, '0'); + const url = + JW_CDN + + new URLSearchParams({ + langwritten: language, + pub, + output: 'json', + issue: issueDate, + }); + + const res = await fetch(url); + + if (res.status === 200) { + const result = await res.json(); + const hasEPUB = result.files[language].EPUB; + + issues.push({ issueDate, currentYear, language, hasEPUB: hasEPUB }); + } + + if (res.status === 404) { + notFound = true; + } + + // assigning next issue + monthMwb = monthMwb + 2; + if (monthMwb === 13) { + monthMwb = 1; + currentYear++; + } + } while (notFound === false); + } + + if (pub === 'w') { + let notFound = false; + + // get w current issue + const today = new Date(); + const url = `${WOL_E}/${today.getFullYear()}/${today.getMonth() + 1}/${today.getDate()}`; + + const res = await fetch(url); + const data = await res.json(); + + const wData = data.items.find((item: any) => item.classification === 68); + const publicationTitle = wData.publicationTitle; + + const findYear = /\b\d{4}\b/; + const array = findYear.exec(publicationTitle); + let currentYear = +array![0]; + + const monthsRegex = `(${months.join('|')})`; + + const regex = new RegExp(monthsRegex); + const array2 = regex.exec(publicationTitle); + + let monthW = months.findIndex((month) => month === array2![0]) + 1; + + do { + const issueDate = currentYear + String(monthW).padStart(2, '0'); + const url = + JW_CDN + + new URLSearchParams({ + langwritten: language, + pub, + output: 'json', + issue: issueDate, + }); + + console.log(url); + + const res = await fetch(url); + + if (res.status === 200) { + const result = await res.json(); + const hasEPUB = result.files[language].EPUB; + + issues.push({ issueDate, currentYear, language, hasEPUB: hasEPUB }); + } + + if (res.status === 404) { + notFound = true; + } + + // assigning next issue + monthW = monthW + 1; + if (monthW === 13) { + monthW = 1; + currentYear++; + } + } while (notFound === false); + } + + if (issues.length > 0) { + const fetchSource1 = fetchIssueData(issues[0]); + const fetchSource2 = issues.length > 1 ? fetchIssueData(issues[1]) : Promise.resolve([]); + const fetchSource3 = issues.length > 2 ? fetchIssueData(issues[2]) : Promise.resolve([]); + const fetchSource4 = issues.length > 3 ? fetchIssueData(issues[3]) : Promise.resolve([]); + const fetchSource5 = issues.length > 4 ? fetchIssueData(issues[4]) : Promise.resolve([]); + const fetchSource6 = issues.length > 5 ? fetchIssueData(issues[5]) : Promise.resolve([]); + const fetchSource7 = issues.length > 6 ? fetchIssueData(issues[6]) : Promise.resolve([]); + + const allData = await Promise.all([ + fetchSource1, + fetchSource2, + fetchSource3, + fetchSource4, + fetchSource5, + fetchSource6, + fetchSource7, + ]); + + for (let z = 0; z < allData.length; z++) { + const tempObj: any = allData[z]; + if (tempObj.length > 0) { + for (const src of tempObj) { + const date = src.mwb_week_date || src.w_study_date; + + const prevSrc = data.find((item) => item.mwb_week_date === date || item.w_study_date === date); + + if (prevSrc) { + Object.assign(prevSrc, src); + } + + if (!prevSrc) { + data.push(src); + } + } + } + } + } + } + + for (const src of data) { + if (src.mwb_week_date) { + src.week_date = src.mwb_week_date; + delete src.mwb_week_date; + } + + if (src.w_study_date) { + src.week_date = src.w_study_date; + delete src.w_study_date; + } + } + } + + if (issue && pub) { + const url = JW_CDN + new URLSearchParams({ langwritten: language, pub, output: 'json', issue }); + + const res = await fetch(url); + + if (res.status === 200) { + const result = await res.json(); + const hasEPUB = result.files[language].EPUB; + const issueFetch = { issueDate: issue, currentYear: +issue.substring(0, 4), language, hasEPUB: hasEPUB }; + + data = await fetchIssueData(issueFetch); + } + } + + return data; }; diff --git a/src/browser/utils.browser.ts b/src/browser/utils.browser.ts index 872943cd..fc524883 100644 --- a/src/browser/utils.browser.ts +++ b/src/browser/utils.browser.ts @@ -13,6 +13,7 @@ import M from '../locales/ro-RO/text.json'; import MG from '../locales/mg-MG/text.json'; import O from '../locales/nl-NL/text.json'; import P from '../locales/pl-PL/text.json'; +import PGW from '../locales/wes-PGW/text.json'; import S from '../locales/es-ES/text.json'; import T from '../locales/pt-BR/text.json'; import TG from '../locales/tl-PH/text.json'; @@ -34,6 +35,6 @@ declare global { } window.jw_epub_parser = { - languages: { CH, CHS, E, F, FI, I, J, K, KO, M, MG, O, P, S, T, TG, TK, TND, TNK, TPO, TTM, TW, U, VZ, X, Z }, + languages: { CH, CHS, E, F, FI, I, J, K, KO, M, MG, O, P, PGW, S, T, TG, TK, TND, TNK, TPO, TTM, TW, U, VZ, X, Z }, path: path, }; diff --git a/src/common/date_parser.ts b/src/common/date_parser.ts index 1f13e5fd..3d5f0772 100644 --- a/src/common/date_parser.ts +++ b/src/common/date_parser.ts @@ -73,6 +73,7 @@ const mwbDatePatterns: LangRegExp = { J: new RegExp(mwbDatePatternJ, 'giu'), KO: new RegExp(mwbDatePatternKO, 'giu'), P: new RegExp(mwbDatePatternP, 'giu'), + PGW: new RegExp(mwbDatePatternE, 'giu'), S: new RegExp(mwbDatePatternS, 'giu'), T: new RegExp(mwbDatePatternT, 'giu'), TG: new RegExp(mwbDatePatternE, 'giu'), @@ -125,6 +126,7 @@ const mwbDateParsing: MWBDateParsing = { E: mwbParsingE, J: mwbParsingE, KO: mwbParsingE, + PGW: mwbParsingE, TG: mwbParsingE, TW: mwbParsingE, }; @@ -177,7 +179,7 @@ option2 = `(\\d{1,2}) (${wordWithDiacritics})(?:${dateRangeSeparator})(?:\\d{1,2 option3 = `(\\d{1,2}) (${wordWithDiacritics})(?:,)? (\\d{4})`; const wDatePatternCommon = `${option1}|${option2}|${option3}`; -// date like 1-) December 16-22, 2024; or 2) December 30, 2024-January 5, 2024 +// date like 1-) December 16-22, 2024; or 2) December 30, 2024-January 5, 2025 option1 = `(${wordWithDiacritics}) (\\d{1,2})[-–](?:\\d{1,2})?, (\\d{4})`; option2 = `(${wordWithDiacritics}) (\\d{1,2}), (\\d{4})`; const wDatePatternE = `${option1}|${option2}`; @@ -246,6 +248,7 @@ const wDatePatterns: LangRegExp = { J: new RegExp(wDatePatternJ, 'giu'), KO: new RegExp(wDatePatternKO, 'giu'), P: new RegExp(wDatePatternP, 'giu'), + PGW: new RegExp(wDatePatternE, 'giu'), S: new RegExp(wDatePatternS, 'giu'), T: new RegExp(wDatePatternT, 'giu'), TPO: new RegExp(wDatePatternTPO, 'giu'), @@ -337,6 +340,7 @@ const wDateParsing: WDateParsing = { E: wParsingE, J: wParsingJ, KO: wParsingJ, + PGW: wParsingE, TG: wParsingE, TW: wParsingTW, }; diff --git a/src/common/parsing_rules.ts b/src/common/parsing_rules.ts index e37d5423..b975a0de 100644 --- a/src/common/parsing_rules.ts +++ b/src/common/parsing_rules.ts @@ -21,9 +21,10 @@ export const extractSourceEnhanced = (src: string, lang: string) => { // separate minutes from title const firstPatternCommon = new RegExp( - `(.+?)(?:: )?[((](\\d+)(?: | )?(?:${variations})[))](?: : | |. )?(.+?)?$`, + `(.+?)(?:: )?[((](\\d+)(?: | )?(?:${variations})[))]?(?: : | |. )?(.+?)?$`, 'giu' ); + const firstPatternTW = new RegExp(`(.+?)(?: )?\\(${variations}(?: )?(\\d+)\\)(?: )?(.+?)?$`, 'giu'); const firstPattern: LangRegExp = { diff --git a/src/locales/languages.ts b/src/locales/languages.ts index d4165738..94f8a9b6 100644 --- a/src/locales/languages.ts +++ b/src/locales/languages.ts @@ -25,4 +25,5 @@ export default [ { locale: 'fi-FI', code: 'FI' }, { locale: 'sv-SE', code: 'Z' }, { locale: 'nl-NL', code: 'O' }, + { locale: 'wes-PGW', code: 'PGW' }, ]; diff --git a/src/locales/wes-pgw/text.json b/src/locales/wes-pgw/text.json deleted file mode 100644 index bddd0e4f..00000000 --- a/src/locales/wes-pgw/text.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "januaryVariations": "January", - "februaryVariations": "February", - "marchVariations": "March", - "aprilVariations": "April", - "mayVariations": "May", - "juneVariations": "June", - "julyVariations": "July", - "augustVariations": "August", - "septemberVariations": "September", - "octoberVariations": "October", - "novemberVariations": "November", - "decemberVariations": "December", - "partMinutesSeparatorVariations": "min." -} diff --git a/src/node/utils.node.ts b/src/node/utils.node.ts index f702e705..eb2ffe29 100644 --- a/src/node/utils.node.ts +++ b/src/node/utils.node.ts @@ -14,6 +14,7 @@ import M from '../locales/ro-RO/text.json' assert { type: 'json' }; import MG from '../locales/mg-MG/text.json' assert { type: 'json' }; import O from '../locales/nl-NL/text.json' assert { type: 'json' }; import P from '../locales/pl-PL/text.json' assert { type: 'json' }; +import PGW from '../locales/wes-PGW/text.json' assert { type: 'json' }; import S from '../locales/es-ES/text.json' assert { type: 'json' }; import T from '../locales/pt-BR/text.json' assert { type: 'json' }; import TG from '../locales/tl-PH/text.json' assert { type: 'json' }; @@ -33,7 +34,7 @@ declare global { } global.jw_epub_parser = { - languages: { CH, CHS, E, F, FI, I, J, K, KO, M, MG, O, P, S, T, TG, TK, TND, TNK, TPO, TTM, TW, U, VZ, X, Z }, + languages: { CH, CHS, E, F, FI, I, J, K, KO, M, MG, O, P, PGW, S, T, TG, TK, TND, TNK, TPO, TTM, TW, U, VZ, X, Z }, path: path, readFile: readFile, }; diff --git a/test/enhancedParsing/list.json b/test/enhancedParsing/list.json index b0972124..646f9a0b 100644 --- a/test/enhancedParsing/list.json +++ b/test/enhancedParsing/list.json @@ -18,5 +18,6 @@ { "language": "U", "issue": "202411" }, { "language": "VZ", "issue": "202411" }, { "language": "X", "issue": "202411" }, - { "language": "O", "issue": "202411" } + { "language": "O", "issue": "202411" }, + { "language": "PGW", "issue": "202411" } ] diff --git a/test/fixtures/mwb_PGW_202411.js b/test/fixtures/mwb_PGW_202411.js new file mode 100644 index 00000000..638df712 --- /dev/null +++ b/test/fixtures/mwb_PGW_202411.js @@ -0,0 +1,308 @@ +export default [ + { + mwb_week_date: '2024/11/04', + mwb_week_date_locale: 'NOVEMBER 4-10', + mwb_weekly_bible_reading: 'PSALM 105', + mwb_song_first: 3, + mwb_tgw_talk: '“E De Remember Im Agreement Forever”', + mwb_tgw_talk_title: '1. “E De Remember Im Agreement Forever”', + mwb_tgw_gems_title: '2. Fine-Fine Things Wey You See for Bible', + mwb_tgw_bread: 'Ps 105:​24-45 (th study 5)', + mwb_tgw_bread_title: '3. Bible Reading', + mwb_ayf_count: 4, + mwb_ayf_part1: 'HOUSE TO HOUSE. The householder dey busy. (lmd lesson 2 point 5)', + mwb_ayf_part1_time: 1, + mwb_ayf_part1_type: 'When You De Start Discussion', + mwb_ayf_part1_title: '4. When You De Start Discussion', + mwb_ayf_part2: + 'HOUSE TO HOUSE. End the discussion for better way when the person start to de argue. (lmd lesson 4 point 5)', + mwb_ayf_part2_time: 2, + mwb_ayf_part2_type: 'When You De Start Discussion', + mwb_ayf_part2_title: '5. When You De Start Discussion', + mwb_ayf_part3: + 'HOUSE TO HOUSE. The person don first show say e like one topic, give the person magazine wey talk about that topic. (lmd lesson 8 point 3)', + mwb_ayf_part3_time: 4, + mwb_ayf_part3_type: 'When You De Check the Person Again', + mwb_ayf_part3_title: '6. When You De Check the Person Again', + mwb_ayf_part4: + 'INFORMAL WITNESSING. Tell the person about the JW Library® app, and help-am download-am. (lmd lesson 9 point 5)', + mwb_ayf_part4_time: 4, + mwb_ayf_part4_type: 'When You De Check the Person Again', + mwb_ayf_part4_title: '7. When You De Check the Person Again', + mwb_song_middle: 84, + mwb_lc_count: 1, + mwb_lc_part1: 'Things Wey De Show Say You Get Love', + mwb_lc_part1_time: 15, + mwb_lc_part1_title: '8. Things Wey De Show Say You Get Love', + mwb_lc_part1_content: 'Make una discuss-am together.', + mwb_lc_cbs: 'bt chap. 17 ¶13-19', + mwb_lc_cbs_title: '9. Congregation Bible Study', + mwb_song_conclude: 97, + }, + { + mwb_week_date: '2024/11/11', + mwb_week_date_locale: 'NOVEMBER 11-17', + mwb_weekly_bible_reading: 'PSALM 106', + mwb_song_first: 36, + mwb_tgw_talk: '“Them Forget God Wey De Save Them”', + mwb_tgw_talk_title: '1. “Them Forget God Wey De Save Them”', + mwb_tgw_gems_title: '2. Fine-Fine Things Wey You See for Bible', + mwb_tgw_bread: 'Ps 106:​21-48 (th study 10)', + mwb_tgw_bread_title: '3. Bible Reading', + mwb_ayf_count: 2, + mwb_ayf_part1: 'Make una discuss-am together. Play the VIDEO, and after, make una discuss lmd lesson 11 point 1-2.', + mwb_ayf_part1_time: 7, + mwb_ayf_part1_type: 'Teach for Simple Way—The Thing Wey Jesus Do', + mwb_ayf_part1_title: '4. Teach for Simple Way—The Thing Wey Jesus Do', + mwb_ayf_part2: + 'Make una discuss-am together as e dey for lmd lesson 11 point 3-5 and the part wey be “Still Check.”', + mwb_ayf_part2_time: 8, + mwb_ayf_part2_type: 'Teach for Simple Way—Copy Jesus', + mwb_ayf_part2_title: '5. Teach for Simple Way—Copy Jesus', + mwb_song_middle: 78, + mwb_lc_count: 1, + mwb_lc_part1: 'Local Need', + mwb_lc_part1_time: 15, + mwb_lc_part1_title: '6. Local Need', + mwb_lc_cbs: 'bt chap. 18 ¶1-5, box for pp. 142, 144', + mwb_lc_cbs_title: '7. Congregation Bible Study', + mwb_song_conclude: 77, + }, + { + mwb_week_date: '2024/11/18', + mwb_week_date_locale: 'NOVEMBER 18-24', + mwb_weekly_bible_reading: 'PSALMS 107-108', + mwb_song_first: 7, + mwb_tgw_talk: '“De Thank Jehovah, Because E Dey Good”', + mwb_tgw_talk_title: '1. “De Thank Jehovah, Because E Dey Good”', + mwb_tgw_gems_title: '2. Fine-Fine Things Wey You See for Bible', + mwb_tgw_bread: 'Ps 107:​1-28 (th study 5)', + mwb_tgw_bread_title: '3. Bible Reading', + mwb_ayf_count: 3, + mwb_ayf_part1: 'INFORMAL WITNESSING. (lmd lesson 1 point 4)', + mwb_ayf_part1_time: 3, + mwb_ayf_part1_type: 'When You De Start Discussion', + mwb_ayf_part1_title: '4. When You De Start Discussion', + mwb_ayf_part2: + 'INFORMAL WITNESSING. Tell the person about our Bible study program, and give-am Bible study contact card. (lmd lesson 9 point 3)', + mwb_ayf_part2_time: 4, + mwb_ayf_part2_type: 'When You De Check the Person Again', + mwb_ayf_part2_title: '5. When You De Check the Person Again', + mwb_ayf_part3: 'ijwyp 90—Topic: How I Fit Run From Bad Thinking? (th study 14)', + mwb_ayf_part3_time: 5, + mwb_ayf_part3_type: 'Talk', + mwb_ayf_part3_title: '6. Talk', + mwb_song_middle: 46, + mwb_lc_count: 1, + mwb_lc_part1: 'We De Sing to Thank Jehovah', + mwb_lc_part1_time: 15, + mwb_lc_part1_title: '7. We De Sing to Thank Jehovah', + mwb_lc_part1_content: 'Make una discuss-am together.', + mwb_lc_cbs: 'bt chap. 18 ¶6-15', + mwb_lc_cbs_title: '8. Congregation Bible Study', + mwb_song_conclude: 73, + }, + { + mwb_week_date: '2024/11/25', + mwb_week_date_locale: 'NOVEMBER 25–DECEMBER 1', + mwb_weekly_bible_reading: 'PSALMS 109-112', + mwb_song_first: 14, + mwb_tgw_talk: 'Support Jesus Wey Be the King!', + mwb_tgw_talk_title: '1. Support Jesus Wey Be the King!', + mwb_tgw_gems_title: '2. Fine-Fine Things Wey You See for Bible', + mwb_tgw_bread: 'Ps 109:​1-26 (th study 2)', + mwb_tgw_bread_title: '3. Bible Reading', + mwb_ayf_count: 3, + mwb_ayf_part1: 'HOUSE TO HOUSE. Use one tract start discussion. (lmd lesson 4 point 3)', + mwb_ayf_part1_time: 2, + mwb_ayf_part1_type: 'When You De Start Discussion', + mwb_ayf_part1_title: '4. When You De Start Discussion', + mwb_ayf_part2: 'Demonstration. ijwfq 23—Topic: Why Jehovah Witness People No De Go War? (lmd lesson 4 point 4)', + mwb_ayf_part2_time: 5, + mwb_ayf_part2_type: 'Explain Wetin You Believe', + mwb_ayf_part2_title: '5. Explain Wetin You Believe', + mwb_ayf_part3: 'lff lesson 15 point 6 and the part wey be Some People De Talk Say (lmd lesson 11 point 3)', + mwb_ayf_part3_time: 5, + mwb_ayf_part3_type: 'When You De Make Disciples', + mwb_ayf_part3_title: '6. When You De Make Disciples', + mwb_song_middle: 72, + mwb_lc_count: 1, + mwb_lc_part1: 'How We Fit Continue to De Support the Kingdom?', + mwb_lc_part1_time: 15, + mwb_lc_part1_title: '7. How We Fit Continue to De Support the Kingdom?', + mwb_lc_part1_content: 'Make una discuss-am together.', + mwb_lc_cbs: 'bt chap. 18 ¶16-24', + mwb_lc_cbs_title: '8. Congregation Bible Study', + mwb_song_conclude: 75, + }, + { + mwb_week_date: '2024/12/02', + mwb_week_date_locale: 'DECEMBER 2-8', + mwb_weekly_bible_reading: 'PSALMS 113-118', + mwb_song_first: 127, + mwb_tgw_talk: 'Wetin We Go Take Pay Jehovah Back?', + mwb_tgw_talk_title: '1. Wetin We Go Take Pay Jehovah Back?', + mwb_tgw_gems_title: '2. Fine-Fine Things Wey You See for Bible', + mwb_tgw_bread: 'Ps 116:1–117:2 (th study 2)', + mwb_tgw_bread_title: '3. Bible Reading', + mwb_ayf_count: 2, + mwb_ayf_part1: 'Make una discuss-am together. Play the VIDEO, and after, make una discuss lmd lesson 12 point 1-2.', + mwb_ayf_part1_time: 7, + mwb_ayf_part1_type: 'Get Strong Heart—The Thing Wey Jesus Do', + mwb_ayf_part1_title: '4. Get Strong Heart—The Thing Wey Jesus Do', + mwb_ayf_part2: + 'Make una discuss-am together as e dey for lmd lesson 12 point 3-5 and the part wey be “Still Check.”', + mwb_ayf_part2_time: 8, + mwb_ayf_part2_type: 'Get Strong Heart—Copy Jesus', + mwb_ayf_part2_title: '5. Get Strong Heart—Copy Jesus', + mwb_song_middle: 60, + mwb_lc_count: 1, + mwb_lc_part1: 'Local Need', + mwb_lc_part1_time: 15, + mwb_lc_part1_title: '6. Local Need', + mwb_lc_cbs: 'bt chap. 19 ¶1-5, box for pp. 149-150', + mwb_lc_cbs_title: '7. Congregation Bible Study', + mwb_song_conclude: 29, + }, + { + mwb_week_date: '2024/12/09', + mwb_week_date_locale: 'DECEMBER 9-15', + mwb_weekly_bible_reading: 'PSALM 119:​1-56', + mwb_song_first: 124, + mwb_tgw_talk: '“How Young Man Fit Keep E Way Clean?”', + mwb_tgw_talk_title: '1. “How Young Man Fit Keep E Way Clean?”', + mwb_tgw_gems_title: '2. Fine-Fine Things Wey You See for Bible', + mwb_tgw_bread: 'Ps 119:​1-32 (th study 5)', + mwb_tgw_bread_title: '3. Bible Reading', + mwb_ayf_count: 3, + mwb_ayf_part1: + 'INFORMAL WITNESSING. Start discussion with person wey you meet for street as you de waka for house-to-house preaching. (lmd lesson 1 point 4)', + mwb_ayf_part1_time: 3, + mwb_ayf_part1_type: 'When You De Start Discussion', + mwb_ayf_part1_title: '4. When You De Start Discussion', + mwb_ayf_part2: + 'HOUSE TO HOUSE. For the last discussion, the person tell you say im person wey e love just die. (lmd lesson 9 point 3)', + mwb_ayf_part2_time: 4, + mwb_ayf_part2_type: 'When You De Check the Person Again', + mwb_ayf_part2_title: '5. When You De Check the Person Again', + mwb_ayf_part3: 'ijwyp 83—Topic: How I Fit Run From Temptation? (th study 20)', + mwb_ayf_part3_time: 5, + mwb_ayf_part3_type: 'Talk', + mwb_ayf_part3_title: '6. Talk', + mwb_song_middle: 40, + mwb_lc_count: 2, + mwb_lc_part1: 'Things Wey Our Organization Don Do, the one for December', + mwb_lc_part1_time: 10, + mwb_lc_part1_title: '7. Things Wey Our Organization Don Do, the one for December', + mwb_lc_part1_content: 'Play the VIDEO.', + mwb_lc_part2: 'Local Need', + mwb_lc_part2_time: 5, + mwb_lc_part2_title: '8. Local Need', + mwb_lc_cbs: 'bt chap. 19 ¶6-13', + mwb_lc_cbs_title: '9. Congregation Bible Study', + mwb_song_conclude: 21, + }, + { + mwb_week_date: '2024/12/16', + mwb_week_date_locale: 'DECEMBER 16-22', + mwb_weekly_bible_reading: 'PSALM 119:​57-120', + mwb_song_first: 129, + mwb_tgw_talk: 'How to Endure When People De Against Us', + mwb_tgw_talk_title: '1. How to Endure When People De Against Us', + mwb_tgw_gems_title: '2. Fine-Fine Things Wey You See for Bible', + mwb_tgw_bread: 'Ps 119:​57-80 (th study 12)', + mwb_tgw_bread_title: '3. Bible Reading', + mwb_ayf_count: 3, + mwb_ayf_part1: + 'HOUSE TO HOUSE. Show the householder our website, and give-am jw.org contact card. (lmd lesson 2 point 5)', + mwb_ayf_part1_time: 3, + mwb_ayf_part1_type: 'When You De Start Discussion', + mwb_ayf_part1_title: '4. When You De Start Discussion', + mwb_ayf_part2: + 'INFORMAL WITNESSING. Invite the person come the next public talk. Show-am the video Wetin De Happen for Kingdom Hall? (lmd lesson 8 point 3)', + mwb_ayf_part2_time: 4, + mwb_ayf_part2_type: 'When You De Check the Person Again', + mwb_ayf_part2_title: '5. When You De Check the Person Again', + mwb_ayf_part3: 'Demonstration. ijwbq 157—Topic: Wetin Bible Talk About Natural Disasters? (lmd lesson 3 point 3)', + mwb_ayf_part3_time: 5, + mwb_ayf_part3_type: 'Explain Wetin You Believe', + mwb_ayf_part3_title: '6. Explain Wetin You Believe', + mwb_song_middle: 128, + mwb_lc_count: 1, + mwb_lc_part1: 'Jehovah De Help Us Endure', + mwb_lc_part1_time: 15, + mwb_lc_part1_title: '7. Jehovah De Help Us Endure', + mwb_lc_part1_content: 'Make una discuss-am together.', + mwb_lc_cbs: 'bt chap. 19 ¶14-20, box for p. 152', + mwb_lc_cbs_title: '8. Congregation Bible Study', + mwb_song_conclude: 32, + }, + { + mwb_week_date: '2024/12/23', + mwb_week_date_locale: 'DECEMBER 23-29', + mwb_weekly_bible_reading: 'PSALM 119:​121-176', + mwb_song_first: 31, + mwb_tgw_talk: 'How We Fit Run From Problem Wey Fit Make Us Sad', + mwb_tgw_talk_title: '1. How We Fit Run From Problem Wey Fit Make Us Sad', + mwb_tgw_gems_title: '2. Fine-Fine Things Wey You See for Bible', + mwb_tgw_bread: 'Ps 119:​121-152 (th study 2)', + mwb_tgw_bread_title: '3. Bible Reading', + mwb_ayf_count: 3, + mwb_ayf_part1: 'HOUSE TO HOUSE. (lmd lesson 1 point 5)', + mwb_ayf_part1_time: 3, + mwb_ayf_part1_type: 'When You De Start Discussion', + mwb_ayf_part1_title: '4. When You De Start Discussion', + mwb_ayf_part2: + 'HOUSE TO HOUSE. Show person how to find information wey e fit like for jw.org. (lmd lesson 8 point 3)', + mwb_ayf_part2_time: 4, + mwb_ayf_part2_type: 'When You De Check the Person Again', + mwb_ayf_part2_title: '5. When You De Check the Person Again', + mwb_ayf_part3: 'Discussion with Bible student wey no de come meeting everytime. (lmd lesson 12 point 4)', + mwb_ayf_part3_time: 5, + mwb_ayf_part3_type: 'When You De Make Disciples', + mwb_ayf_part3_title: '6. When You De Make Disciples', + mwb_song_middle: 121, + mwb_lc_count: 1, + mwb_lc_part1: 'No Let Money Cause You Pain Wey You No Suppose Get', + mwb_lc_part1_time: 15, + mwb_lc_part1_title: '7. No Let Money Cause You Pain Wey You No Suppose Get', + mwb_lc_part1_content: 'Make una discuss-am together.', + mwb_lc_cbs: 'bt chap. 20 ¶1-7, and introduction to part 7', + mwb_lc_cbs_title: '8. Congregation Bible Study', + mwb_song_conclude: 101, + }, + { + mwb_week_date: '2024/12/30', + mwb_week_date_locale: 'DECEMBER 30, 2024–JANUARY 5, 2025', + mwb_weekly_bible_reading: 'PSALMS 120-126', + mwb_song_first: 144, + mwb_tgw_talk: 'Them Plant With Tears, But Really Happy When Them De Harvest', + mwb_tgw_talk_title: '1. Them Plant With Tears, But Really Happy When Them De Harvest', + mwb_tgw_gems_title: '2. Fine-Fine Things Wey You See for Bible', + mwb_tgw_bread: 'Ps 124:1–126:6 (th study 5)', + mwb_tgw_bread_title: '3. Bible Reading', + mwb_ayf_count: 3, + mwb_ayf_part1: 'PUBLIC WITNESSING. (lmd lesson 3 point 5)', + mwb_ayf_part1_time: 3, + mwb_ayf_part1_type: 'When You De Start Discussion', + mwb_ayf_part1_title: '4. When You De Start Discussion', + mwb_ayf_part2: + 'HOUSE TO HOUSE. For the last visit, the person show say e no dey sure whether we fit believe the things wey Bible talk. (lmd lesson 9 point 5)', + mwb_ayf_part2_time: 4, + mwb_ayf_part2_type: 'When You De Check the Person Again', + mwb_ayf_part2_title: '5. When You De Check the Person Again', + mwb_ayf_part3: 'lff lesson 16 introduction and point 1-3 (lmd lesson 11 point 3)', + mwb_ayf_part3_time: 5, + mwb_ayf_part3_type: 'When You De Make Disciples', + mwb_ayf_part3_title: '6. When You De Make Disciples', + mwb_song_middle: 155, + mwb_lc_count: 1, + mwb_lc_part1: 'De Happy for God Promise', + mwb_lc_part1_time: 15, + mwb_lc_part1_title: '7. De Happy for God Promise', + mwb_lc_part1_content: 'Make una discuss-am together.', + mwb_lc_cbs: 'bt chap. 20 ¶8-12, box for p. 161', + mwb_lc_cbs_title: '8. Congregation Bible Study', + mwb_song_conclude: 58, + }, +]; diff --git a/test/fixtures/w_PGW_202411.js b/test/fixtures/w_PGW_202411.js new file mode 100644 index 00000000..aa858e90 --- /dev/null +++ b/test/fixtures/w_PGW_202411.js @@ -0,0 +1,30 @@ +export default [ + { + w_study_date: '2025/01/06', + w_study_date_locale: 'Study Article 44: January 6-12, 2025', + w_study_title: 'Wetin We Fit Do When People No Treat Us Well?', + w_study_opening_song: 33, + w_study_concluding_song: 38, + }, + { + w_study_date: '2025/01/13', + w_study_date_locale: 'Study Article 45: January 13-19, 2025', + w_study_title: 'Wetin We Fit Learn From the Words Wey Some Servants of Jehovah Talk Before Them Die?', + w_study_opening_song: 138, + w_study_concluding_song: 129, + }, + { + w_study_date: '2025/01/20', + w_study_date_locale: 'Study Article 46: January 20-26, 2025', + w_study_title: 'Brothers, Una De Work Hard to Fit Become Ministerial Servants?', + w_study_opening_song: 49, + w_study_concluding_song: 17, + }, + { + w_study_date: '2025/01/27', + w_study_date_locale: 'Study Article 47: January 27, 2025–February 2, 2025', + w_study_title: 'Brothers, Una De Work Hard to Fit Become Elders?', + w_study_opening_song: 103, + w_study_concluding_song: 101, + }, +]; diff --git a/test/fixtures/w_Z_202411js b/test/fixtures/w_Z_202411.js similarity index 100% rename from test/fixtures/w_Z_202411js rename to test/fixtures/w_Z_202411.js