-
Notifications
You must be signed in to change notification settings - Fork 0
Improve overall code quality and add features #7
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This update introduces a modular CLI structure that allows users to generate QR codes, run Lua scripts, and save settings through subcommands. The configuration handling has been improved to support both file and stdin input, allowing users to use piping. Summary of changes: - Add support for reading configuration from stdin - Implement `async_save_image` for non-blocking image saving - Improve logging for better debugging and user feedback - Refactor CLI argument parsing to use subcommands - Enhance documentation for configuration functions - Remove deprecated test cases and clean up code
Move SUPPORTED_FORMATS constant to module scope in `image_ops.rs` to avoid redefining it within `save_image`, and replace `PathBuf` with `Path` for cleaner and more idiomatic API design. This improves consistency across the module and simplifies path handling. Simplify the CLI `about` text in `main.rs` to make the tool’s purpose clearer and reduce verbosity in help messages. Add minor formatting polish in `qr_generator.rs` for readability by adding a blank line after QR code rendering.
- Replace the email address with the Matrix handle `@winlogon.exe:matrix.org` in CODE_OF_CONDUCT.md. - Remove the redundant `std::io` import and use a direct `io::Error` alias in error.rs
- Introduce FileExists variant in Error enum with proper error message - Extende save_image signature to accept an overwrite flag - Change save_image to return Error::FileExists with already-existing files - Update logging statements to use display() and interpolated strings for clearer output - Add overwrite CLI option (--overwrite) to `Generate` command and propagated it through QrCodeOptions - Adjust QrCodeOptions struct to include overwrite - Refactor imports and minor formatting improvements across modules
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Batch generation (Makes it practical for admins; not intended)