photokandyStudios / gbible

Greek Interlinear Bible for iOS (native)
http://www.photokandy.com/apps/gib
41 stars 31 forks source link

Bible Downloads (with support for non-English versions) #59

Closed kerrishotts closed 11 years ago

kerrishotts commented 11 years ago

This feature would allow the user to download a non-English (or alternative English) Bible for use within the application. I see this having more use in non-English countries and territories, but it could be useful in English areas to allow additional Bibles (such as the WEB).

I don't want to rely on online Biblical APIs as they can all to quickly turn off the pipes, and they also require a constant Internet connection. (Not all APIs support taking the entire Bible offline.)

So my thought is to build a Bible Downloader View that could connect to a server hosting the Bibles in a readable format by the app. The user could download whatever Bible(s) they choose. After downloading, the Bibles would be imported into a new database (the bibleContent db is off-limits, as it is part of the bundle, and the userContent database should be used only for content created by the user). This database might be called userBibleContent.

This would require modifying the settings and Bible support code to read the list of Bibles out of both the bibleContent DB and the userBibleContent DB. It would also require the Bible code to load verses out of the userBibleContent DB, assuming it exists. I don't think that should be very difficult to do, though.

The harder part is providing for the downloads. I'm somewhat partial to using the versions available at the Unbound Bible, since they allow downloads for free. But at the same time I don't want to abuse their kindness by "leeching" off their servers for the files. What I may do instead is build some instance of my own online that would use the UnBound Bible files. That way I can give them credit, but not leech off their servers.

If I host the files myself, the work of parsing the download file could be made much simpler as I could simply host a sqlite instance of the database online. Once downloaded to the device, I could open that database, run a query on it to pull out the content, and then re-insert it into the userBibleContent db. If I don't host the files myself, I'll have to do the work of writing the parser for the content.

Technically there's no reason that one couldn't also provide updates to the provided Biblical texts this way for both the Greek and English versions. Not sure if I would ever use it that way, but it might be useful to build in a hierarchical structure where if the userBibleContent database has a Bible with the ID of one in the bibleContent database, then the userBibleContent database takes precedence.

All this is a bit of speculation ATM, but I wanted to put it out here so that it was on the list of enhancements. If you have any suggestions, feel free to add a comment.

kerrishotts commented 11 years ago

Bible Download Support is now in-place as of the latest 1.2 build.