fotolab 0.9.0__tar.gz → 0.13.0__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.
Files changed (39) hide show
  1. {fotolab-0.9.0 → fotolab-0.13.0}/.pre-commit-config.yaml +3 -3
  2. {fotolab-0.9.0 → fotolab-0.13.0}/CHANGELOG.md +63 -0
  3. {fotolab-0.9.0 → fotolab-0.13.0}/PKG-INFO +105 -18
  4. {fotolab-0.9.0 → fotolab-0.13.0}/Pipfile.lock +285 -259
  5. {fotolab-0.9.0 → fotolab-0.13.0}/README.md +104 -17
  6. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/__init__.py +31 -1
  7. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/auto.py +5 -2
  8. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/border.py +29 -37
  9. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/cli.py +5 -1
  10. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/contrast.py +10 -17
  11. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/env.py +3 -1
  12. fotolab-0.13.0/fotolab/info.py +58 -0
  13. fotolab-0.13.0/fotolab/montage.py +71 -0
  14. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/resize.py +12 -20
  15. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/sharpen.py +13 -22
  16. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/watermark.py +47 -38
  17. {fotolab-0.9.0 → fotolab-0.13.0}/.coveragerc +0 -0
  18. {fotolab-0.9.0 → fotolab-0.13.0}/.gitignore +0 -0
  19. {fotolab-0.9.0 → fotolab-0.13.0}/.python-version +0 -0
  20. {fotolab-0.9.0 → fotolab-0.13.0}/CONTRIBUTING.md +0 -0
  21. {fotolab-0.9.0 → fotolab-0.13.0}/LICENSE.md +0 -0
  22. {fotolab-0.9.0 → fotolab-0.13.0}/Pipfile +0 -0
  23. {fotolab-0.9.0 → fotolab-0.13.0}/docs/Makefile +0 -0
  24. {fotolab-0.9.0 → fotolab-0.13.0}/docs/make.bat +0 -0
  25. {fotolab-0.9.0 → fotolab-0.13.0}/docs/source/CHANGELOG.md +0 -0
  26. {fotolab-0.9.0 → fotolab-0.13.0}/docs/source/CONTRIBUTING.md +0 -0
  27. {fotolab-0.9.0 → fotolab-0.13.0}/docs/source/LICENSE.md +0 -0
  28. {fotolab-0.9.0 → fotolab-0.13.0}/docs/source/README.md +0 -0
  29. {fotolab-0.9.0 → fotolab-0.13.0}/docs/source/_static/logo.jpg +0 -0
  30. {fotolab-0.9.0 → fotolab-0.13.0}/docs/source/conf.py +0 -0
  31. {fotolab-0.9.0 → fotolab-0.13.0}/docs/source/index.rst +0 -0
  32. {fotolab-0.9.0 → fotolab-0.13.0}/fotolab/__main__.py +0 -0
  33. {fotolab-0.9.0 → fotolab-0.13.0}/pyproject.toml +0 -0
  34. {fotolab-0.9.0 → fotolab-0.13.0}/tests/__init__.py +0 -0
  35. {fotolab-0.9.0 → fotolab-0.13.0}/tests/conftest.py +0 -0
  36. {fotolab-0.9.0 → fotolab-0.13.0}/tests/test_env.py +0 -0
  37. {fotolab-0.9.0 → fotolab-0.13.0}/tests/test_help_flag.py +0 -0
  38. {fotolab-0.9.0 → fotolab-0.13.0}/tests/test_quiet_flag.py +0 -0
  39. {fotolab-0.9.0 → fotolab-0.13.0}/tox.ini +0 -0
@@ -2,7 +2,7 @@
2
2
  # See https://pre-commit.com/hooks.html for more hooks
3
3
  repos:
4
4
  - repo: https://github.com/pre-commit/pre-commit-hooks
5
- rev: v4.5.0
5
+ rev: v4.6.0
6
6
  hooks:
7
7
  - id: check-case-conflict
8
8
  - id: check-merge-conflict
@@ -45,7 +45,7 @@ repos:
45
45
  - --py=312
46
46
 
47
47
  - repo: https://github.com/psf/black
48
- rev: 24.3.0
48
+ rev: 24.4.0
49
49
  hooks:
50
50
  - id: black
51
51
  language_version: python3.12
@@ -104,7 +104,7 @@ repos:
104
104
  - fotolab
105
105
  - tests
106
106
  - --unsafe-load-any-extension=y
107
- - --disable=R0801
107
+ - --disable=R0801,W0212
108
108
 
109
109
  - repo: https://github.com/pre-commit/mirrors-mypy
110
110
  rev: v1.9.0
@@ -7,6 +7,69 @@ and this project adheres to [0-based versioning](https://0ver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## v0.13.0 (2024-04-21)
11
+
12
+ ### Changed
13
+
14
+ - Bump deps
15
+ - Support processing multiple images at once
16
+ - Update missing help message in readme
17
+
18
+ ## v0.12.0 (2024-04-14)
19
+
20
+ ### Added
21
+
22
+ - Add `-pd` or `--padding` option to set the padding of watermark text block
23
+
24
+ ### Changed
25
+
26
+ - Bump deps, `pre-commit` hooks, and Python versions for `pyenv`
27
+
28
+ ### Fixed
29
+
30
+ - Fix `auto` subcommand missing `padding` field
31
+ - Fix missing closing parenthesis in help message
32
+ - Update missing subcommand help message in README
33
+
34
+ ## v0.11.0 (2024-04-07)
35
+
36
+ ### Added
37
+
38
+ - Add `montage` subcommand to join multiple images
39
+
40
+ ### Changed
41
+
42
+ - Bump deps
43
+ - Update missing subcommand help message in README
44
+
45
+ ## v0.10.0 (2024-03-31)
46
+
47
+ ### Added
48
+
49
+ - Add `info` subcommand to show EXIF data from image
50
+
51
+ ### Changed
52
+
53
+ - Bump deps
54
+ - Update help message in README
55
+ - Ignore `pylint` W0212 rule
56
+
57
+ ### Fix
58
+
59
+ - Fix incorrect action in log when running `auto` subcommand
60
+ - Update incorrect comment for `save_image` helper function
61
+
62
+ ## v0.9.1 (2024-03-24)
63
+
64
+ ### Changed
65
+
66
+ - Implement open image using the default program
67
+ - Refactor all subcommand to use `save_image` global helper function
68
+
69
+ ### Fixed
70
+
71
+ - Fix newline in `sys.version` output in Python 3.8
72
+
10
73
  ## v0.9.0 (2024-03-17)
11
74
 
12
75
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fotolab
3
- Version: 0.9.0
3
+ Version: 0.13.0
4
4
  Summary: A console program that manipulate images.
5
5
  Keywords: photography,photo
6
6
  Author-email: Kian-Meng Ang <kianmeng@cpan.org>
@@ -57,9 +57,9 @@ fotolab -h
57
57
  ```
58
58
 
59
59
  ```console
60
-
61
60
  usage: fotolab [-h] [-o] [-op] [-od OUTPUT_DIR] [-q] [-d] [-V]
62
- {auto,border,contrast,resize,sharpen,watermark,env} ...
61
+ {auto,border,contrast,info,resize,montage,sharpen,watermark,env}
62
+ ...
63
63
 
64
64
  A console program to manipulate photos.
65
65
 
@@ -68,12 +68,14 @@ A console program to manipulate photos.
68
68
  issues: https://github.com/kianmeng/fotolab/issues
69
69
 
70
70
  positional arguments:
71
- {auto,border,contrast,resize,sharpen,watermark,env}
71
+ {auto,border,contrast,info,resize,montage,sharpen,watermark,env}
72
72
  sub-command help
73
73
  auto auto adjust (resize, contrast, and watermark) a photo
74
74
  border add border to image
75
75
  contrast contrast an image
76
+ info info an image
76
77
  resize resize an image
78
+ montage montage a list of image
77
79
  sharpen sharpen an image
78
80
  watermark watermark an image
79
81
  env print environment information for bug reporting
@@ -81,7 +83,7 @@ positional arguments:
81
83
  optional arguments:
82
84
  -h, --help show this help message and exit
83
85
  -o, --overwrite overwrite existing image
84
- -op, --open open the image using default program (default: 'False'
86
+ -op, --open open the image using default program (default: 'False')
85
87
  -od OUTPUT_DIR, --output-dir OUTPUT_DIR
86
88
  set default output folder (default: 'output')
87
89
  -q, --quiet suppress all logging
@@ -89,6 +91,22 @@ optional arguments:
89
91
  -V, --version show program's version number and exit
90
92
  ```
91
93
 
94
+ ### fotolab auto
95
+
96
+ ```console
97
+ fotolab auto -h
98
+ ```
99
+
100
+ ```console
101
+ usage: fotolab auto [-h] IMAGE_FILENAMES [IMAGE_FILENAMES ...]
102
+
103
+ positional arguments:
104
+ IMAGE_FILENAMES set the image filename
105
+
106
+ optional arguments:
107
+ -h, --help show this help message and exit
108
+ ```
109
+
92
110
  ### fotolab border
93
111
 
94
112
  ```console
@@ -98,12 +116,12 @@ fotolab border -h
98
116
  ```console
99
117
  usage: fotolab border [-h] [-c COLOR] [-w WIDTH] [-wt WIDTH] [-wr WIDTH]
100
118
  [-wb WIDTH] [-wl WIDTH]
101
- IMAGE_FILENAME
119
+ IMAGE_FILENAMES [IMAGE_FILENAMES ...]
102
120
 
103
121
  positional arguments:
104
- IMAGE_FILENAME set the image filename
122
+ IMAGE_FILENAMES set the image filenames
105
123
 
106
- options:
124
+ optional arguments:
107
125
  -h, --help show this help message and exit
108
126
  -c COLOR, --color COLOR
109
127
  set the color of border (default: 'black')
@@ -126,7 +144,26 @@ fotolab contrast -h
126
144
  ```
127
145
 
128
146
  ```console
129
- usage: fotolab contrast [-h] IMAGE_FILENAME
147
+ usage: fotolab contrast [-h] [-c CUTOFF] IMAGE_FILENAMES [IMAGE_FILENAMES ...]
148
+
149
+ positional arguments:
150
+ IMAGE_FILENAMES set the image filename
151
+
152
+ optional arguments:
153
+ -h, --help show this help message and exit
154
+ -c CUTOFF, --cutoff CUTOFF
155
+ set the percentage of lightest or darkest pixels to
156
+ discard from histogram (default: '1')
157
+ ```
158
+
159
+ ### fotolab info
160
+
161
+ ```console
162
+ fotolab info -h
163
+ ```
164
+
165
+ ```console
166
+ usage: fotolab info [-h] IMAGE_FILENAME
130
167
 
131
168
  positional arguments:
132
169
  IMAGE_FILENAME set the image filename
@@ -135,6 +172,44 @@ optional arguments:
135
172
  -h, --help show this help message and exit
136
173
  ```
137
174
 
175
+ ### fotolab montage
176
+
177
+ ```console
178
+ fotolab montage -h
179
+ ```
180
+
181
+ ```console
182
+
183
+ usage: fotolab montage [-h] IMAGE_FILENAMES [IMAGE_FILENAMES ...]
184
+
185
+ positional arguments:
186
+ IMAGE_FILENAMES set the image filenames
187
+
188
+ optional arguments:
189
+ -h, --help show this help message and exit
190
+ ```
191
+
192
+ ### fotolab resize
193
+
194
+ ```console
195
+ fotolab resize -h
196
+ ```
197
+
198
+ ```console
199
+ usage: fotolab resize [-h] [-wh WIDTH] [-ht HEIGHT]
200
+ IMAGE_FILENAMES [IMAGE_FILENAMES ...]
201
+
202
+ positional arguments:
203
+ IMAGE_FILENAMES set the image filename
204
+
205
+ optional arguments:
206
+ -h, --help show this help message and exit
207
+ -wh WIDTH, --width WIDTH
208
+ set the width of the image (default: '600')
209
+ -ht HEIGHT, --height HEIGHT
210
+ set the height of the image (default: '277')
211
+ ```
212
+
138
213
  ### fotolab sharpen
139
214
 
140
215
  ```console
@@ -142,13 +217,22 @@ fotolab sharpen -h
142
217
  ```
143
218
 
144
219
  ```console
145
- usage: fotolab sharpen [-h] IMAGE_FILENAME
220
+ usage: fotolab sharpen [-h] [-r RADIUS] [-p PERCENT] [-t THRESHOLD]
221
+ IMAGE_FILENAMES [IMAGE_FILENAMES ...]
146
222
 
147
223
  positional arguments:
148
- IMAGE_FILENAME set the image filename
224
+ IMAGE_FILENAMES set the image filenames
149
225
 
150
- options:
151
- -h, --help show this help message and exit
226
+ optional arguments:
227
+ -h, --help show this help message and exit
228
+ -r RADIUS, --radius RADIUS
229
+ set the radius or size of edges (default: '1')
230
+ -p PERCENT, --percent PERCENT
231
+ set the amount of overall strength of sharpening
232
+ effect (default: '100')
233
+ -t THRESHOLD, --threshold THRESHOLD
234
+ set the minimum brightness changed to be sharpened
235
+ (default: '3')
152
236
  ```
153
237
 
154
238
  ### fotolab watermark
@@ -160,20 +244,23 @@ fotolab watermark -h
160
244
  ```console
161
245
  usage: fotolab watermark [-h] [-t WATERMARK_TEXT]
162
246
  [-p {top-left,top-right,bottom-left,bottom-right}]
163
- [-fs FONT_SIZE] [-fc FONT_COLOR] [-ow OUTLINE_WIDTH]
164
- [-oc OUTLINE_COLOR]
165
- IMAGE_FILENAME
247
+ [-pd PADDING] [-fs FONT_SIZE] [-fc FONT_COLOR]
248
+ [-ow OUTLINE_WIDTH] [-oc OUTLINE_COLOR]
249
+ IMAGE_FILENAMES [IMAGE_FILENAMES ...]
166
250
 
167
251
  positional arguments:
168
- IMAGE_FILENAME set the image filename
252
+ IMAGE_FILENAMES set the image filenames
169
253
 
170
- options:
254
+ optional arguments:
171
255
  -h, --help show this help message and exit
172
256
  -t WATERMARK_TEXT, --text WATERMARK_TEXT
173
257
  set the watermark text (default: 'kianmeng.org')
174
258
  -p {top-left,top-right,bottom-left,bottom-right}, --position {top-left,top-right,bottom-left,bottom-right}
175
259
  set position of the watermark text (default: 'bottom-
176
260
  left')
261
+ -pd PADDING, --padding PADDING
262
+ set the padding of the watermark text relative to the
263
+ image (default: '15')
177
264
  -fs FONT_SIZE, --font-size FONT_SIZE
178
265
  set the font size of watermark text (default: '12')
179
266
  -fc FONT_COLOR, --font-color FONT_COLOR