npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jw-epub-parser

v3.14.0

Published

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.

Downloads

1,609

Readme

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/dist/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

| Name | Type | Description | | ------------------------ | :---------------: | ------------------------------------------------------------------------------------------------------------------------------- | | mwb_week_date | string | Week date. For enhanced parsing, it is formatted as yyyy/mm/dd | | mwb_week_date_locale* | string | Week date | | mwb_weekly_bible_reading | string | Weekly Bible Reading | | mwb_song_first | integer | First song | | mwb_tgw_talk | string | 10 min talk title of the Treasures from God’s Word | | mwb_tgw_bread | string | Bible Reading for student | | mwb_ayf_count | integer | Number of parts in Apply Yourself to the Field Ministry | | mwb_ayf_part1 | string | Part 1 in Apply Yourself to the Field Ministry | | mwb_ayf_part1_time* | integer | Timing of Part 1 in Apply Yourself to the Field Ministry | | mwb_ayf_part1_type* | string | Type of Part 1 in Apply Yourself to the Field Ministry | | mwb_ayf_part2 | string | Part 2 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is 1 | | mwb_ayf_part2_time* | integer | Timing 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* | string | Type of Part 2 in Apply Yourself to the Field Ministry. This property will not be available if mwb_ayf_count is 1 | | mwb_ayf_part3 | string | 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_time* | integer | Timing 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* | string | Type 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_part4 | string | 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_time* | integer | Timing 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* | string | Type 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_song_middle | integer | Middle song | | mwb_lc_count | integer | Number of parts in Living as Christians | | mwb_lc_part1 | string | Part 1 in Living as Christians | | mwb_lc_part1_time* | integer | Timing of Part 1 in Living as Christians | | mwb_lc_part1_content* | string | Content of Part 1 in Living as Christians | | mwb_lc_part2 | string | Part 2 in Living as Christians. This property will not be available if mwb_lc_count is 1 | | mwb_lc_part2_time* | integer | Timing of Part 2 in Living as Christians. This property will not be available if mwb_lc_count is 1 | | mwb_lc_part2_content* | string | Content of Part 2 in Living as Christians. This property will not be available if mwb_lc_count is 1 | | mwb_lc_cbs | string | Congregation Bible Study source material | | mwb_song_conclude | integer or string | Concluding song. When the song number is out of range, it will be the default text from the Meeting Workbook. |

Watchtowet Study Data

| Name | Type | Description | | ----------------------- | :-----: | ---------------------------------------------------------------- | | w_study_date | string | Week date. For enhanced parsing, it is formatted as yyyy/mm/dd | | w_study_date_locale* | string | Week date | | w_study_title | string | Watchtower Study Article Title | | w_study_opening_song | integer | Opening Song for the Watchtower Study | | w_study_concluding_song | integer | Concluding 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:

Enlish
French
German
Italian
Japanese
Madagascar Sign Language, Malagasy
Polish, Portuguese Brazil
Romanian, Russian
Spanish
Tagalog, Tandroy, Tankarana, Turkish, Twin
Ukrainian
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: '2023/09/04',
    mwb_week_date_locale: 'September 4-10',
    mwb_weekly_bible_reading: 'ESTHER 1-2',
    mwb_song_first: 137,
    mwb_tgw_talk: '“Strive to Be Modest Like Esther”',
    mwb_tgw_bread: 'Es 1:13-22 (th study 10)',
    mwb_ayf_count: 3,
    mwb_ayf_part1:
      'Discussion. Play the video Initial Call: Kingdom​—Mt 6:9, 10. Stop the video at each pause, and ask the audience the questions that appear in the video.',
    mwb_ayf_part1_time: 5,
    mwb_ayf_part1_type: 'Initial Call Video',
    mwb_ayf_part2: 'Begin with the sample conversation topic. Offer the Enjoy Life Forever! brochure. (th study 1)',
    mwb_ayf_part2_time: 3,
    mwb_ayf_part2_type: 'Initial Call',
    mwb_ayf_part3: 'w20.11 12-14 ¶3-7​—Theme: Help From Jesus and the Angels. (th study 14)',
    mwb_ayf_part3_time: 5,
    mwb_ayf_part3_type: 'Talk',
    mwb_song_middle: 106,
    mwb_lc_count: 2,
    mwb_lc_part1: 'What Your Peers Say​—Body Image',
    mwb_lc_part1_time: 5,
    mwb_lc_part1_content:
      'Discussion. Play the video. Then ask the audience: Why can it be difficult to have a balanced view of our appearance?',
    mwb_lc_part2: 'Organizational Accomplishments',
    mwb_lc_part2_time: 10,
    mwb_lc_part2_content: 'Play the Organizational Accomplishments video for September.',
    mwb_lc_cbs: 'lff lesson 56 and endnotes 6 and 7',
    mwb_song_conclude: 101,
  },
	...
]

Watchtower Study Data

[
  {
    w_study_date: '2023/11/06',
    w_study_date_locale: 'Study Article 37: November 6-12, 2023',
    w_study_title: 'Rely on Jehovah, as Samson Did',
    w_study_opening_song: 30,
    w_study_concluding_song: 3,
  },
	...
]

Without enhanced parsing

Meeting Workbook Data

[
  {
    mwb_week_date: '4-10 de septiembre',
    mwb_weekly_bible_reading: 'ESTER 1, 2',
    mwb_song_first: 137,
    mwb_tgw_talk: '“Esfuércese por ser modesto como Ester” (10 mins.)',
    mwb_tgw_bread: 'Lectura de la Biblia (4 mins.): Est 1:13-22 (th lec. 10).',
    mwb_ayf_count: 3,
    mwb_ayf_part1:
      'Video de la primera conversación (5 mins.): Análisis con el auditorio. Ponga el video Primera conversación: El Reino (Mt 6:9, 10). Detenga el video en cada pausa y haga las preguntas que aparecen en él.',
    mwb_ayf_part2:
      'Primera conversación (3 mins.): Use el tema de las ideas para conversar. Luego ofrezca el folleto Disfrute de la vida (th lec. 1).',
    mwb_ayf_part3: 'Discurso (5 mins.): w20.11 12-14 párrs. 3-7. Título: Jesús y los ángeles nos ayudan (th lec. 14).',
    mwb_song_middle: 106,
    mwb_lc_count: 2,
    mwb_lc_part1:
      'Lo que opinan otros jóvenes: La apariencia (5 mins.): Análisis con el auditorio. Ponga el video. Luego pregunte: ¿por qué puede ser difícil mantener una actitud equilibrada sobre nuestra apariencia física?',
    mwb_lc_part2:
      'Logros de la organización (10 mins.): Ponga el video Logros de la organización para el mes de septiembre.',
    mwb_lc_cbs: 'Estudio bíblico de la congregación (30 mins.): lff lección 56 y notas 6 y 7.',
    mwb_song_conclude: 101,
  },
	...
]

Watchtower Study Data

[
  {
    w_study_date: 'Artículo de estudio 37 (del 6 al 12 de noviembre de 2023)',
    w_study_title: 'Apóyese en Jehová, tal como lo hizo Sansón',
    w_study_opening_song: 30,
    w_study_concluding_song: 3,
  },
	...
]