🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

jw-epub-parser

Package Overview
Dependencies
Maintainers
2
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jw-epub-parser

This tool will help you to parse and extract the needed source materials from Meeting Workbook EPUB file. Support for parsing Watchtower Study will be added in future release.

3.37.1
latest
Source
npm
Version published
Maintainers
2
Created
Source

JW EPUB Parser

CI CD semantic-release: angular jw-epub-parser Quality Gate Status Code Smells Maintainability Rating Security Rating Bugs Vulnerabilities

epub-badge@3x

An EPUB Parser to extract the needed source materials from Meeting Workbook and Watchtower Study EPUB files.

Install

npm i jw-epub-parser

Usage

// browser
import { loadEPUB } from 'jw-epub-parser';

// node esm
import { loadEPUB } from 'jw-epub-parser/dist/node/index.js';

// node commonjs
const { loadEPUB } = require('jw-epub-parser/node/index.cjs');

// sample usage
const epubJW = await loadEPUB('/path/to/file.epub');

const epubJW = await loadEPUB({ url: epubUrl });

loadEPUB(epubData)

function: asynchronous

epubData

type: string or blob or url

It can be the path to the EPUB file or EPUB file's blob or url to download the EPUB file.

Return

By calling the loadEPUB function, it will return an array of objects with the following properties:

Meeting Workbook Data

NameTypeDescription
mwb_week_datestringWeek date. For enhanced parsing, it is formatted as yyyy/mm/dd
mwb_week_date_locale*stringWeek date
mwb_weekly_bible_readingstringWeekly Bible Reading
mwb_song_firstintegerFirst song
mwb_tgw_talkstring10 min talk title of the Treasures from God’s Word
mwb_tgw_talk_title*string10 min talk full title of the Treasures from God’s Word
mwb_tgw_gems_titlestringSpiritual gems full title of the Treasures from God’s Word
mwb_tgw_breadstringBible Reading for student
mwb_tgw_bread_title*stringBible Reading assignment full title for student
mwb_ayf_countintegerNumber of parts in Apply Yourself to the Field Ministry
mwb_ayf_part1stringPart 1 in Apply Yourself to the Field Ministry
mwb_ayf_part1_time*integerTiming of Part 1 in Apply Yourself to the Field Ministry
mwb_ayf_part1_type*stringType of Part 1 in Apply Yourself to the Field Ministry
mwb_ayf_part1_title*stringAssignment full title of Part 1 in Apply Yourself to the Field Ministry
mwb_ayf_part2stringPart 2 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is 1
mwb_ayf_part2_time*integerTiming of Part 2 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is 1
mwb_ayf_part2_type*stringType of Part 2 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is 1
mwb_ayf_part2_title*stringAssignment full title of Part 2 in Apply Yourself to the Field Ministry
mwb_ayf_part3stringPart 3 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is less than 3
mwb_ayf_part3_time*integerTiming of Part 3 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is less than 3
mwb_ayf_part3_type*stringType of Part 3 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is less than 3
mwb_ayf_part3_title*stringAssignment full title of Part 3 in Apply Yourself to the Field Ministry
mwb_ayf_part4stringPart 4 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is less than 4
mwb_ayf_part4_time*integerTiming of Part 4 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is less than 4
mwb_ayf_part4_type*stringType of Part 4 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is less than 4
mwb_ayf_part4_title*stringAssignment full title of Part 4 in Apply Yourself to the Field Ministry
mwb_song_middleintegerMiddle song
mwb_lc_countintegerNumber of parts in Living as Christians
mwb_lc_part1stringPart 1 in Living as Christians
mwb_lc_part1_time*integerTiming of Part 1 in Living as Christians
mwb_lc_part1_content*stringContent of Part 1 in Living as Christians
mwb_lc_part1_title*stringFull title of Part 1 in Living as Christians
mwb_lc_part2stringPart 2 in Living as Christians. This property will not be available if mwb_lc_count is 1
mwb_lc_part2_time*integerTiming of Part 2 in Living as Christians. This property will not be available if mwb_lc_count is 1
mwb_lc_part2_content*stringContent of Part 2 in Living as Christians. This property will not be available if mwb_lc_count is 1
mwb_lc_part2_title*stringFull title of Part 2 in Living as Christians
mwb_lc_cbsstringCongregation Bible Study source material
mwb_lc_cbs_title*stringCongregation Bible Study assignment full title
mwb_song_concludeinteger or stringConcluding song. When the song number is out of range, it will be the default text from the Meeting Workbook.

Watchtowet Study Data

NameTypeDescription
w_study_datestringWeek date. For enhanced parsing, it is formatted as yyyy/mm/dd
w_study_date_locale*stringWeek date
w_study_titlestringWatchtower Study Article Title
w_study_opening_songintegerOpening Song for the Watchtower Study
w_study_concluding_songintegerConcluding Song for the Watchtower Study

* These properties are only available when enhanced parsing is available for the language you parse.

Currently, we only support enhanced parsing for the following languages:

Chinese Mandarin (Simplified), Chinese Mandarin (Traditional)
Dutch
English
French
German
Haitian Creole
Iloko, Italian
Japanese
Kinyarwanda, Korean
Liberian English
Malagasy, Malay
Pidgin (West Africa), Polish, Portuguese Brazil
Romanian, Russian
Slovenian, Spanish, Swahili, Swedish
Tagalog, Tandroy, Tankarana, Turkish, Twin
Ukrainian
Vietnamese, Vezo

For the other languages, you may use your own method to convert these outputs according to your needs to get the needed informations. If you want to contribute and add your language in the enhanced parsing list, or edit your language rules, please follow this guide.

Sample Output

Here are how the results of this module look like:

With enhanced parsing

Meeting Workbook Data

[
  {
    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: '“He Remembers His Covenant Forever”',
    mwb_tgw_talk_title: '1. “He Remembers His Covenant Forever”',
    mwb_tgw_gems_title: '2. Spiritual Gems',
    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 is busy. (lmd lesson 2 point 5)',
    mwb_ayf_part1_time: 1,
    mwb_ayf_part1_type: 'Starting a Conversation',
    mwb_ayf_part1_title: '4. Starting a Conversation',
    mwb_ayf_part2: 'HOUSE TO HOUSE. End the conversation on a positive note when the person begins to argue. (lmd lesson 4 point 5)',
    mwb_ayf_part2_time: 2,
    mwb_ayf_part2_type: 'Starting a Conversation',
    mwb_ayf_part2_title: '5. Starting a Conversation',
    mwb_ayf_part3: 'HOUSE TO HOUSE. Offer a magazine on a topic that the person previously showed interest in. (lmd lesson 8 point 3)',
    mwb_ayf_part3_time: 4,
    mwb_ayf_part3_type: 'Following Up',
    mwb_ayf_part3_title: '6. Following Up',
    mwb_ayf_part4: 'INFORMAL WITNESSING. Tell the person about the JW Library® app, and help him download it. (lmd lesson 9 point 5)',
    mwb_ayf_part4_time: 4,
    mwb_ayf_part4_type: 'Following Up',
    mwb_ayf_part4_title: '7. Following Up',
    mwb_song_middle: 84,
    mwb_lc_count: 1,
    mwb_lc_part1: 'Expressions of Your Love',
    mwb_lc_part1_time: 15,
    mwb_lc_part1_title: '8. Expressions of Your Love',
    mwb_lc_part1_content: 'Discussion.',
    mwb_lc_cbs: 'bt chap. 17 ¶13-19',
    mwb_lc_cbs_title: '9. Congregation Bible Study',
    mwb_song_conclude: 97,
  },
	...
]

Watchtower Study Data

[
  {
    w_study_date: '2025/01/06',
	  w_study_date_locale: 'Study Article 44: January 6-12, 2025',
	  w_study_title: 'How to Cope With Injustice',
	  w_study_opening_song: 33,
	  w_study_concluding_song: 38
  },
	...
]

Without enhanced parsing

Meeting Workbook Data

[
  {
    mwb_week_date: '4.-10. NOVEMBER',
    mwb_weekly_bible_reading: 'SALME 105',
    mwb_song_first: 3,
    mwb_tgw_talk: '1. “Han husker for evigt sin pagt” (10 min.)',
    mwb_tgw_gems_title: '2. Åndelige perler (10 min.)',
    mwb_tgw_bread: '3. Oplæsning fra Bibelen (4 min.) Sl 105:24-45 (th arbejdspunkt 5)',
    mwb_ayf_count: 4,
    mwb_ayf_part1: '4. Start en samtale (1 min.) FRA HUS TIL HUS. Den besøgte har travlt. (lmd lektion 2 punkt 5)',
    mwb_ayf_part2: '5. Start en samtale (2 min.) FRA HUS TIL HUS. Du afslutter samtalen på en venlig måde da den besøgte vil diskutere. (lmd lektion 4 punkt 5)',
    mwb_ayf_part3: '6. Følg op på interessen (4 min.) FRA HUS TIL HUS. Tilbyd et blad om noget som den besøgte tidligere har udtrykt interesse for. (lmd lektion 8 punkt 3)',
    mwb_ayf_part4: '7. Følg op på interessen (4 min.) UFORMEL FORKYNDELSE. Fortæl personen om JW Library®-appen, og hjælp ham eller hende med at downloade den. (lmd lektion 9 punkt 5)',
    mwb_song_middle: 84,
    mwb_lc_count: 1,
    mwb_lc_part1: '8. Hvordan vi kan vise vores kærlighed (15 min.) Drøftelse.',
    mwb_lc_cbs: '9. Menighedsbibelstudiet (30 min.) bt kap. 17 § 13-19',
    mwb_song_conclude: 97,
  },
	...
]

Watchtower Study Data

[
  {
    w_study_date: 'Studieartikel 44, 6.-12. januar 2025',
    w_study_title: 'Hvordan du kan tackle uretfærdighed',
    w_study_opening_song: 33,
    w_study_concluding_song: 38
  },
	...
]

Keywords

epub parse

FAQs

Package last updated on 10 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts