-
Notifications
You must be signed in to change notification settings - Fork 10
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
Major update (v5) #177
Merged
Merged
Major update (v5) #177
Conversation
This file contains 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
Removed deprecated code and improved the YAML parser for better error handling and performance. This includes restructuring the parsing logic and enhancing the error reporting mechanism to provide clearer feedback on parsing issues. - Consolidated error handling for various parsing scenarios - Improved token management and state transitions in the parser - Enhanced support for YAML directives and comments handling
Introduced a Dockerfile to facilitate the building and running of the tinifier application in a containerized environment. The Dockerfile includes multi-stage builds for compiling the Go application and preparing a minimal runtime image. Additionally, a .dockerignore file was created to exclude unnecessary files from the Docker context, optimizing the build process.
Added a new options struct to allow configuration of pipeline behavior, including maximum parallel processing, retry attempts, and error thresholds for cancellation. This enhances flexibility and control over pipeline execution, improving error handling and concurrency management. - Implemented Apply method for options struct - Added functions to set options: WithMaxParallel, WithRetryAttempts, WithMaxErrorsToStop - Updated ThreeSteps function to utilize new options for better configurability
Introduced a new options structure to manage configuration for the CLI application. This includes flags for API keys, file extensions, thread count, error handling, and more. The changes enhance user flexibility and allow for better customization of the file processing behavior. - Added command-line flags for configuration - Implemented validation for user inputs - Integrated configuration file loading for default settings
Added a new package for file filtering that allows users to filter files by their extensions, supporting both case-sensitive and case-insensitive options. Implemented functionality to retrieve files from specified directories, with support for recursive searching. This enhances the application's ability to process files based on user-defined criteria. - Introduced `FilterByExt` function for filtering files - Added `Files` function for directory traversal - Included tests to ensure correct functionality of file filtering and retrieval
…lity Updated the ThreeSteps function to accept iter.Seq instead of a slice for input values, enhancing flexibility in input handling. Adjusted related test cases to utilize slices.Values for compatibility with the new input type. This change aims to improve the pipeline's adaptability to different input structures.
Enhanced comments in the pipeline code to clarify the purpose and functionality of key components. This includes detailed descriptions for error handling, configuration options, and the execution flow of the ThreeSteps function. Improved documentation aims to facilitate better understanding and maintainability of the code.
Modified the `run` method in the CLI application to accept file paths as arguments, enhancing its functionality for file processing. Updated related comments for clarity and removed unused code to streamline the implementation.
Updated the run method to process files concurrently using a pool of TinyPNG clients. Implemented error handling to stop processing based on a configurable maximum error threshold. Added retry logic for file uploads and downloads, improving robustness and user experience. Enhanced file filtering capabilities to support additional formats.
Implemented new features for file size comparison during compression, allowing users to skip files based on size differences. Enhanced logging to provide detailed progress updates and error messages, improving user experience and debugging capabilities.
Introduced new command-line options for configuring retry attempts and delay between retries during file uploads and downloads. This enhances the robustness of the file processing by allowing users to customize error handling and improve success rates in unstable network conditions. - Added flags for retry attempts and delay between retries - Updated README with new options and their defaults - Enhanced logging to provide better feedback during compression processes
Updated the README to include a comprehensive features list, installation instructions, configuration options, and usage examples for the `tinifier` CLI tool. This improves user understanding and accessibility of the tool's capabilities. Added a demo GIF and a section on how to record a demo for better visual guidance.
Changed the linter prefix in the golangci configuration from 'describe-commit' to 'tinifier' to align with the project's current naming conventions. This update ensures consistency in linting across the codebase. - Updated linter prefix for clarity - Maintained existing linter settings and configurations
Implemented build steps for the application and Docker image in the GitHub Actions workflow. This enhances the CI pipeline by automating the build process for multiple OS and architecture combinations, ensuring consistent builds and easier deployment.
Created new workflows for documentation updates and automated release processes. The documentation workflow triggers on changes to the README.md file, while the release workflow handles versioning, building, and packaging for multiple platforms. This enhances CI/CD efficiency and ensures consistent deployment practices.
Added detailed installation instructions for Debian/Ubuntu, RedHat, Alpine Linux, AUR, and binary installations in the README. This enhances user experience by providing clear guidance on how to set up the CLI tool across different environments.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🚀 Features
--retry-attempts
and--delay-between-retries
are now available for fine-tuning retry attempts in case of errors--skip-if-diff-less
feature allows skipping file replacements with compressed content if the difference between the compressed and original versions is less than the percentage defined by this flag--preserve-time
feature improves the preservation of file creation timestamps, which can be especially useful when compressing photos from your smartphone and wanting to maintain their original order by creation date/timeOther Changes
tinifier compress
, simply usetinifier
)--api-key
usages—just use--api-key "key1,key2,..."