+----[drunken]----+ |..+.. oo+o. | | *.* o +.o. | |= = o * .E+ | |+. ..+ = +.. | |o ...+ S.o | | .o .....= . | |.. o .+ + | |. = + | | ..= | +----[bishop]-----+ |
Library for visualizing data using The Drunken Bishop algorithm implemented in Rust
Drunken Bishop is the algorithm used in OpenSSH's ssh-keygen
for visualising generated keys
CLI app:
bishop-cli
(bishop
) - CLI app for visualising hex or binary data
Reference used for this implementation: http://www.dirk-loss.de/sshvis/drunken_bishop.pdf
Cargo.toml
:
toml
[dependencies]
bishop = "x.x.x"
Use current latest version:
main.rs
:
```rust use bishop::bishop as bs;
use std::io::{Read, BufReader}; use std::fs::File;
fn main() { let cfg = bs::Options::default();
// from file to String
let file = File::open("some_file").unwrap();
let art = bs::art_str(&mut BufReader::new(file).bytes(), &cfg).unwrap();
println!("{}", art);
// from vec to String
let src = vec![1u8, 3, 3, 7];
let art = bs::art_str(&src, &cfg).unwrap();
println!("{}", art);
// from slice to stdout
let src = [1u8, 2, 3, 4, 5];
bs::art_print(src.as_ref(), &cfg, |p| println!("{}", p)).unwrap();
} ```
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.