fotolab 0.31.14__py3-none-any.whl → 0.31.16__py3-none-any.whl

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.
fotolab/__init__.py CHANGED
@@ -20,12 +20,11 @@ import logging
20
20
  import os
21
21
  import subprocess
22
22
  import sys
23
- from importlib import metadata
24
23
  from pathlib import Path
25
24
 
26
25
  from PIL import Image
27
26
 
28
- __version__ = metadata.version("fotolab")
27
+ __version__ = "0.31.15"
29
28
 
30
29
  log = logging.getLogger(__name__)
31
30
 
@@ -18,6 +18,7 @@
18
18
  import argparse
19
19
  import logging
20
20
  from pathlib import Path
21
+ from contextlib import ExitStack
21
22
 
22
23
  from PIL import Image
23
24
 
@@ -150,14 +151,13 @@ def run(args: argparse.Namespace) -> None:
150
151
  log.debug(args)
151
152
 
152
153
  first_image_filepath = args.image_filenames[0]
153
- main_frame = None
154
154
  other_frames = []
155
155
 
156
- try:
157
- main_frame = Image.open(first_image_filepath)
156
+ with ExitStack() as stack:
157
+ main_frame = stack.enter_context(Image.open(first_image_filepath))
158
158
 
159
159
  for image_filename in args.image_filenames[1:]:
160
- img = Image.open(image_filename)
160
+ img = stack.enter_context(Image.open(image_filename))
161
161
  other_frames.append(img)
162
162
 
163
163
  image_file = Path(first_image_filepath)
@@ -188,11 +188,6 @@ def run(args: argparse.Namespace) -> None:
188
188
  save_kwargs["method"] = args.webp_method
189
189
 
190
190
  main_frame.save(new_filename, **save_kwargs)
191
- finally:
192
- if main_frame:
193
- main_frame.close()
194
- for frame in other_frames:
195
- frame.close()
196
191
 
197
192
  if args.open:
198
193
  _open_image(new_filename)
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fotolab
3
- Version: 0.31.14
4
- Summary: A console program that manipulate images.
5
- Keywords: photography,photo
3
+ Version: 0.31.16
6
4
  Author-email: Kian-Meng Ang <kianmeng@cpan.org>
7
- Requires-Python: >=3.9
8
- Description-Content-Type: text/markdown
5
+ License-Expression: AGPL-3.0-or-later
6
+ Project-URL: Changelog, https://github.com/kianmeng/fotolab/blob/master/CHANGELOG.md
7
+ Project-URL: Issues, https://github.com/kianmeng/fotolab/issues
8
+ Project-URL: Source, https://github.com/kianmeng/fotolab
9
+ Keywords: photography,photo
9
10
  Classifier: Development Status :: 3 - Alpha
10
11
  Classifier: Environment :: Console
11
- Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
12
12
  Classifier: Programming Language :: Python :: 3 :: Only
13
13
  Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
@@ -16,11 +16,11 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Programming Language :: Python
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
19
21
  License-File: LICENSE.md
20
22
  Requires-Dist: pillow
21
- Project-URL: Changelog, https://github.com/kianmeng/fotolab/blob/master/CHANGELOG.md
22
- Project-URL: Issues, https://github.com/kianmeng/fotolab/issues
23
- Project-URL: Source, https://github.com/kianmeng/fotolab
23
+ Dynamic: license-file
24
24
 
25
25
  # fotolab
26
26
 
@@ -471,4 +471,3 @@ The fish logo used in the documentation generated by Sphinx is a public domain
471
471
  drawing of male freshwater phase [Sockeye (red) salmon (Oncorhynchus nerka)]
472
472
  (https://en.wikipedia.org/w/index.php?oldid=1186575702) from
473
473
  <https://commons.wikimedia.org/entity/M2787002>.
474
-
@@ -1,8 +1,8 @@
1
- fotolab/__init__.py,sha256=7XrkZPbYLVCnsak061vye7L9hFC7zj7cP7XWdjunAk8,3137
1
+ fotolab/__init__.py,sha256=F1sYdgd88MdxeT60olYsMzaMY7EipL8lJlL44BuFYj4,3088
2
2
  fotolab/__main__.py,sha256=aboOURPs_snOXTEWYR0q8oq1UTY9e-NxCd1j33V0wHI,833
3
3
  fotolab/cli.py,sha256=oFiQXmsu3wIsM_DpZnL4B94sAoB62L16Am-cjxGmosY,4406
4
4
  fotolab/subcommands/__init__.py,sha256=l3DlIaJ3u3jGjnC1H1yV8LZ_nPqOLJ6gikD4BCaMAQ0,1129
5
- fotolab/subcommands/animate.py,sha256=2bNaFyUbA5yNgBgd9WhVnJ1R28nfHu0agAJBBww1Z4w,5534
5
+ fotolab/subcommands/animate.py,sha256=t1F0ekbYWVlQcCtnwsW_gsWjkFdGDqcr4R8VUztUuzI,5481
6
6
  fotolab/subcommands/auto.py,sha256=3Hl1cCdu65GcfwvwiMRAcex6c7zA-KqIY6AFnB6nI3w,2447
7
7
  fotolab/subcommands/border.py,sha256=VYs8SorNYMwk7bVhD7jyolvFly7XdV-s9tNVQQYZPtA,4671
8
8
  fotolab/subcommands/contrast.py,sha256=fcXmHnxDw74j5ZUDQ5cwWh0N4tpyqqvEjymnpITgrEk,3027
@@ -14,8 +14,9 @@ fotolab/subcommands/resize.py,sha256=eZGoHVMehpHrAX_y-M56s43lSvWmywMjHRVI_dYqpcA
14
14
  fotolab/subcommands/rotate.py,sha256=uBFjHyjiBSQLtrtH1p9myODIHUDr1gkL4PpU-6Y1Ofo,2575
15
15
  fotolab/subcommands/sharpen.py,sha256=YNho2IPbc-lPvSy3Bsjehc2JOEy27LPqFSGRULs9MyY,3492
16
16
  fotolab/subcommands/watermark.py,sha256=cpdzmdzBXcaXWSrklYycnkPLjorLnTM-IXjPigPu0y0,11268
17
- fotolab-0.31.14.dist-info/entry_points.txt,sha256=mvw7AY_yZkIyjAxPtHNed9X99NZeLnMxEeAfEJUbrCM,44
18
- fotolab-0.31.14.dist-info/licenses/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
19
- fotolab-0.31.14.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
20
- fotolab-0.31.14.dist-info/METADATA,sha256=7YCu0GV5Q1XjRcUE4OIWrIlNAKkVaV2wscEC5geJ6LE,14307
21
- fotolab-0.31.14.dist-info/RECORD,,
17
+ fotolab-0.31.16.dist-info/licenses/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
18
+ fotolab-0.31.16.dist-info/METADATA,sha256=8jKYLTQsusRg8jCG1Qrpm7_2APnnx-AZDT5YOboU-Io,14220
19
+ fotolab-0.31.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ fotolab-0.31.16.dist-info/entry_points.txt,sha256=0e1go9plFpqj5FP-OpV2acxTAx3ViI59PMXuhejvgcQ,45
21
+ fotolab-0.31.16.dist-info/top_level.txt,sha256=XUJ3gdpsbjohoZCLdVlbQrxAUDkbQg7WwGQG2DaN0t4,8
22
+ fotolab-0.31.16.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.12.0
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ fotolab = fotolab.cli:main
@@ -0,0 +1 @@
1
+ fotolab
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- fotolab=fotolab.cli:main
3
-