Coder Social home page Coder Social logo

sword-to-json's Introduction

sword-to-json

Python utility to convert Crosswire sword bible modules to JSON


Introduction

sword-to-json dumbly converts Crosswire sword bible modules to JSON.

It does some minimalistic tidying up of verse data - trimming, removing double spaces, etc

Under the hood sword-to-json uses the excellent pysword


Examples

Check out the bibles folder for examples of bible JSON generated using sword-to-json


Usage

If our examples don't offer the translation you want, you can use sword-to-json to generate JSON from any sword module:

(1) Install Python 3.6 or higher

(2) Git clone this repo .. git clone [email protected]:danday74/sword-to-json.git

(3) Move to the root folder .. cd sword-to-json

(4) Install dependencies .. pip install -r requirements.txt

(5) Place the ZIP file for each sword module you want to convert into the sword-modules folder or a sub folder thereof

NOTE: Download sword module ZIP files from Crosswire or Ebible

(6) run .. python sword_to_json.py

(7) Wait for processing to complete

(8) The JSON for your chosen sword modules will appear in the bibles folder


Advanced Usage

At step (6) above you can run any of the following:

python sword_to_json.py Creates JSON for sword modules, skipping modules for which the JSON already exists

python sword_to_json.py --overwrite Creates JSON for sword modules without skipping

python sword_to_json.py --partials Creates JSON and partial JSON for sword modules, skipping as above

NOTE: Partial JSON only shows some of the bible data and is pretty printed. Its sole purpose is to help you understand the structure of the JSON and is otherwise useless.

python sword_to_json.py --overwrite --partials Creates JSON and partial JSON for sword modules without skipping


Limitations

sword-to-json does not attempt to fix sword verse data but dumbly provides data as is.

For example, using the KJV sword module Romans 16:27 KJV reads:

To God only wise, be glory through Jesus Christ for ever. Amen. Written to the Romans from Corinthus, and sent by Phebe servant of the church at Cenchrea.

Whereas it should read:

To God only wise, be glory through Jesus Christ for ever. Amen.

The additional text being present in the KJV but not forming part of the verse itself.


Author Says

In case you weren't listening the first time, let me say it again:

To God only wise, be glory through Jesus Christ for ever. Amen.

Romans 16:27 KJV




sword-to-json's People

Contributors

danday74 avatar scruffian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.