Skip to content

Commit 79af1b3

Browse files
authored
Merge pull request #29 from Daethyra/1.0.0
Project rebrand | Version 1.0.0 - updated project nomenclature - added developer dependencies - updated README
1 parent 99e6f89 commit 79af1b3

9 files changed

Lines changed: 626 additions & 92 deletions

File tree

README.md

Lines changed: 22 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Pillow Image-Format Converter
1+
# transimage - image format conversion
22

33
## Description
4-
`pil_image_converter` is a Python package and CLI tool for converting images between different formats using the Pillow library. It supports conversions between JPG, PNG, BMP, and WebP formats.
4+
`transimage` is a Python package and CLI tool for converting images between different formats using the Pillow library. It supports conversions between JPG, PNG, BMP, and WebP formats.
55

6-
Contributions always welcome!
6+
>> send your PR based god🙏🏻
77
88
## Features
99
- Convert images between JPG, PNG, BMP, and WebP formats
@@ -22,48 +22,21 @@ To set up the development environment:
2222
1. Clone the repository
2323
2. Install PDM if you haven't already: `pip install pdm`
2424
3. Install dependencies: `pdm install`
25-
4. Convert images: `python main.py ./input_image.jpg ./output_image.png png`
25+
4. Convert images: `python src/____main____.py ./input_image.jpg ./output_image.png png`
2626

27-
### Using `main.py` directly as a CLI tool (Recommended)
27+
### Using `____main____.py` directly as a CLI tool (Recommended)
2828

29-
If you've cloned the repository or downloaded the source code, you can use the `main.py` file directly:
29+
Once you've cloned the repository or downloaded the source code, you can use the `__main__.py` file directly by using the following: `python __main__.py <input_path> <output_path> <output_format>`
3030

31-
1. Navigate to the directory containing `main.py`
32-
2. Run the following command:
33-
34-
`python main.py <input_path> <output_path> <output_format>`
35-
36-
Example:
37-
38-
`python main.py ./input_image.jpg ./output_image.png png`
39-
40-
For batch conversion:
41-
42-
`python main.py ./input_directory ./output_directory png`
43-
44-
**Note:** You should use quotations for paths containing spaces.
45-
-> Ex.: `python main.py "./input directory" "./output directory" jpg`
46-
47-
48-
### Using the pil_image_converter package
49-
50-
You can use the pil_image_converter package directly from the command line:
51-
52-
`python -m pil_image_converter <input_path> <output_path> <output_format>`
31+
**Input target may be a single file or directory.**
5332

5433
- `<input_path>`: Path to the input image file or directory
5534
- `<output_path>`: Path to save the converted image(s)
5635
- `<output_format>`: Desired output format (jpg, png, bmp, or webp)
5736

58-
Example:
59-
60-
`python -m pil_image_converter ./input_image.jpg ./output_image.png png`
61-
62-
For batch conversion, provide a directory as the input path:
37+
### Using the transimage package in your own projects
6338

64-
`python -m pil_image_converter ./input_directory ./output_directory png`
65-
66-
### Using pil_image_converter in your own projects
39+
You may test the transimage package is properly installed by running it directly from the command line: `python -m transimage <input_path> <output_path> <output_format>`
6740

6841
1. First, ensure you're working within a virtual environment with PDM:
6942

@@ -72,7 +45,7 @@ For batch conversion, provide a directory as the input path:
7245
2. In your Python script, import the necessary functions:
7346

7447
```python
75-
from pil_image_converter import collect_images, ImageConverter
48+
from transimage import collect_images, ImageConverter
7649
```
7750

7851
To convert a single image, use the ImageConverter class directly:
@@ -85,7 +58,7 @@ converter.convert()
8558
For batch conversion, you can pass in directories as arguments instead of individual image paths. Then, use the collect_images function and loop through the results:
8659

8760
```python
88-
from pil_image_converter import collect_images, ImageConverter
61+
from transimage import collect_images, ImageConverter
8962

9063
input_directory = 'path/to/input/directory'
9164
output_directory = 'path/to/output/directory'
@@ -103,5 +76,15 @@ for input_path in image_files:
10376
## License
10477
This project is licensed under the MIT License. See the LICENSE file for details.
10578

79+
## Contributing
80+
Like I said, send your PR. Based. God.
81+
82+
### Set up
83+
1. Install the developer dependencies: `pdm install -G dev`
84+
2. Add your changes
85+
3. Test your code(`pdm run pytest tests/`)
86+
4. Iterate, repeat until finished.
87+
5. Run the `all` script to lint and format the code: `pdm run all`
88+
10689
## Version
107-
3.0.0
90+
1.0.0

0 commit comments

Comments
 (0)