Skip to content

Commit

Permalink
export to 66 books and 1189 chapters for each bible text
Browse files Browse the repository at this point in the history
  • Loading branch information
eliranwong committed Dec 28, 2024
1 parent 9c63b79 commit 638ab88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions uniquebible/db/BiblesSqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ def exportToMarkdown(self, agbParagraphs=False, agbSubheadings=False, standardRe
shutil.rmtree(bible_dir)
# export bible text in markdown format
for b in self.getBookList():
bookText = []
bookFolder = os.path.join(bible_dir, "{:02}".format(b))
Path(bookFolder).mkdir(parents=True, exist_ok=True)
for c in self.getChapterList(b):
Expand All @@ -985,6 +986,10 @@ def exportToMarkdown(self, agbParagraphs=False, agbSubheadings=False, standardRe
chapterFile = os.path.join(bookFolder, "{:03}.md".format(c))
with open(chapterFile, "w", encoding="utf-8") as fileObj:
fileObj.write(chatperText)
bookText.append(chatperText)
bookTextFile = os.path.join(bible_dir, "{:02}.md".format(b))
with open(bookTextFile, "w", encoding="utf-8") as fileObj:
fileObj.write("\n\n".join(bookText))

def updateVerse(self, b, c, v, verseText):
self.cursor.execute("UPDATE Verses SET Scripture = ? WHERE Book = ? AND Chapter = ? AND Verse = ?", (verseText, b, c, v))
Expand Down

0 comments on commit 638ab88

Please sign in to comment.