Ok this may have been asked before but I can not find a definite answer.
I am building an app for my Father, who wants a bible app. It's going to be using speech recognition. I can create the whole app, with No problems, I am just trying to figure out if there is an easier way.
I have a txt file with Genesis chapter 1, and then I have several txt files that is Genesis chapter one, but each txt file is one verse.
I can call each txt file and read it no problem. However if I do it this way, there is going to be several thousand txt files, and several thousand lines of code.
I know the file is read by chunks. Is there a way I can take the entire chapter and read one line, for example:
If (speech == "Genesis chapter one verse nine")
{
Bible.SpeakAsync(@"Gen1V9.txt");
}
I know the index would be 0 - X. With x signifying the length of the text. The I could call the nth line
If (speech == "Genesis chapter one verse nine")
{
Bible.SpeakAsync(File.ReadLine[10](@"Gen1.txt");
}
I have omitted a lot of code, however this is an example. Instead of me calling each txt file, can I call one txt file and have it read a certain line. If so the entire Bible would be a fixed length, so I would know that verse 9 will always be line 10 in the txt file.
This how i have done it for years, by pulling individual txt files, but I am wanting to clean up the code and use minimal code as possible.
I hope this makes sense. The speech is irrelevant, I am just needing to find a solution to get the nth line.
Source is http://www.sacred-texts.com/bib/osrc/