diff --git a/openlp/plugins/biblemanager/BibleManager.py b/openlp/plugins/biblemanager/BibleManager.py index 274a65481..3b4840f31 100644 --- a/openlp/plugins/biblemanager/BibleManager.py +++ b/openlp/plugins/biblemanager/BibleManager.py @@ -87,7 +87,7 @@ class BibleManager: nhttp = BibleHTTPImpl() nhttp.setBibleSource(biblesource) self.bibleHTTPCache[name] = nhttp - nbible.loadMeta("WEB", biblesource) + nbible.loadMeta("WEB", biblesource) # register a lazy loading interest def registerBible(self, name, booksfile, versefile): """ @@ -100,6 +100,24 @@ class BibleManager: nbible.createTables() # Create Database nbible.loadData(booksfile, versefile) self.bibleDBCache[name] = nbible + + def loadBible(self,bible): + print "loadBible ", bible + """ + Downloads all the books of the bible + and loads it into the database + """ + for bk in self.listOfBooks: + cptrs = self.booksChapters[ self.booksOfBible[bk]] + print bk , self.booksChapters[ self.booksOfBible[bk]] + for chptr in range(1 , int(cptrs)): # loop through all the chapters in book + c = self.bibleDBCache[bible].getBibleChapter(bk, chptr) # check to see if book/chapter exists + print c + if not c: + print "missing ", bk, chptr + self._loadBook(bible,bk) + self._loadChapter(bible, bk, chptr) + def getBibles(self): """ diff --git a/openlp/plugins/biblemanager/resources/bibles_en.txt b/openlp/plugins/biblemanager/resources/bibles_en.txt index ee3373f72..d93711ebc 100644 --- a/openlp/plugins/biblemanager/resources/bibles_en.txt +++ b/openlp/plugins/biblemanager/resources/bibles_en.txt @@ -2,7 +2,7 @@ Genesis,1 Exodus,2 Leviticus,3 Numbers,4 -Deutoronomy,5 +Deuteronomy,5 Psalms,23 Matthew,47 Mark,48