Add --clipboard flag to read images from system clipboard#229
Add --clipboard flag to read images from system clipboard#229robertknight merged 1 commit intomainfrom
Conversation
bdc4d4e to
8839aec
Compare
Add a `--clipboard` / `-c` flag to ocrs-cli that reads images from the system clipboard instead of a file path. This feature requires the `clipboard` Cargo feature to be enabled at build time (uses the arboard crate). When built without the feature, the flag is still accepted but returns a helpful error message directing users to rebuild with the feature enabled. Supersedes #128. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
8839aec to
504cc9d
Compare
|
Claude session: Details
|
|
I’m trying to install the version with clipboard support ~: cargo -V
cargo 1.93.0 (083ac5135 2025-12-15) (built from a source tarball)
~: cargo install ocrs-cli --locked --features clipboard
Updating crates.io index
Installing ocrs-cli v0.12.0
Updating crates.io index
error: failed to compile `ocrs-cli v0.12.0`, intermediate artifacts can be found at `/tmp/cargo-installTCwfD9`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Caused by:
the package 'ocrs-cli' does not contain this feature: clipboard |
|
This version hasn't been released yet. You'll need to install the latest version from git, which you can do with: |
Add a feature to the CLI that enables reading images from the clipboard instead of a file. Usage is
ocrs --clipboardorocrs -c.The implementation uses the
arboardcrate, gated behind an optionalclipboardCargo feature. When built without the feature, the flag is still accepted but returns a helpful error message.Code written by Claude Code.
Usage:
Supersedes #128.