GithubHelp home page GithubHelp logo

andbible / sword_studybibles Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 6.0 166 KB

Convert Study Bible ePub files into SWORD modules

Home Page: https://studybibles.evankelista.net/

License: GNU General Public License v3.0

Shell 1.40% Python 98.60%

sword_studybibles's People

Contributors

tuomas2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sword_studybibles's Issues

Sorting does not work as I wanted

Hello

When you use the "expositor" script constantly showing errors, some of them contain information about the cause of the error, but it is often said about the team on which the error occurred, but not about text in xml that is causing the error. could do to show details on what line in the xml error? no, the xml file without mistake, a problem in numbering of ranges of verses... like such mistakes

INFO:study2osis:Fixing overlapping ranges
INFO:study2osis:... process overlapping verses
AssertionError()

e:\backup\building\sword_studybibles-expositor_old\study2osis\overlapping.py(150)_merge_into_previous_comment()
149 # some earlier, merged comment
--> 150 assert verses(existing_comment)[0] < new_verses[0]
151 verses_for_existing = verses(existing_comment)

but the conversation the main do not go about detailed error report, namely about this error ... I began to remove parts from xml ranges and thus calculated the cause of the error. the cause was the next range

div annotateType="commentary" annotateRef="Gen.1.1"
div annotateType="commentary" annotateRef="Gen.1.2"
div annotateType="commentary" annotateRef="Gen.1.2"
div annotateType="commentary" annotateRef="Gen.1.1-Gen.1.5"

first goes the figure 1, then 2, then 1 again, expositor and stumbles.
I'm in AndBible group asked you to make sorting ranges. you did, but something she did not understand how it works. whether it is possible to put sorting of ranges at the beginning of work of a script of expositor that it did them so

div annotateType="commentary" annotateRef="Gen.1.1"
div annotateType="commentary" annotateRef="Gen.1.1-Gen.1.5"
div annotateType="commentary" annotateRef="Gen.1.2"
div annotateType="commentary" annotateRef="Gen.1.2"

I put sorting in a script in the beginning

    logger.info('Fixing overlapping ranges')
    logger.info('... sort links')
    self._sort_links()
    logger.info('... process overlapping verses')
    self._process_overlapping_verses()
    if not self.options.no_nonadj:
        logger.info('... create empty comments for nonadjacent ranges (optional step)')
        self._create_empty_comments_for_nonadjancent_ranges()
    logger.info('... add reference links to strings')
    self._add_reference_links_to_comments()
    logger.info('... sort links')
    self._sort_links()

but sorting isn't made, and to understand I don't have enough knowledge... you couldn't help?

Gratefully,
Emet

Notes on requirements and sys.path for python3

Using python3 on kubuntu.
I had to install libxml2-dev for lxml to work (quick google search):

sudo apt install libxml2-dev libxmlsec1-dev

I had to install ipdb via pip3 for the script to run.

sudo pip3 install ipdb

I added src to path in studybible_to_osis.py like:

logging.basicConfig(level=logging.INFO)

import sys
sys.path.insert(0, 'src')

from study2osis import main

After that everything ran okay, lots of warnings but ESV Global Study Bible was converted in 2.17 minutes.

Thanks so much for this script!

EPUB to Sword conversion fails

We're testing the conversion of the MacArthur Study Bible to Sword, which is supposed to work based on the documentation. However, upon running the command to convert it, we get:

~/.local/lib/python3.7/site-packages/bs4/init.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 13 of the file studybible_to_osis.py. To get rid of this warning, change code that looks like this:

BeautifulSoup(YOUR_MARKUP})

to this:

BeautifulSoup(YOUR_MARKUP, "lxml")

markup_type=markup_type))
Exception('No studynotes in zip file')

~/.local/lib/python3.7/site-packages/study2osis-0.0.5-py3.7.egg/study2osis/main.py(167)read_studynotes()
166 if not studynote_files:
--> 167 raise Exception('No studynotes in zip file')
168

ipdb>

If you need any other information, like package versions used, let us know.

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.