-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathcli.rs
50 lines (41 loc) · 1.29 KB
/
cli.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use clap::{command, Command};
use indoc::indoc;
use self::codecs::Codecs;
pub mod codecs;
pub mod common;
pub mod pipeline;
pub mod preprocessors;
pub mod utils;
pub fn cli() -> Command {
command!()
.arg_required_else_help(true)
.after_help(indoc! {r#"List of supported codecs
| Image Format | Input | Output | Note |
| ------------- | ----- | ------ | --------------- |
| avif | O | O | Static only |
| bmp | O | X | |
| farbfeld | O | O | |
| hdr | O | O | |
| jpeg | O | O | |
| jpeg_xl(jxl) | O | O | |
| mozjpeg(moz) | O | O | |
| oxipng(oxi) | O | O | Static only |
| png | O | O | Static only |
| ppm | O | O | |
| psd | O | X | |
| qoi | O | O | |
| webp | O | O | Static only |
List of supported preprocessing options
- Resize
- Quantization
- Alpha premultiply"#})
.codecs()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn verify_app() {
cli().debug_assert();
}
}