jp2a ripoff
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index e4185f9..e8fb1be 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,15 +6,23 @@ mod picture; #[derive(Parser)] #[command(name = "pascii")] #[command(bin_name = "pascii")] +/// turn image into ascii with ansi struct Args { + /// File to take from #[arg()] from: PathBuf, + /// Palette of chars to use + #[arg(long, default_value = " ...,:clodxkO0KXM")] + pal: String, + /// 3 bit rgb? + #[arg(long)] + three: bool, } fn main() -> anyhow::Result<()> { let args = Args::parse(); let p = image::open(args.from)?; let mut s = BufWriter::new(std::io::stdout().lock()); - p.text(b" ...,:clodxkO0KXM", &mut s)?; + p.text(args.pal.as_bytes(), args.three, &mut s)?; Ok(()) } |