Socket
Socket
Sign inDemoInstall

jw-epub-parser

Package Overview
Dependencies
128
Maintainers
2
Versions
128
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
360
decreased by-12.62%
Maintainers
2
Created
Weekly downloads
 

Changelog

Source

1.36.0 (2023-03-13)

Features

  • deps: bump jsdom from 21.1.0 to 21.1.1 (48025ba)
  • deps: bump node-fetch from 3.3.0 to 3.3.1 (c8ae05c)
  • deps: bump rimraf from 4.1.2 to 4.1.3 (b8a1952)
  • deps: bump rimraf from 4.1.3 to 4.2.0 (a055786)
  • deps: bump rimraf from 4.2.0 to 4.3.0 (c71c31c)
  • deps: bump rimraf from 4.3.0 to 4.3.1 (1cf716f)
  • deps: bump rimraf from 4.3.1 to 4.4.0 (0a7bfcb)
  • deps: bump rollup from 3.17.3 to 3.18.0 (544c69c)
  • deps: bump rollup from 3.18.0 to 3.19.0 (9331762)
  • deps: bump rollup from 3.19.0 to 3.19.1 (f5b987b)

Readme

Source

JW EPUB Parser

CI CD jw-epub-parser

An EPUB Parser to extract the needed source materials from Meeting Workbook EPUB file. Support for parsing Watchtower Study will be added in a future release.

Install

npm i jw-epub-parser

Usage

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

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

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 object which contains three properties:

ReturnTypeDescription
mwbYearstringThe current year of the Meeting Workbook that is being parsed
weeksCountintegerThe number of weeks available in the EPUB file
weeksDataarrayArray containing the weekly source material. Each property available for each object is available below

Here are the list of all available properties in each object in the weeksData array:

NameTypeDescription
weekDatestringWeek date. For enhanced parsing, it is formatted as mm/dd/yyyy
weekDateLocale*stringWeek date
weeklyBibleReadingstringWeekly Bible Reading
songFirstintegerFirst song
tgw10Talkstring10 min talk title of the Treasures from God’s Word
tgwBReadstringBible Reading for student
tgwBReadStudy*integerStudy Point for Bible Reading part
ayfCountintegerNumber of parts in Apply Yourself to the Field Ministry
ayfPart1stringPart 1 in Apply Yourself to the Field Ministry
ayfPart1Time*integerTiming of Part 1 in Apply Yourself to the Field Ministry
ayfPart1Type*stringType of Part 1 in Apply Yourself to the Field Ministry
ayfPart1Study*integerStudy Point of Part 1 in Apply Yourself to the Field Ministry
ayfPart2stringPart 2 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is 1
ayfPart2Time*integerTiming of Part 2 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is 1
ayfPart2Type*stringType of Part 2 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is 1
ayfPart2Study*integerStudy Point of Part 2 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is 1
ayfPart3stringPart 3 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is less than 3
ayfPart3Time*integerTiming of Part 3 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is less than 3
ayfPart3Type*stringType of Part 3 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is less than 3
ayfPart3Study*integerStudy Point of Part 3 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is less than 3
ayfPart4stringPart 4 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is less than 4
ayfPart4Time*integerTiming of Part 4 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is less than 4
ayfPart4Type*stringType of Part 4 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is less than 4
ayfPart4Study*integerStudy Point of Part 4 in Apply Yourself to the Field Ministry. This property will not be available if ayfCount is less than 4
songMiddleintegerMiddle song
lcCountintegerNumber of parts in Living as Christians
lcPart1stringPart 1 in Living as Christians
lcPart1Time*integerTiming of Part 1 in Living as Christians
lcPart1Content*stringContent of Part 1 in Living as Christians
lcPart2stringPart 2 in Living as Christians. This property will not be available if lcCount is 1
lcPart2Time*integerTiming of Part 2 in Living as Christians. This property will not be available if lcCount is 1
lcPart2Content*stringContent of Part 2 in Living as Christians. This property will not be available if lcCount is 1
lcCBSstringCongregation Bible Study source material
songConcludeinteger or stringConcluding song. When the song number is out of range, it will be the default text from the Meeting Workbook.

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

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

Enlish
French
Malagasy
Portuguese Brazil
Tandroy, Tankarana
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

{
	weeksCount: 7,
 	mwbYear: '2023',
  	weeksData: [
    		{
			weekDate: '03/06/2023',
			weekDateLocale: 'March 6-12',
			weeklyBibleReading: '1 CHRONICLES 23-26',
			songFirst: 123,
			tgw10Talk: '“Temple Worship Becomes Highly Organized”',
			tgwBRead: '1Ch 23:21-32',
			tgwBReadStudy: 5,
			ayfCount: 3,
			ayfPart1:
				'Discussion. Play the video Memorial Invitation Campaign. Stop the video at each pause, and ask the audience the questions that appear in the video.',
			ayfPart1Time: 5,
			ayfPart1Type: 'Memorial Invitation Video',
			ayfPart2:
				'Begin with the sample conversation topic. After the householder expresses interest, introduce and discuss (but do not play) the video Remember Jesus’ Death.',
			ayfPart2Time: 3,
			ayfPart2Type: 'Memorial Invitation',
			ayfPart2Study: 11,
			ayfPart3: 'w11 6/1 14-15—Theme: Why Are Christians Organized?',
			ayfPart3Time: 5,
			ayfPart3Type: 'Talk',
			ayfPart3Study: 14,
			songMiddle: 101,
			lcCount: 2,
			lcPart1: '“How to Help After a Disaster”',
			lcPart1Time: 10,
			lcPart1Content: 'Discussion and video.',
			lcPart2: 'Memorial Campaign to Begin Saturday, March 11',
			lcPart2Time: 5,
			lcPart2Content:
				'Discussion. Briefly review the invitation. Outline the local arrangements for the special talk and the Memorial and for covering the territory.',
			lcCBS: 'lff lesson 39 and endnote 3',
			songConclude: 127,
		},
    		...
  	]
}

Without enhanced parsing

{
	weeksCount: 7,
	mwbYear: '2023',
 	weeksData: [
 		{
			weekDate: '6-12 de marzo',
			weeklyBibleReading: '1 CRÓNICAS 23-26',
			songFirst: 123,
			tgw10Talk: '“La adoración en el templo estaba bien organizada” (10 mins.)',
			tgwBRead: 'Lectura de la Biblia (4 mins.): 1Cr 23:21-32 (th lec. 5).',
			ayfCount: 3,
			ayfPart1:
				'Video de la invitación a la Conmemoración (5 mins.): Análisis con el auditorio. Ponga el video Campaña de la Conmemoración. Detenga el video en cada pausa y haga las preguntas que aparecen en él.',
			ayfPart2:
				'Invitación a la Conmemoración (3 mins.): Use el tema de las ideas para conversar. Luego, cuando la persona muestre interés, presente y analice el video Recordemos la muerte de Jesús, pero no lo ponga (th lec. 11).',
			ayfPart3: 'Discurso (5 mins.): w11 1/6 14, 15. Título: ¿Por qué están los cristianos bien organizados? (th lec. 14).',
			songMiddle: 101,
			lcCount: 2,
			lcPart1: '“Cómo podemos ayudar cuando ocurre un desastre” (10 mins.): Análisis con el auditorio y video.',
			lcPart2:
				'El 11 de marzo comienza la campaña de la Conmemoración (5 mins.): Análisis con el auditorio. Repase brevemente el contenido de la invitación. Explique los planes que se han hecho para el discurso especial, para celebrar la Conmemoración y para cubrir el territorio.',
			lcCBS: 'Estudio bíblico de la congregación (30 mins.): lff lección 39 y nota 3.',
			songConclude: 127,
		},
    		...
  	]
}

Keywords

FAQs

Last updated on 13 Mar 2023

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc