imgcmprs 0.1.0__tar.gz → 0.1.1__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.
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.4
2
+ Name: imgcmprs
3
+ Version: 0.1.1
4
+ Summary: Fast, safe CLI to compress JPEG & PNG, lossless/lossy, batch or single images.
5
+ Author: Eyad Mohammed
6
+ Requires-Python: >=3.7
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: Pillow
9
+ Dynamic: author
10
+ Dynamic: description
11
+ Dynamic: description-content-type
12
+ Dynamic: requires-dist
13
+ Dynamic: requires-python
14
+ Dynamic: summary
15
+
16
+ # img
17
+
18
+ A fast, easy-to-use Python CLI tool for compressing JPEG and PNG images with both lossless and lossy modes.
19
+
20
+ ---
21
+
22
+ ## Features
23
+ - Compresses images individually or in bulk (folders)
24
+ - Supports JPEG and PNG
25
+ - **Lossless mode** (`-l`): Optimizes files without visible quality loss
26
+ - **Lossy mode** (`-q`): Reduce file size by lowering image quality
27
+ - Recursive directory support
28
+ - Custom output folder
29
+ - Prompts to delete originals after compression
30
+ - Skips replacement if compressed file is larger
31
+ - Cross-platform, requires Python 3.7+
32
+
33
+ ---
34
+
35
+ ## Installation
36
+
37
+ 1. Install Python 3.7+
38
+ 2. Clone this repo and install:
39
+ ```bash
40
+ pip install -e .
41
+ # Or for user-local install:
42
+ pip install --user .
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Usage
48
+
49
+ ### Compress a single image (lossy, 60% quality):
50
+
51
+ ```bash
52
+ img -i myphoto.jpg -q 60
53
+ ```
54
+
55
+ ### Compress a folder (lossless, best for PNG):
56
+
57
+ ```bash
58
+ img -i images/ -o optimized/ -l -r
59
+ ```
60
+
61
+ ### Options (Single-letter flags)
62
+ | Flag | Meaning | Example |
63
+ |------|--------------------------------|---------------------------|
64
+ | -i | Input file or folder (required)| `-i mypic.jpg` |
65
+ | -o | Output file or folder (optional)| `-o compressed/` |
66
+ | -q | JPEG quality (default 60; ignored in lossless mode)| `-q 80` |
67
+ | -l | Use lossless compression | `-l` |
68
+ | -r | Recursively process folders | `-r` |
69
+
70
+ - All flags are **single-letter** for speed and ease: `-i`, `-o`, `-q`, `-l`, `-r`.
71
+ - After compressing, you will be **prompted to delete the original files**.
72
+ - If the compressed file is larger, the original is kept and a warning is printed.
73
+
74
+ ---
75
+
76
+ ## Requirements
77
+ - Python 3.7+
78
+ - Pillow (`pip install Pillow`)
79
+
80
+ ---
81
+
82
+ ## Notes
83
+ - Lossless for PNG is truly lossless; for JPEG, uses `quality=100` with optimizations (minor effect but no further visual loss).
84
+ - Output defaults to `_compressed` directory if not specified for folders.
85
+ - Re-run with `-l` to optimize previously compressed images further (if possible).
86
+
87
+ ---
88
+
89
+ ## Publishing to PyPI
90
+
91
+ 1. **Ensure you have an account on [PyPI](https://pypi.org/).**
92
+ 2. **Install required tools:**
93
+ ```bash
94
+ pip install build twine
95
+ ```
96
+ 3. **Build your package:**
97
+ ```bash
98
+ python -m build
99
+ ```
100
+ This creates a `dist/` folder with your distributable files (tar.gz and .whl).
101
+ 4. **Upload to PyPI:**
102
+ ```bash
103
+ python -m twine upload dist/*
104
+ ```
105
+ 5. **Enter your PyPI credentials when prompted.**
106
+
107
+ ---
108
+
109
+ ## License
110
+ MIT
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.4
2
+ Name: imgcmprs
3
+ Version: 0.1.1
4
+ Summary: Fast, safe CLI to compress JPEG & PNG, lossless/lossy, batch or single images.
5
+ Author: Eyad Mohammed
6
+ Requires-Python: >=3.7
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: Pillow
9
+ Dynamic: author
10
+ Dynamic: description
11
+ Dynamic: description-content-type
12
+ Dynamic: requires-dist
13
+ Dynamic: requires-python
14
+ Dynamic: summary
15
+
16
+ # img
17
+
18
+ A fast, easy-to-use Python CLI tool for compressing JPEG and PNG images with both lossless and lossy modes.
19
+
20
+ ---
21
+
22
+ ## Features
23
+ - Compresses images individually or in bulk (folders)
24
+ - Supports JPEG and PNG
25
+ - **Lossless mode** (`-l`): Optimizes files without visible quality loss
26
+ - **Lossy mode** (`-q`): Reduce file size by lowering image quality
27
+ - Recursive directory support
28
+ - Custom output folder
29
+ - Prompts to delete originals after compression
30
+ - Skips replacement if compressed file is larger
31
+ - Cross-platform, requires Python 3.7+
32
+
33
+ ---
34
+
35
+ ## Installation
36
+
37
+ 1. Install Python 3.7+
38
+ 2. Clone this repo and install:
39
+ ```bash
40
+ pip install -e .
41
+ # Or for user-local install:
42
+ pip install --user .
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Usage
48
+
49
+ ### Compress a single image (lossy, 60% quality):
50
+
51
+ ```bash
52
+ img -i myphoto.jpg -q 60
53
+ ```
54
+
55
+ ### Compress a folder (lossless, best for PNG):
56
+
57
+ ```bash
58
+ img -i images/ -o optimized/ -l -r
59
+ ```
60
+
61
+ ### Options (Single-letter flags)
62
+ | Flag | Meaning | Example |
63
+ |------|--------------------------------|---------------------------|
64
+ | -i | Input file or folder (required)| `-i mypic.jpg` |
65
+ | -o | Output file or folder (optional)| `-o compressed/` |
66
+ | -q | JPEG quality (default 60; ignored in lossless mode)| `-q 80` |
67
+ | -l | Use lossless compression | `-l` |
68
+ | -r | Recursively process folders | `-r` |
69
+
70
+ - All flags are **single-letter** for speed and ease: `-i`, `-o`, `-q`, `-l`, `-r`.
71
+ - After compressing, you will be **prompted to delete the original files**.
72
+ - If the compressed file is larger, the original is kept and a warning is printed.
73
+
74
+ ---
75
+
76
+ ## Requirements
77
+ - Python 3.7+
78
+ - Pillow (`pip install Pillow`)
79
+
80
+ ---
81
+
82
+ ## Notes
83
+ - Lossless for PNG is truly lossless; for JPEG, uses `quality=100` with optimizations (minor effect but no further visual loss).
84
+ - Output defaults to `_compressed` directory if not specified for folders.
85
+ - Re-run with `-l` to optimize previously compressed images further (if possible).
86
+
87
+ ---
88
+
89
+ ## Publishing to PyPI
90
+
91
+ 1. **Ensure you have an account on [PyPI](https://pypi.org/).**
92
+ 2. **Install required tools:**
93
+ ```bash
94
+ pip install build twine
95
+ ```
96
+ 3. **Build your package:**
97
+ ```bash
98
+ python -m build
99
+ ```
100
+ This creates a `dist/` folder with your distributable files (tar.gz and .whl).
101
+ 4. **Upload to PyPI:**
102
+ ```bash
103
+ python -m twine upload dist/*
104
+ ```
105
+ 5. **Enter your PyPI credentials when prompted.**
106
+
107
+ ---
108
+
109
+ ## License
110
+ MIT
@@ -0,0 +1,23 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ setup(
7
+ name='imgcmprs',
8
+ version='0.1.1',
9
+ description='Fast, safe CLI to compress JPEG & PNG, lossless/lossy, batch or single images.',
10
+ long_description=long_description,
11
+ long_description_content_type="text/markdown",
12
+ author='Eyad Mohammed',
13
+ packages=find_packages(),
14
+ install_requires=[
15
+ 'Pillow'
16
+ ],
17
+ entry_points={
18
+ 'console_scripts': [
19
+ 'img=imgcmprs.img_compress:main',
20
+ ],
21
+ },
22
+ python_requires='>=3.7',
23
+ )
imgcmprs-0.1.0/PKG-INFO DELETED
@@ -1,11 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: imgcmprs
3
- Version: 0.1.0
4
- Summary: A CLI tool for compressing images (JPEG, PNG)
5
- Author: Your Name
6
- Requires-Python: >=3.7
7
- Requires-Dist: Pillow
8
- Dynamic: author
9
- Dynamic: requires-dist
10
- Dynamic: requires-python
11
- Dynamic: summary
@@ -1,11 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: imgcmprs
3
- Version: 0.1.0
4
- Summary: A CLI tool for compressing images (JPEG, PNG)
5
- Author: Your Name
6
- Requires-Python: >=3.7
7
- Requires-Dist: Pillow
8
- Dynamic: author
9
- Dynamic: requires-dist
10
- Dynamic: requires-python
11
- Dynamic: summary
imgcmprs-0.1.0/setup.py DELETED
@@ -1,18 +0,0 @@
1
- from setuptools import setup, find_packages
2
-
3
- setup(
4
- name='imgcmprs',
5
- version='0.1.0',
6
- description='A CLI tool for compressing images (JPEG, PNG)',
7
- author='Your Name',
8
- packages=find_packages(),
9
- install_requires=[
10
- 'Pillow'
11
- ],
12
- entry_points={
13
- 'console_scripts': [
14
- 'img=imgcmprs.img_compress:main',
15
- ],
16
- },
17
- python_requires='>=3.7',
18
- )
File without changes
File without changes
File without changes
File without changes