logoxide 0.1.2

Bibles, commentaries, lexicons, books, and media as versioned packages: read from USX, USFM, and more, cached, and shared
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! The checksum of a package unpacked from a `.tar.gz` (`git archive`, or a host's download):
//! `cargo run -p logoxide --example archive_checksum -- kjv.tar.gz`

use logoxide::{MemoryStorage, net::archive, package::checksum};

fn main() -> logoxide::Result<()> {
    for path in std::env::args().skip(1) {
        let bytes =
            std::fs::read(&path).map_err(|e| logoxide::LogoxideError::io(&path.clone(), e))?;
        let files = MemoryStorage::new();
        archive::unpack(&bytes, &files)?;
        println!("{path}: {}", checksum(&files)?);
    }
    Ok(())
}