Skip to content

Add CLI arguments#10

Draft
Exotik850 wants to merge 16 commits into
masterfrom
cli_args
Draft

Add CLI arguments#10
Exotik850 wants to merge 16 commits into
masterfrom
cli_args

Conversation

@Exotik850

@Exotik850 Exotik850 commented Nov 2, 2024

Copy link
Copy Markdown
Owner

Add Command Line Arguments Support 🚀

This PR aims adds comprehensive command line argument support using clap, enhancing user experience and flexibility. Users will be able Cleave directly from the command line without modifying source code, or point to a configuration file for preset defaults

Key Changes

  • Add support for output directory and format selection
  • Implemented monitor selection and region capture
  • Add delay timer and clipboard-only mode

New Usage Examples

# Quick clipboard capture
cleave -b

# Capture specific region after 3s delay
cleave -r 100,100,500,500 -d 3

Technical Details

  • Integrate clap with derive macros for clean argument parsing
  • Add configuration serialization using serde
  • Implement proper error handling for invalid arguments
  • Add environment variable support (CLEAVE_*)

Closes #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command is missing --help

1 participant