estienne 0.8.0-alpha

Estienne is a library that scans plain text for Bible references and helps to format or link them to online Bibles, among other things.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub mod nwt_en;
use thiserror::Error;

#[derive(Debug, Error, PartialEq)]
pub enum BibleError {
    #[error("the Bible book, {0}, was not found")]
    BookNotFound(String),
    #[error("failed to parse scripture reference: '{0}'")]
    ParsingError(String),
}

pub trait BibleRef {
    fn get_index(book: &str) -> Result<u8, BibleError>;
    fn is_valid(book: &str) -> bool;
}