fotolab 0.16.17__tar.gz → 0.17.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 (42) hide show
  1. fotolab-0.17.0/.python-version +5 -0
  2. {fotolab-0.16.17 → fotolab-0.17.0}/CHANGELOG.md +11 -0
  3. {fotolab-0.16.17 → fotolab-0.17.0}/PKG-INFO +3 -2
  4. {fotolab-0.16.17 → fotolab-0.17.0}/Pipfile.lock +33 -33
  5. {fotolab-0.16.17 → fotolab-0.17.0}/README.md +2 -1
  6. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/__init__.py +1 -1
  7. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/cli.py +1 -2
  8. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/info.py +17 -2
  9. {fotolab-0.16.17 → fotolab-0.17.0}/noxfile.py +1 -6
  10. fotolab-0.16.17/.python-version +0 -5
  11. {fotolab-0.16.17 → fotolab-0.17.0}/.coveragerc +0 -0
  12. {fotolab-0.16.17 → fotolab-0.17.0}/.gitignore +0 -0
  13. {fotolab-0.16.17 → fotolab-0.17.0}/.pre-commit-config.yaml +0 -0
  14. {fotolab-0.16.17 → fotolab-0.17.0}/CONTRIBUTING.md +0 -0
  15. {fotolab-0.16.17 → fotolab-0.17.0}/LICENSE.md +0 -0
  16. {fotolab-0.16.17 → fotolab-0.17.0}/Pipfile +0 -0
  17. {fotolab-0.16.17 → fotolab-0.17.0}/docs/Makefile +0 -0
  18. {fotolab-0.16.17 → fotolab-0.17.0}/docs/make.bat +0 -0
  19. {fotolab-0.16.17 → fotolab-0.17.0}/docs/source/CHANGELOG.md +0 -0
  20. {fotolab-0.16.17 → fotolab-0.17.0}/docs/source/CONTRIBUTING.md +0 -0
  21. {fotolab-0.16.17 → fotolab-0.17.0}/docs/source/LICENSE.md +0 -0
  22. {fotolab-0.16.17 → fotolab-0.17.0}/docs/source/README.md +0 -0
  23. {fotolab-0.16.17 → fotolab-0.17.0}/docs/source/_static/logo.jpg +0 -0
  24. {fotolab-0.16.17 → fotolab-0.17.0}/docs/source/conf.py +0 -0
  25. {fotolab-0.16.17 → fotolab-0.17.0}/docs/source/index.rst +0 -0
  26. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/__main__.py +0 -0
  27. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/animate.py +0 -0
  28. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/auto.py +0 -0
  29. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/border.py +0 -0
  30. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/contrast.py +0 -0
  31. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/env.py +0 -0
  32. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/montage.py +0 -0
  33. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/resize.py +0 -0
  34. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/rotate.py +0 -0
  35. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/sharpen.py +0 -0
  36. {fotolab-0.16.17 → fotolab-0.17.0}/fotolab/watermark.py +0 -0
  37. {fotolab-0.16.17 → fotolab-0.17.0}/pyproject.toml +0 -0
  38. {fotolab-0.16.17 → fotolab-0.17.0}/tests/__init__.py +0 -0
  39. {fotolab-0.16.17 → fotolab-0.17.0}/tests/conftest.py +0 -0
  40. {fotolab-0.16.17 → fotolab-0.17.0}/tests/test_env.py +0 -0
  41. {fotolab-0.16.17 → fotolab-0.17.0}/tests/test_help_flag.py +0 -0
  42. {fotolab-0.16.17 → fotolab-0.17.0}/tests/test_quiet_flag.py +0 -0
@@ -0,0 +1,5 @@
1
+ 3.8.20
2
+ 3.9.20
3
+ 3.10.15
4
+ 3.11.10
5
+ 3.12.6
@@ -7,6 +7,17 @@ and this project adheres to [0-based versioning](https://0ver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## v0.17.0 (2024-09-22)
11
+
12
+ - Bump Python versions for `pyenv`
13
+ - Filter out image with `None` info field name
14
+ - Show image info by sorted field name using `-s` or `--sort` flag
15
+
16
+ ## v0.16.18 (2024-09-15)
17
+
18
+ - Bump deps
19
+ - Refactor showing stacktrace based on raw args
20
+
10
21
  ## v0.16.17 (2024-09-08)
11
22
 
12
23
  - Add `posargs` to most sessions in `nox`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fotolab
3
- Version: 0.16.17
3
+ Version: 0.17.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>
@@ -210,13 +210,14 @@ fotolab info -h
210
210
  <!--help-info !-->
211
211
 
212
212
  ```console
213
- usage: fotolab info [-h] IMAGE_FILENAME
213
+ usage: fotolab info [-h] [-s] IMAGE_FILENAME
214
214
 
215
215
  positional arguments:
216
216
  IMAGE_FILENAME set the image filename
217
217
 
218
218
  options:
219
219
  -h, --help show this help message and exit
220
+ -s, --sort show image info by sorted field name
220
221
  ```
221
222
 
222
223
  <!--help-info !-->
@@ -372,11 +372,11 @@
372
372
  },
373
373
  "filelock": {
374
374
  "hashes": [
375
- "sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb",
376
- "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7"
375
+ "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0",
376
+ "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"
377
377
  ],
378
378
  "markers": "python_version >= '3.8'",
379
- "version": "==3.15.4"
379
+ "version": "==3.16.1"
380
380
  },
381
381
  "flake8": {
382
382
  "hashes": [
@@ -436,19 +436,19 @@
436
436
  },
437
437
  "identify": {
438
438
  "hashes": [
439
- "sha256:cb171c685bdc31bcc4c1734698736a7d5b6c8bf2e0c15117f4d469c8640ae5cf",
440
- "sha256:e79ae4406387a9d300332b5fd366d8994f1525e8414984e1a59e058b2eda2dd0"
439
+ "sha256:53863bcac7caf8d2ed85bd20312ea5dcfc22226800f6d6881f232d861db5a8f0",
440
+ "sha256:91478c5fb7c3aac5ff7bf9b4344f803843dc586832d5f110d672b19aa1984c98"
441
441
  ],
442
442
  "markers": "python_version >= '3.8'",
443
- "version": "==2.6.0"
443
+ "version": "==2.6.1"
444
444
  },
445
445
  "idna": {
446
446
  "hashes": [
447
- "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac",
448
- "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603"
447
+ "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9",
448
+ "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"
449
449
  ],
450
450
  "markers": "python_version >= '3.6'",
451
- "version": "==3.8"
451
+ "version": "==3.10"
452
452
  },
453
453
  "imagesize": {
454
454
  "hashes": [
@@ -460,12 +460,12 @@
460
460
  },
461
461
  "importlib-metadata": {
462
462
  "hashes": [
463
- "sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1",
464
- "sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5"
463
+ "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b",
464
+ "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"
465
465
  ],
466
466
  "index": "pypi",
467
467
  "markers": "python_version >= '3.8'",
468
- "version": "==8.4.0"
468
+ "version": "==8.5.0"
469
469
  },
470
470
  "iniconfig": {
471
471
  "hashes": [
@@ -567,11 +567,11 @@
567
567
  },
568
568
  "mdit-py-plugins": {
569
569
  "hashes": [
570
- "sha256:1020dfe4e6bfc2c79fb49ae4e3f5b297f5ccd20f010187acc52af2921e27dc6a",
571
- "sha256:834b8ac23d1cd60cec703646ffd22ae97b7955a6d596eb1d304be1e251ae499c"
570
+ "sha256:0c673c3f889399a33b95e88d2f0d111b4447bdfea7f237dab2d488f459835636",
571
+ "sha256:5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5"
572
572
  ],
573
573
  "markers": "python_version >= '3.8'",
574
- "version": "==0.4.1"
574
+ "version": "==0.4.2"
575
575
  },
576
576
  "mdurl": {
577
577
  "hashes": [
@@ -704,11 +704,11 @@
704
704
  },
705
705
  "platformdirs": {
706
706
  "hashes": [
707
- "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee",
708
- "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"
707
+ "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907",
708
+ "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"
709
709
  ],
710
710
  "markers": "python_version >= '3.8'",
711
- "version": "==4.2.2"
711
+ "version": "==4.3.6"
712
712
  },
713
713
  "pluggy": {
714
714
  "hashes": [
@@ -761,12 +761,12 @@
761
761
  },
762
762
  "pytest": {
763
763
  "hashes": [
764
- "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5",
765
- "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"
764
+ "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181",
765
+ "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"
766
766
  ],
767
767
  "index": "pypi",
768
768
  "markers": "python_version >= '3.8'",
769
- "version": "==8.3.2"
769
+ "version": "==8.3.3"
770
770
  },
771
771
  "pytest-cov": {
772
772
  "hashes": [
@@ -887,12 +887,12 @@
887
887
  },
888
888
  "sphinx-autodoc-typehints": {
889
889
  "hashes": [
890
- "sha256:8f8281654ddf5709875429b7120d367f4edee39a131e13d5806e4f779a81bf0f",
891
- "sha256:c9774d47e7d304cf975e073df49ebf19763dca94ac0295e7013b522b26cb18de"
890
+ "sha256:940de2951fd584d147e46772579fdc904f945c5f1ee1a78c614646abfbbef18b",
891
+ "sha256:e743512da58b67a06579a1462798a6907664ab77460758a43234adeac350afbf"
892
892
  ],
893
893
  "index": "pypi",
894
894
  "markers": "python_version >= '3.10'",
895
- "version": "==2.4.0"
895
+ "version": "==2.4.4"
896
896
  },
897
897
  "sphinx-copybutton": {
898
898
  "hashes": [
@@ -962,27 +962,27 @@
962
962
  },
963
963
  "urllib3": {
964
964
  "hashes": [
965
- "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472",
966
- "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"
965
+ "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac",
966
+ "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"
967
967
  ],
968
968
  "markers": "python_version >= '3.8'",
969
- "version": "==2.2.2"
969
+ "version": "==2.2.3"
970
970
  },
971
971
  "virtualenv": {
972
972
  "hashes": [
973
- "sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a",
974
- "sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589"
973
+ "sha256:4f3ac17b81fba3ce3bd6f4ead2749a72da5929c01774948e243db9ba41df4ff6",
974
+ "sha256:ce489cac131aa58f4b25e321d6d186171f78e6cb13fafbf32a840cee67733ff4"
975
975
  ],
976
976
  "markers": "python_version >= '3.7'",
977
- "version": "==20.26.3"
977
+ "version": "==20.26.5"
978
978
  },
979
979
  "zipp": {
980
980
  "hashes": [
981
- "sha256:9960cd8967c8f85a56f920d5d507274e74f9ff813a0ab8889a5b5be2daf44064",
982
- "sha256:c22b14cc4763c5a5b04134207736c107db42e9d3ef2d9779d465f5f1bcba572b"
981
+ "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350",
982
+ "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"
983
983
  ],
984
984
  "markers": "python_version >= '3.8'",
985
- "version": "==3.20.1"
985
+ "version": "==3.20.2"
986
986
  }
987
987
  }
988
988
  }
@@ -188,13 +188,14 @@ fotolab info -h
188
188
  <!--help-info !-->
189
189
 
190
190
  ```console
191
- usage: fotolab info [-h] IMAGE_FILENAME
191
+ usage: fotolab info [-h] [-s] IMAGE_FILENAME
192
192
 
193
193
  positional arguments:
194
194
  IMAGE_FILENAME set the image filename
195
195
 
196
196
  options:
197
197
  -h, --help show this help message and exit
198
+ -s, --sort show image info by sorted field name
198
199
  ```
199
200
 
200
201
  <!--help-info !-->
@@ -21,7 +21,7 @@ import subprocess
21
21
  import sys
22
22
  from pathlib import Path
23
23
 
24
- __version__ = "0.16.17"
24
+ __version__ = "0.17.0"
25
25
 
26
26
  log = logging.getLogger(__name__)
27
27
 
@@ -154,7 +154,6 @@ def build_parser() -> argparse.ArgumentParser:
154
154
  def main(args: Optional[Sequence[str]] = None) -> None:
155
155
  """Run the main program flow."""
156
156
  args = args or sys.argv[1:]
157
- parsed_args = argparse.Namespace(debug=True)
158
157
  log.debug(args)
159
158
 
160
159
  try:
@@ -175,7 +174,7 @@ def main(args: Optional[Sequence[str]] = None) -> None:
175
174
  log.error(
176
175
  "error: %s",
177
176
  getattr(error, "message", str(error)),
178
- exc_info=getattr(parsed_args, "debug", True),
177
+ exc_info=("-d" in args or "--debug" in args),
179
178
  )
180
179
 
181
180
  raise SystemExit(1) from None
@@ -37,6 +37,15 @@ def build_subparser(subparsers) -> None:
37
37
  metavar="IMAGE_FILENAME",
38
38
  )
39
39
 
40
+ info_parser.add_argument(
41
+ "-s",
42
+ "--sort",
43
+ default=False,
44
+ action="store_true",
45
+ dest="sort",
46
+ help="show image info by sorted field name",
47
+ )
48
+
40
49
 
41
50
  def run(args: argparse.Namespace) -> None:
42
51
  """Run info subcommand.
@@ -53,6 +62,12 @@ def run(args: argparse.Namespace) -> None:
53
62
  exif = image._getexif()
54
63
  info = {ExifTags.TAGS.get(tag_id): exif.get(tag_id) for tag_id in exif}
55
64
 
56
- tag_name_width = max(map(len, info))
57
- for tag_name, tag_value in info.items():
65
+ filtered_info = {
66
+ key: value for key, value in info.items() if key is not None
67
+ }
68
+ if args.sort:
69
+ filtered_info = dict(sorted(filtered_info.items()))
70
+
71
+ tag_name_width = max(map(len, filtered_info))
72
+ for tag_name, tag_value in filtered_info.items():
58
73
  print(f"{tag_name:<{tag_name_width}}: {tag_value}")
@@ -152,12 +152,7 @@ def release(_session: nox.Session) -> None:
152
152
 
153
153
  def _pipenv_install(session: nox.Session) -> None:
154
154
  session.install("pipenv")
155
- session.run(
156
- "pipenv",
157
- "install",
158
- "--dev",
159
- env={"PIPENV_VERBOSITY": "-1"}
160
- )
155
+ session.run("pipenv", "install", "--dev", env={"PIPENV_VERBOSITY": "-1"})
161
156
 
162
157
 
163
158
  def _search_and_replace(file, search, replace) -> None:
@@ -1,5 +0,0 @@
1
- 3.8.19
2
- 3.9.19
3
- 3.10.14
4
- 3.11.9
5
- 3.12.5
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes