- Clone the project.
- Inside the project directory, run
cargo run --bin rs_bom_clito run the command-line app. Runcargo run --bin rs_bom_apito start serving the RESTful API. Runcargo run --bin rs_bom_emailerto send an email with a random verse. - Run
cargo doc --opento generate the docs. - Run
cargo testto run tests. - Run
cargo fuzz run referenceto run the reference parser fuzzer. - Run
cargo benchto benchmark.
- Core functionality of Book of Mormon parsing.
- Iter over all the verses in the Book of Mormon.
- Fetch standalone verses by reference.
- Parse arbitrary reference strings using the format specified here. Canonicalize these references and iterate over the verses in them. For example, given a string of
Alma 3:18–19, 16–17; Alma 3; Alma 4we can canonicalize it toAlma 3–4. Similarly, we canonicalizeAlma 16, 18, 19toAlma 16, 18–19.
- CLI app providing terminal interface to the Book of Mormon.
- Get a random verse
- Search for a reference or for arbitrary text. Limit returned results and get total match count.
- Output all text for consumption for other command-line utilities such as
grep.
- JSON RESTful API
- Get a specific verse
- Canonicalize a reference string
- Get all verses in a reference
- Get a random verse
- This will need the
USERNAMEandPASSWORDenvironment variables to be specified at build time. - The resulting executable can be scheduled to be run as a cronjob with a crontab entry like this:
45 5 * * * ~/rs_bom_emailer. That will send an email to someone every morning at 5:45 am with a random scripture as the body.