Skip to content

condition to catch and repair parsing of books with a single chapter - #2

Open
JMNofziger wants to merge 1 commit into
gratis-bible:masterfrom
JMNofziger:parsing_bug_quickfix
Open

condition to catch and repair parsing of books with a single chapter#2
JMNofziger wants to merge 1 commit into
gratis-bible:masterfrom
JMNofziger:parsing_bug_quickfix

Conversation

@JMNofziger

Copy link
Copy Markdown

Issue is described here: #1

Book objects with a single chapter did not contain the chapter within an array and would have an undefined length - checking for this condition allowed me to perform the necessary modification on only the affected books. The book object for Genesis is cloned to serve as a correctly parsed template and the clone then has its properties updated to hold the values of the affected book. The task then continues normally.

Tested locally. Manually checked a few books to confirm expected output to gh-pages, and confirmed that git status showed only the expected new directories/files were being created. I've included a file git-status-output.txt with the output from git after grunt convert --html was run with the new code changes.

I'm sure there's a resolution to be found at the point of parsing but I wanted to quickly submit a PR to simply get the missing chapters up on the gratis.bible webpages.

@JMNofziger

Copy link
Copy Markdown
Author

excerpt from git-status-output.txt to preview the untracked files being created - this demonstrates the creation of the previously missing chapter output for single chapter books:

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        af/afr3353/2john/1/
        af/afr3353/3john/1/
        af/afr3353/jude/1/
        af/afr3353/obad/1/
        af/afr3353/phlm/1/
        ar/arasvd/2john/1/
        ar/arasvd/3john/1/
        ar/arasvd/jude/1/
        ar/arasvd/obad/1/
        ar/arasvd/phlm/1/
        bg/bulcarigradnt/2john/1/
        bg/bulcarigradnt/3john/1/
        bg/bulcarigradnt/jude/1/
        bg/bulcarigradnt/phlm/1/
        bg/bulveren/2john/1/
        bg/bulveren/3john/1/
        bg/bulveren/jude/1/
        bg/bulveren/obad/1/
        bg/bulveren/phlm/1/
        cs/czbkr/2john/1/
        cs/czbkr/3john/1/
        cs/czbkr/jude/1/
[... and so on, and so forth... ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant