- Clone the project.
- Inside the project directory, run
cargo run --bin rs_bom_cli
to run the command-line app. Runcargo run --bin rs_bom_api
to start serving the RESTful API. Runcargo run --bin rs_bom_emailer
to send an email with a random verse. - Run
cargo doc --open
to generate the docs. - Run
cargo test
to run tests. - Run
cargo fuzz run reference
to run the reference parser fuzzer. - Run
cargo bench
to 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 4
we can canonicalize it toAlma 3–4
. Similarly, we canonicalizeAlma 16, 18, 19
toAlma 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
USERNAME
andPASSWORD
environment 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.