Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Clipper with Folder Copying, File Type/Extension Filtering, and Size Filtering (Dependent on Performance Enhancements) #28

Open
supitsdu opened this issue Jun 27, 2024 · 0 comments
Labels
concurrency enhancement New feature requests or enhancements. performance Issues or PRs focused on optimizing Go code performance. refactoring Issues or PRs to improving code structure, without changing its external behavior

Comments

@supitsdu
Copy link
Owner

Currently, Clipper only supports copying text content from files or standard input. This enhancement aims to significantly expand the tool's functionality by enabling it to copy entire files located within a specified folder. Additionally, it will provide filtering options based on file type/extension and size, giving users more granular control over what gets copied.

Prerequisites:

Proposed Features:

  1. Folder Copying: Add a new flag (e.g., -d or --directory) to specify a folder path. Clipper will then copy all files within that folder to the clipboard (or a designated output location).
  2. File Type/Extension Filtering: Implement flags or options to filter files based on their type or extension. For example:
    • -t text or --type text: Copy only text files.
    • -e jpg,png or --extension jpg,png: Copy only JPG and PNG images.
  3. Size Filtering: Add options to filter files based on minimum and maximum size:
    • -min 10KB: Copy only files larger than or equal to 10 kilobytes.
    • -max 1MB: Copy only files smaller than or equal to 1 megabyte.

Additional Considerations:

  • User Interface: Determine the best way to present these new options to the user (e.g., additional flags, subcommands).
  • Clipboard Size Limitations:
    • Windows: No theoretical limit, but practical constraints due to available memory.
    • macOS: No specific limit documented, but large amounts of data may impact performance.
    • Linux (X11): Clipboard managers may have configurable size limits. Investigate using the xclip utility or other clipboard libraries to handle potentially large amounts of file data.
  • Error Handling: Implement robust error handling for invalid folder paths, incorrect filter values, out-of-memory errors, etc.
  • Recursive Copying: Investigate the possibility of adding an option for recursive copying (copying files from subfolders as well).
@supitsdu supitsdu added enhancement New feature requests or enhancements. refactoring Issues or PRs to improving code structure, without changing its external behavior performance Issues or PRs focused on optimizing Go code performance. concurrency labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concurrency enhancement New feature requests or enhancements. performance Issues or PRs focused on optimizing Go code performance. refactoring Issues or PRs to improving code structure, without changing its external behavior
Projects
None yet
Development

No branches or pull requests

1 participant