docs.rs failed to build agx-cli-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
agx-cli
Purpose
Thin CLI wrapper that exposes the agx library's functionality as command-line subcommands.
Public API (CLI interface)
agx apply --input <path> --preset <path> --output <path> [--quality N] [--format fmt]-- apply a TOML preset to an imageagx edit --input <path> --output <path> [--exposure N] [--contrast N] [--highlights N] [--shadows N] [--whites N] [--blacks N] [--temperature N] [--tint N] [--lut path] [--quality N] [--format fmt]-- edit with inline parameters
Both subcommands extract metadata from the input, decode, process, render, and encode with metadata preservation.
Extension Guide
To add a new adjustment parameter to the CLI:
- Add the field to
Parametersin the library. - Add a
#[arg]field to theEditvariant ofCommands. - Pass it through in
run_edittoengine.params_mut().
To add a new subcommand:
- Add a variant to the
Commandsenum with clap#[arg]fields. - Add a
run_*function implementing the workflow. - Wire it in the
match cli.commandblock inmain().
Does NOT
- Contain image processing logic -- delegates everything to the agx library.
- Define its own error types -- uses
agx::Resultandagx::AgxError.
Key Decisions
- Two subcommands, not flags.
apply(preset-driven) andedit(parameter-driven) are separate workflows with distinct argument sets, avoiding confusion. - Metadata preservation is automatic. Both subcommands extract metadata from the input and inject it into the output with no user flags required.