Skip to content

Commit

Permalink
feat(cli/help): added codecs support section
Browse files Browse the repository at this point in the history
  • Loading branch information
SalOne22 committed Mar 24, 2024
1 parent 8dfc9fd commit 8578367
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use clap::{command, Command};
use indoc::indoc;

use self::codecs::Codecs;

Expand All @@ -9,7 +10,29 @@ pub mod preprocessors;
pub mod utils;

pub fn cli() -> Command {
command!().arg_required_else_help(true).codecs()
command!()
.arg_required_else_help(true)
.after_help(indoc! {r#"List of supported codecs
| Image Format | Decoder | Encoder |
| ------------ | ------------- | ----------------------- |
| bmp | zune-bmp | X |
| jpeg | zune-jpeg | mozjpeg or jpeg-encoder |
| png | zune-png | oxipng or zune-png |
| avif | libavif | ravif |
| webp | webp | webp |
| ppm | zune-ppm | zune-ppm |
| qoi | zune-qoi | zune-qoi |
| farbfeld | zune-farbfeld | zune-farbfeld |
| psd | zune-psd | X |
| jpeg-xl | jxl-oxide | zune-jpegxl |
| hdr | zune-hdr | zune-hdr |
List of supported preprocessing options
- Resize
- Quantization"#})
.codecs()
}

#[cfg(test)]
Expand Down

0 comments on commit 8578367

Please sign in to comment.