Bible Search Rust Program
Budget: $30 – $250 USD
Bible Search
This lab will have you recreate the Bible Search program from Lab 4 using the Rust language. Develop a Rust program which, when given a Bible reference (i.e. book, chapter, and verse), reads a file of Bible text to find and then print the requested verse.
The program should prompt the user for a Bible reference.
The program should check the user's input for the book to see if it matches one of the abbreviations found in the "Bible_Abbreviations.csv Download Bible_Abbreviations.csv Preview the document" file. Use the full book name to search for the verse. You may use the Python csv module.
The program should search the file "Bible.txt Download Bible.txt Preview the document" for the referenced verse.
If the verse is found, then
the verse should be printed to the screen, and
appended to an output file named "verses.txt".
In printing the verse to screen (since the text file has each verse on a single line), format the output so that the single long line is broken into shorter lines of no more than 80 characters (i.e. "pretty print" - don't use a module, write your own). Lines must be broken on white space—not in the middle of words.
If the verse is not found, the program should report that the verse was not found, because the book, chapter, or verse (which ever applies) was not in the Bible. Do not be append the error message to the output file "verses.txt."
The program should prompt the user and ask if they want to continue and look up another verse.
Test Cases
GENESIS 1:1 (test first verse in Bible)
JAB 42:17 (note misspelling of book – test for non-existent book)
JOB 43:17 (test non-existent chapter)
JOB 42:18 (test non-existent verse)
PSALMS 3:5 (test a verse in Psalms)
SONG OF SOLOMON 6:7 (test multi-word book name)
MARK 16:20 (test last verse in last chapter of some book)
REVELATION 22:21 (test last verse in Bible)
GENESIS 50:26 (test last verse in last chapter in first book)
PSALMS 119:105 (test three-digit chapter and verse number)
ISAIAH 42:0 (test a non-existent zeroth verse)
PHILEMON 1:1 (test verse in book of only one chapter)
FIRST PETER 3:5 (test two-word book name)
REVELATION 23:1 (test non-existent last chapter in last book)
REVELATION 22:22 (test non-existent last verse in last chapter)
This lab will have you recreate the Bible Search program from Lab 4 using the Rust language. Develop a Rust program which, when given a Bible reference (i.e. book, chapter, and verse), reads a file of Bible text to find and then print the requested verse.
The program should prompt the user for a Bible reference.
The program should check the user's input for the book to see if it matches one of the abbreviations found in the "Bible_Abbreviations.csv Download Bible_Abbreviations.csv Preview the document" file. Use the full book name to search for the verse. You may use the Python csv module.
The program should search the file "Bible.txt Download Bible.txt Preview the document" for the referenced verse.
If the verse is found, then
the verse should be printed to the screen, and
appended to an output file named "verses.txt".
In printing the verse to screen (since the text file has each verse on a single line), format the output so that the single long line is broken into shorter lines of no more than 80 characters (i.e. "pretty print" - don't use a module, write your own). Lines must be broken on white space—not in the middle of words.
If the verse is not found, the program should report that the verse was not found, because the book, chapter, or verse (which ever applies) was not in the Bible. Do not be append the error message to the output file "verses.txt."
The program should prompt the user and ask if they want to continue and look up another verse.
Test Cases
GENESIS 1:1 (test first verse in Bible)
JAB 42:17 (note misspelling of book – test for non-existent book)
JOB 43:17 (test non-existent chapter)
JOB 42:18 (test non-existent verse)
PSALMS 3:5 (test a verse in Psalms)
SONG OF SOLOMON 6:7 (test multi-word book name)
MARK 16:20 (test last verse in last chapter of some book)
REVELATION 22:21 (test last verse in Bible)
GENESIS 50:26 (test last verse in last chapter in first book)
PSALMS 119:105 (test three-digit chapter and verse number)
ISAIAH 42:0 (test a non-existent zeroth verse)
PHILEMON 1:1 (test verse in book of only one chapter)
FIRST PETER 3:5 (test two-word book name)
REVELATION 23:1 (test non-existent last chapter in last book)
REVELATION 22:22 (test non-existent last verse in last chapter)
Related categories:
Rust