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