imgbytesizer 0.2.3__tar.gz → 0.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {imgbytesizer-0.2.3 → imgbytesizer-0.2.5}/PKG-INFO +26 -12
- {imgbytesizer-0.2.3 → imgbytesizer-0.2.5}/README.md +10 -4
- imgbytesizer-0.2.5/pyproject.toml +40 -0
- {imgbytesizer-0.2.3 → imgbytesizer-0.2.5/src}/imgbytesizer/__init__.py +1 -1
- {imgbytesizer-0.2.3 → imgbytesizer-0.2.5/src}/imgbytesizer/logger.py +1 -1
- {imgbytesizer-0.2.3 → imgbytesizer-0.2.5/src}/imgbytesizer/main.py +2 -2
- imgbytesizer-0.2.5/src/imgbytesizer/py.typed +1 -0
- {imgbytesizer-0.2.3 → imgbytesizer-0.2.5/src}/imgbytesizer/resizer.py +250 -209
- imgbytesizer-0.2.3/imgbytesizer.egg-info/PKG-INFO +0 -191
- imgbytesizer-0.2.3/imgbytesizer.egg-info/SOURCES.txt +0 -20
- imgbytesizer-0.2.3/imgbytesizer.egg-info/dependency_links.txt +0 -1
- imgbytesizer-0.2.3/imgbytesizer.egg-info/entry_points.txt +0 -2
- imgbytesizer-0.2.3/imgbytesizer.egg-info/requires.txt +0 -2
- imgbytesizer-0.2.3/imgbytesizer.egg-info/top_level.txt +0 -1
- imgbytesizer-0.2.3/pyproject.toml +0 -16
- imgbytesizer-0.2.3/setup.cfg +0 -4
- imgbytesizer-0.2.3/tests/test_formatter.py +0 -12
- imgbytesizer-0.2.3/tests/test_logger.py +0 -48
- imgbytesizer-0.2.3/tests/test_main.py +0 -128
- imgbytesizer-0.2.3/tests/test_resizer.py +0 -291
- imgbytesizer-0.2.3/tests/test_utils.py +0 -99
- {imgbytesizer-0.2.3 → imgbytesizer-0.2.5}/LICENSE +0 -0
- {imgbytesizer-0.2.3 → imgbytesizer-0.2.5/src}/imgbytesizer/formatter.py +0 -0
- {imgbytesizer-0.2.3 → imgbytesizer-0.2.5/src}/imgbytesizer/utils.py +0 -0
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: imgbytesizer
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: A CLI tool to resize images to a target file size.
|
|
5
|
-
|
|
6
|
-
License: MIT License
|
|
5
|
+
License: MIT
|
|
7
6
|
Keywords: image,resize,compression,cli,optimize
|
|
7
|
+
Author: pyyupsk
|
|
8
|
+
Author-email: contact@fasu.dev
|
|
8
9
|
Requires-Python: >=3.9
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Requires-Dist: pillow (>=11.2.1,<12.0.0)
|
|
18
|
+
Requires-Dist: pyfiglet (>=1.0.2,<2.0.0)
|
|
19
|
+
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
9
20
|
Description-Content-Type: text/markdown
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Requires-Dist: Pillow>=11.0.0
|
|
12
|
-
Requires-Dist: tabulate>=0.9.0
|
|
13
|
-
Dynamic: license-file
|
|
14
21
|
|
|
15
22
|
# ImgByteSizer
|
|
16
23
|
|
|
17
24
|
[](https://pypi.org/project/imgbytesizer/)
|
|
18
25
|
[](https://pepy.tech/projects/imgbytesizer)
|
|
19
26
|
[](https://codecov.io/gh/pyyupsk/imgbytesizer)
|
|
27
|
+
[](https://sonarcloud.io/summary/new_code?id=pyyupsk_imgbytesizer)
|
|
20
28
|
|
|
21
29
|
ImgByteSizer is a command-line tool that precisely resizes and optimizes images to match a specific file size while maintaining the best possible quality.
|
|
22
30
|
|
|
@@ -177,10 +185,15 @@ imgbytesizer profile_pic.jpg 400KB --min-dimension 400
|
|
|
177
185
|
|
|
178
186
|
## Requirements
|
|
179
187
|
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
188
|
+
```toml
|
|
189
|
+
requires-python = ">=3.9"
|
|
190
|
+
|
|
191
|
+
dependencies = [
|
|
192
|
+
"pillow (>=11.2.1,<12.0.0)",
|
|
193
|
+
"pyfiglet (>=1.0.2,<2.0.0)",
|
|
194
|
+
"tabulate (>=0.9.0,<0.10.0)",
|
|
195
|
+
]
|
|
196
|
+
```
|
|
184
197
|
|
|
185
198
|
## Contributing
|
|
186
199
|
|
|
@@ -189,3 +202,4 @@ Contributions are welcome! Feel free to submit issues or pull requests.
|
|
|
189
202
|
## License
|
|
190
203
|
|
|
191
204
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
205
|
+
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://pypi.org/project/imgbytesizer/)
|
|
4
4
|
[](https://pepy.tech/projects/imgbytesizer)
|
|
5
5
|
[](https://codecov.io/gh/pyyupsk/imgbytesizer)
|
|
6
|
+
[](https://sonarcloud.io/summary/new_code?id=pyyupsk_imgbytesizer)
|
|
6
7
|
|
|
7
8
|
ImgByteSizer is a command-line tool that precisely resizes and optimizes images to match a specific file size while maintaining the best possible quality.
|
|
8
9
|
|
|
@@ -163,10 +164,15 @@ imgbytesizer profile_pic.jpg 400KB --min-dimension 400
|
|
|
163
164
|
|
|
164
165
|
## Requirements
|
|
165
166
|
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
```toml
|
|
168
|
+
requires-python = ">=3.9"
|
|
169
|
+
|
|
170
|
+
dependencies = [
|
|
171
|
+
"pillow (>=11.2.1,<12.0.0)",
|
|
172
|
+
"pyfiglet (>=1.0.2,<2.0.0)",
|
|
173
|
+
"tabulate (>=0.9.0,<0.10.0)",
|
|
174
|
+
]
|
|
175
|
+
```
|
|
170
176
|
|
|
171
177
|
## Contributing
|
|
172
178
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "imgbytesizer"
|
|
3
|
+
version = "0.2.5"
|
|
4
|
+
description = "A CLI tool to resize images to a target file size."
|
|
5
|
+
keywords = ["image", "resize", "compression", "cli", "optimize"]
|
|
6
|
+
|
|
7
|
+
authors = [{ name = "pyyupsk", email = "contact@fasu.dev" }]
|
|
8
|
+
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT License" }
|
|
11
|
+
|
|
12
|
+
requires-python = ">=3.9"
|
|
13
|
+
|
|
14
|
+
dependencies = [
|
|
15
|
+
"pillow (>=11.2.1,<12.0.0)",
|
|
16
|
+
"pyfiglet (>=1.0.2,<2.0.0)",
|
|
17
|
+
"tabulate (>=0.9.0,<0.10.0)",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
imgbytesizer = "imgbytesizer.main:main"
|
|
22
|
+
|
|
23
|
+
[tool.poetry]
|
|
24
|
+
packages = [{ include = "imgbytesizer", from = "src" }]
|
|
25
|
+
|
|
26
|
+
[tool.poetry.group.dev.dependencies]
|
|
27
|
+
flake8 = "^7.2.0"
|
|
28
|
+
pytest = "^8.3.5"
|
|
29
|
+
pytest-cov = "^6.1.1"
|
|
30
|
+
requests = "^2.32.3"
|
|
31
|
+
types-requests = "^2.32.0.20250515"
|
|
32
|
+
tomli = "^2.2.1"
|
|
33
|
+
types-tabulate = "^0.9.0.20241207"
|
|
34
|
+
vulture = "^2.14"
|
|
35
|
+
yapf = "^0.43.0"
|
|
36
|
+
tox = "^4.26.0"
|
|
37
|
+
|
|
38
|
+
[build-system]
|
|
39
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|
40
|
+
build-backend = "poetry.core.masonry.api"
|
|
@@ -13,7 +13,7 @@ from .logger import setup_logger
|
|
|
13
13
|
from .resizer import resize_to_target_filesize
|
|
14
14
|
from .utils import IMG_FORMATS, parse_filesize
|
|
15
15
|
|
|
16
|
-
f: Figlet = Figlet(font=
|
|
16
|
+
f: Figlet = Figlet(font="slant")
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
def main() -> int:
|
|
@@ -21,7 +21,7 @@ def main() -> int:
|
|
|
21
21
|
# Setup logger
|
|
22
22
|
logger: logging.Logger = setup_logger()
|
|
23
23
|
|
|
24
|
-
print(f.renderText(
|
|
24
|
+
print(f.renderText("ImgByteSizer"))
|
|
25
25
|
|
|
26
26
|
parser: argparse.ArgumentParser = argparse.ArgumentParser(
|
|
27
27
|
description="Resize an image to match a target file size",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|