A command-line tool to add watermarks to images, supporting various formats including WebP.
You can install watermark-cli using pip:
pip install git+https://github.com/ShinChven/watermark-cli.git
You can upgrade watermark-cli using pip:
pip install --upgrade git+https://github.com/ShinChven/watermark-cli.git
After installation, you can use the watermark
command from your terminal:
watermark [source] [--text WATERMARK_TEXT]
source
: The path to an image file or a directory containing image files.--text
: (Optional) The text to use as a watermark. Default is "@ShinChven".
The tool supports the following image formats:
- PNG
- JPEG
- WebP
- TIFF
- BMP
- GIF
-
Add a watermark to a single image:
watermark path/to/image.jpg
-
Add a custom watermark to a single image:
watermark path/to/image.webp --text "My Watermark"
-
Add watermarks to all supported images in a directory:
watermark path/to/image/directory
The watermarked images will be saved in a new directory named watermark_images
in the same location as the source. The output format will match the input format.
To set up the development environment:
-
Clone the repository:
git clone https://github.com/ShinChven/watermark-cli.git cd watermark-cli
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the package in editable mode:
pip install -e .
Now you can make changes to the code and test them immediately using the watermark
command.
This project is licensed under the MIT License.