{"id":15070102,"url":"https://github.com/ezra-bible-app/node-sword-interface","last_synced_at":"2025-08-20T06:33:16.700Z","repository":{"id":40548694,"uuid":"168847688","full_name":"ezra-bible-app/node-sword-interface","owner":"ezra-bible-app","description":"JavaScript (N-API) interface to SWORD library","archived":false,"fork":false,"pushed_at":"2024-10-12T07:10:14.000Z","size":1114,"stargazers_count":22,"open_issues_count":5,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-13T04:21:02.399Z","etag":null,"topics":["bible-api","bible-search","bible-study","bible-verse","bibledata","c-plus-plus","javascript","linux","nodejs","osx","sword","sword-library","windows","wrapper-library"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ezra-bible-app.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-02T15:48:35.000Z","updated_at":"2024-10-12T07:10:18.000Z","dependencies_parsed_at":"2024-01-21T09:39:43.507Z","dependency_job_id":"2af1fc7a-b512-42f4-bca2-2a32b63380c4","html_url":"https://github.com/ezra-bible-app/node-sword-interface","commit_stats":{"total_commits":845,"total_committers":5,"mean_commits":169.0,"dds":"0.017751479289940808","last_synced_commit":"34c90f7b36e8c38a43a042cf65a38869fd375d8e"},"previous_names":["ezra-project/node-sword-interface"],"tags_count":220,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezra-bible-app%2Fnode-sword-interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezra-bible-app%2Fnode-sword-interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezra-bible-app%2Fnode-sword-interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezra-bible-app%2Fnode-sword-interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezra-bible-app","download_url":"https://codeload.github.com/ezra-bible-app/node-sword-interface/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230400616,"owners_count":18219831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bible-api","bible-search","bible-study","bible-verse","bibledata","c-plus-plus","javascript","linux","nodejs","osx","sword","sword-library","windows","wrapper-library"],"created_at":"2024-09-25T01:48:04.728Z","updated_at":"2024-12-19T08:08:42.071Z","avatar_url":"https://github.com/ezra-bible-app.png","language":"C++","readme":"# node-sword-interface\nnode-sword-interface is a [nodejs](https://nodejs.org) module that wraps the [SWORD library](http://www.crosswire.org/sword/)\nwhich gives access to Bible text modules and related ressources. It has been created for use within the\n[Ezra Bible App](https://github.com/ezra-bible-app/ezra-bible-app) Bible study software, but it can also be used\nfor any other nodejs-based software that needs to interface with the SWORD library. node-sword-interface supports\nBible modules and dictionary modules that are keyed with Strong's numbers. node-sword-interface works on Windows,\nmacOS, Linux and Android (via [nodejs-mobile](https://code.janeasystems.com/nodejs-mobile)).\n\nThe currently used SWORD version is SVN Rev. 3894 (1.9.x / sword trunk from November 2023).\n\n## Features\n\nnode-sword-interface focusses on discovery, installation/removal and text loading of SWORD modules. It currently covers the following usecases:\n\n- Update SWORD repository configuration\n- List SWORD repositories\n- List remote modules (Bible modules or dictionary modules)\n- List local modules (Bible modules or dictionary modules)\n- Get a list of updated modules\n- Install a module\n- Uninstall a module\n- Get information about a module\n- Get the text of a Bible book\n- Get the text of the whole Bible\n- Search within a Bible module\n- Retrieve info based on Strong's number\n\n## Example: Installing the KJV module\n\nThe following example can be executed (after building node-sword-interface) using the following command:\n\n    node examples/install_kjv.js\n\n```javascript\nconst NodeSwordInterface = require('node-sword-interface');\nvar interface = new NodeSwordInterface();\n\nasync function installKJV() {\n  console.log(\"Updating repository configuration ...\");\n  await interface.updateRepositoryConfig();\n\n  console.log(\"Installing King James module\");\n  // Install the King James Version (Uses the internet connection to download and install the module)\n  await interface.installModule('KJV');\n}\n\ninstallKJV().then(() =\u003e {\n  console.log(\"Installation of KJV successfully completed!\");\n});\n```\n\n## Example: Printing module info and the Gospel of Matthew (KJV)\n\nThe following example can be executed (after building node-sword-interface) using the following command:\n\n    node examples/print_kjv_matthew.js\n\n```javascript\nconst NodeSwordInterface = require('node-sword-interface');\nvar interface = new NodeSwordInterface();\n\nfunction printKjvInfo() {\n  // Print some module information\n  var kjv = interface.getLocalModule('KJV');\n  console.log(kjv.description);\n  console.log(kjv.about);\n}\n\nfunction printMatthew() {\n  // Get the verses of the Gospel of Matthew\n  var verses = interface.getBookText('KJV', 'Mat');\n\n  // Do something with the verses\n  for (var i = 0; i \u003c verses.length; i++) {\n    var currentVerse = verses[i];\n    var verseReference = currentVerse.chapter + ':' + currentVerse.verseNr;\n    console.log(verseReference + ' '  + currentVerse.content);\n  }\n}\n\nprintKjvInfo();\nprintMatthew();\n```\n\n## API Docs\n\nThe Javascript API of node-sword-interface is documented [here](API.md).\n\n## Installation\n\n### Dependencies\n\nBefore installing node-sword-interface you need to make sure that the following dependencies are installed:\n- C++11 compiler toolchain\n- nodejs (A version that supports N-API version \u003e= 4, like 8.16.0, 10.16.0 or 12.0.0 (see [N-API Version Matrix](https://nodejs.org/api/n-api.html#n_api_n_api_version_matrix)))\n- Git\n- Mac/Linux dependencies:\n    - CURL library with development headers\n    - CMake (for building the SWORD library)\n\nBelow you find the OS-specific instructions for installing the dependencies.\n\n#### Install dependencies on Linux\n\nThese installation instructions are working on Debian/Ubuntu based Linux distributions.\n\nTo install the dependencies issue the following command on a Debian/Ubuntu based distribution:\n    \n    sudo apt-get install build-essential nodejs npm libcurl4-gnutls-dev zlib1g-dev pkg-config cmake subversion\n\n#### Install dependencies on macOS\n\n1. Install XCode from the App Store\n2. Install Command Line Developer Tools (contains Compiler toolchain, git, etc.) by running this command:\u003cbr/\u003e `xcode-select --install`   \n3. Install the homebrew package manager by running this command:\u003cbr/\u003e `/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"`\n4. Install some packages with homebrew by running this command:\u003cbr/\u003e `brew install pkg-config cmake npm`\n\n#### Install dependencies on Windows\n\n1. Install [git](https://git-scm.com/download/win).\n2. Install [nodejs](https://nodejs.org). Important note: Ensure to install the *x86 version* (32-bit) of nodejs 14.x.\n   Furthermore, when the setup assistant asks about *Tools for native modules*, make sure to tick the checkbox *Automatically install the necessary tools*. This will then install the windows build tools required to build node-sword-interface.\n\n![Tools for native addons](https://raw.githubusercontent.com/ezra-bible-app/ezrabibleapp.net/master/assets/screenshots/nodejs_tools_for_native_addons.png)\n\n### Install from npmjs\n\nOnce the dependencies are available you can install and build the latest node-sword-interface release from [npmjs.com](https://www.npmjs.com/package/node-sword-interface) by issuing the following command:\n\n    npm install node-sword-interface\n\nOn Windows, you need to add `--arch=ia32` at the end of the command:\n\n    npm install node-sword-interface --arch=ia32\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezra-bible-app%2Fnode-sword-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezra-bible-app%2Fnode-sword-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezra-bible-app%2Fnode-sword-interface/lists"}