jp2a ripoff
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..58c844e --- /dev/null +++ b/src/main.rs @@ -0,0 +1,19 @@ +use clap::Parser; +use picture::*; +use std::path::PathBuf; + +mod picture; +#[derive(Parser)] +#[command(name = "pascii")] +#[command(bin_name = "pascii")] +struct Args { + #[arg()] + from: PathBuf, +} + +fn main() -> anyhow::Result<()> { + let args = Args::parse(); + let p = image::open(args.from)?; + println!("{}", p.text(" ...,:clodxkO0KXM".as_bytes())); + Ok(()) +} |