resizer-cli
Description
resizer-cli
is a command-line interface (CLI) tool that utilizes FFMPEG to resize all images in a specified folder.
Installation
You can easily install resizer-cli
using npm:
npm install resizer-cli
CLI Options
-
-h, --help
: Display help information. -
-s, --scale <integer>
: Set the width of resized images in pixels (default = 20). -
-d, --docker
: Run the CLI tool virtually in a Docker container.
How it Works
Option 1: Run FFMPEG Locally
If you prefer to run FFMPEG locally, follow these steps:
-
Install FFMPEG locally
-
For macOS users, you can use Homebrew:
brew install ffmpeg
-
For linux users, use your preferred package manager
-
-
In the root directory of your project, run the following command, replacing
<path_to_image_folder>
with the actual path to your image folder:npx resizer-cli <path_to_image_folder>
Option 2: Run FFMPEG Virtually
If you do not want to install FFMPEG locally, you can use the -d
flag to run the CLI tool virtually in a Docker container. Follow these steps:
-
Ensure Docker Desktop is installed:
- Mac: Install Docker Desktop
- Windows: Install Docker Desktop
- Linux: Install Docker Desktop
-
In the root directory of your project, run the following command, replacing
<path_to_image_folder>
with the actual path to your image folder:npx resizer-cli <path_to_image_folder> -d
Contributing
I welcome contributions from the community! If you'd like to contribute to resizer-cli
, please follow these guidelines:
-
Fork the repository and clone it locally.
-
Create a new branch for your feature or bug fix.
-
Make your changes and test them thoroughly.
-
Ensure your code follows the project's coding style.
-
Submit a pull request with a clear description of your changes.
License
This project is licensed under the MIT License.