srcdmp 0.1.0-alpha.1

Amazing code snapshot tool and library
Documentation
//! Auxiliary binary for creating a self-snapshot of the srcdmp project itself.
//!
//! Walks the project root, applies `.gitignore` and ignores the `datafeeder/`
//! directory, then writes the snapshot to the `dump/` directory with a
//! date-stamped filename derived from `Cargo.toml`.

use srcdmp::{Codec, Dump};

fn main() {
    std::fs::create_dir_all("dump").unwrap();

    let dump = Dump::from_dir(".")
        .codec(Codec::Compact4)
        .gitignore()
        .ignore("datafeeder/**")
        .build()
        .unwrap();

    println!("files packed:");
    for path in dump.files() {
        println!("  {path}");
    }

    println!(
        "packed {} files, {} bytes original",
        dump.file_count(),
        dump.original_size()
    );

    dump.from_cargo().write_to("dump/").unwrap();
}