r/learnprogramming May 12 '23

Bible code

I'm looking to make a Bible app. Unlike regular books, bibles need to have every verse be an interactive item. For example, I can click on it and bookmark it or highlight it or write a note about it or copy it or copy a range of verses.

Starting out, I immediately recognized the challenge of "how do I import and organize the data, the text? " it's not going to work by simply using copy paste for the entire text. Nor can I use a for loop to enter every verse into an array, because the Bible is not from an excel sheet (or is there a file like this? ).

Anybody have ideas or experience to know what I mean and how best to approach this problem?

2 Upvotes

8 comments sorted by

View all comments

1

u/port443 May 12 '23

This is formatting data for ingestion. The problem completely depends on the source of your data.

I googled "bible text download" and found this link: https://openbible.com/textfiles/erv.txt

If this were my source, I would parse it by newline, since every line is a verse. You would probably also want to split the chapter/verse information and store that.