fotolab 0.14.0__tar.gz → 0.16.4__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 (43) hide show
  1. {fotolab-0.14.0 → fotolab-0.16.4}/.pre-commit-config.yaml +2 -2
  2. fotolab-0.16.4/.python-version +5 -0
  3. {fotolab-0.14.0 → fotolab-0.16.4}/CHANGELOG.md +46 -86
  4. {fotolab-0.14.0 → fotolab-0.16.4}/CONTRIBUTING.md +11 -26
  5. {fotolab-0.14.0 → fotolab-0.16.4}/PKG-INFO +23 -8
  6. {fotolab-0.14.0 → fotolab-0.16.4}/Pipfile +4 -6
  7. {fotolab-0.14.0 → fotolab-0.16.4}/Pipfile.lock +478 -536
  8. {fotolab-0.14.0 → fotolab-0.16.4}/README.md +22 -7
  9. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/__init__.py +3 -3
  10. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/cli.py +14 -0
  11. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/resize.py +39 -5
  12. fotolab-0.16.4/fotolab/rotate.py +61 -0
  13. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/sharpen.py +3 -3
  14. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/watermark.py +46 -7
  15. fotolab-0.16.4/noxfile.py +62 -0
  16. fotolab-0.14.0/.python-version +0 -5
  17. fotolab-0.14.0/tox.ini +0 -25
  18. {fotolab-0.14.0 → fotolab-0.16.4}/.coveragerc +0 -0
  19. {fotolab-0.14.0 → fotolab-0.16.4}/.gitignore +0 -0
  20. {fotolab-0.14.0 → fotolab-0.16.4}/LICENSE.md +0 -0
  21. {fotolab-0.14.0 → fotolab-0.16.4}/docs/Makefile +0 -0
  22. {fotolab-0.14.0 → fotolab-0.16.4}/docs/make.bat +0 -0
  23. {fotolab-0.14.0 → fotolab-0.16.4}/docs/source/CHANGELOG.md +0 -0
  24. {fotolab-0.14.0 → fotolab-0.16.4}/docs/source/CONTRIBUTING.md +0 -0
  25. {fotolab-0.14.0 → fotolab-0.16.4}/docs/source/LICENSE.md +0 -0
  26. {fotolab-0.14.0 → fotolab-0.16.4}/docs/source/README.md +0 -0
  27. {fotolab-0.14.0 → fotolab-0.16.4}/docs/source/_static/logo.jpg +0 -0
  28. {fotolab-0.14.0 → fotolab-0.16.4}/docs/source/conf.py +0 -0
  29. {fotolab-0.14.0 → fotolab-0.16.4}/docs/source/index.rst +0 -0
  30. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/__main__.py +0 -0
  31. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/animate.py +0 -0
  32. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/auto.py +0 -0
  33. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/border.py +0 -0
  34. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/contrast.py +0 -0
  35. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/env.py +0 -0
  36. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/info.py +0 -0
  37. {fotolab-0.14.0 → fotolab-0.16.4}/fotolab/montage.py +0 -0
  38. {fotolab-0.14.0 → fotolab-0.16.4}/pyproject.toml +0 -0
  39. {fotolab-0.14.0 → fotolab-0.16.4}/tests/__init__.py +0 -0
  40. {fotolab-0.14.0 → fotolab-0.16.4}/tests/conftest.py +0 -0
  41. {fotolab-0.14.0 → fotolab-0.16.4}/tests/test_env.py +0 -0
  42. {fotolab-0.14.0 → fotolab-0.16.4}/tests/test_help_flag.py +0 -0
  43. {fotolab-0.14.0 → fotolab-0.16.4}/tests/test_quiet_flag.py +0 -0
@@ -15,13 +15,13 @@ repos:
15
15
  - id: trailing-whitespace
16
16
 
17
17
  - repo: https://github.com/abravalheri/validate-pyproject
18
- rev: v0.16
18
+ rev: v0.18
19
19
  hooks:
20
20
  - id: validate-pyproject
21
21
  name: validate-pyproject
22
22
 
23
23
  - repo: https://github.com/codespell-project/codespell
24
- rev: v2.2.6
24
+ rev: v2.3.0
25
25
  hooks:
26
26
  - id: codespell
27
27
  args:
@@ -0,0 +1,5 @@
1
+ 3.8.19
2
+ 3.9.19
3
+ 3.10.14
4
+ 3.11.9
5
+ 3.12.3
@@ -7,19 +7,53 @@ 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)
10
+ ## v0.16.4 (2024-06-09)
11
11
 
12
- ### Added
12
+ - Add `deps` session to `nox`
13
+ - Bump deps
14
+ - Remove `tox` dep
15
+ - Update `nox` session output in contributing doc
13
16
 
14
- - Add `animate` subcommand to create animated `gif` image
17
+ ## v0.16.3 (2024-06-02)
18
+
19
+ - Bump deps
20
+ - Fix incorrect `nox` session description
21
+ - Remove unused `doc` section from `Pipfile`
15
22
 
16
- ### Changed
23
+ ## v0.16.2 (2024-05-26)
17
24
 
25
+ - Add `cov` (coverage) session to `nox`
18
26
  - Bump deps and `pre-commit` hooks
27
+ - Switch to `nox` from `tox`
19
28
 
20
- ## v0.13.0 (2024-04-21)
29
+ ## v0.16.1 (2024-05-19)
30
+
31
+ - Add `doc` session to `nox`
32
+ - Bump deps
33
+ - Move doc generation related deps to `dev` group
34
+ - Remove subheaders from changelog
35
+
36
+ ## v0.16.0 (2024-05-12)
37
+
38
+ - Add `rotate` subcommand to rotate an image
39
+ - Add initial `lint` session for `nox`
40
+ - Bump deps, `pre-commit` hooks, and Python versions in `pyenv`
21
41
 
22
- ### Changed
42
+ ## v0.15.0 (2024-05-05)
43
+
44
+ - Add `-v` or `--verbose` flag to toggle the debug logs of PIL
45
+ - Bump deps and `pre-commit` hooks
46
+ - Remove empty lines in help message
47
+ - Resize image to the right aspect ratio based on image's dimension
48
+ - Resize watermark font based on the image's dimension
49
+ - Show absolute image path in logs
50
+
51
+ ## v0.14.0 (2024-04-28)
52
+
53
+ - Add `animate` subcommand to create animated `gif` image
54
+ - Bump deps and `pre-commit` hooks
55
+
56
+ ## v0.13.0 (2024-04-21)
23
57
 
24
58
  - Bump deps
25
59
  - Support processing multiple images at once
@@ -27,170 +61,96 @@ and this project adheres to [0-based versioning](https://0ver.org/).
27
61
 
28
62
  ## v0.12.0 (2024-04-14)
29
63
 
30
- ### Added
31
-
32
64
  - Add `-pd` or `--padding` option to set the padding of watermark text block
33
-
34
- ### Changed
35
-
36
65
  - Bump deps, `pre-commit` hooks, and Python versions for `pyenv`
37
-
38
- ### Fixed
39
-
40
66
  - Fix `auto` subcommand missing `padding` field
41
67
  - Fix missing closing parenthesis in help message
42
68
  - Update missing subcommand help message in README
43
69
 
44
70
  ## v0.11.0 (2024-04-07)
45
71
 
46
- ### Added
47
-
48
72
  - Add `montage` subcommand to join multiple images
49
-
50
- ### Changed
51
-
52
73
  - Bump deps
53
74
  - Update missing subcommand help message in README
54
75
 
55
76
  ## v0.10.0 (2024-03-31)
56
77
 
57
- ### Added
58
-
59
78
  - Add `info` subcommand to show EXIF data from image
60
-
61
- ### Changed
62
-
63
79
  - Bump deps
64
- - Update help message in README
65
- - Ignore `pylint` W0212 rule
66
-
67
- ### Fix
68
-
69
80
  - Fix incorrect action in log when running `auto` subcommand
81
+ - Ignore `pylint` W0212 rule
82
+ - Update help message in README
70
83
  - Update incorrect comment for `save_image` helper function
71
84
 
72
85
  ## v0.9.1 (2024-03-24)
73
86
 
74
- ### Changed
75
-
87
+ - Fix newline in `sys.version` output in Python 3.8
76
88
  - Implement open image using the default program
77
89
  - Refactor all subcommand to use `save_image` global helper function
78
90
 
79
- ### Fixed
80
-
81
- - Fix newline in `sys.version` output in Python 3.8
82
-
83
91
  ## v0.9.0 (2024-03-17)
84
92
 
85
- ### Added
86
-
87
93
  - Add `-op` or `--open` flag to open the image using default program
88
-
89
- ### Changed
90
-
91
94
  - Bump deps and `pre-commit` hook
92
95
 
93
96
  ## v0.8.0 (2024-03-10)
94
97
 
95
- ### Added
96
-
97
98
  - Add `auto` subcommand to auto adjust (resize, contrast, sharpen, and watermark) of an image
98
99
  - Add `contrast` subcommand to adjust contrast of an image
99
-
100
- ### Changed
101
-
102
100
  - Bump `pre-commit` hook
103
101
  - Log using the subcommand name instead of generic name
104
102
 
105
103
  ## v0.7.0 (2024-03-03)
106
104
 
107
- ### Added
108
-
109
105
  - Add `sharpen` subcommand to sharpen image
110
- - Set sharpen parameters through `-r` or `--radius` option
111
106
  - Set sharpen parameters through `-p` or `--percent` option
107
+ - Set sharpen parameters through `-r` or `--radius` option
112
108
  - Set sharpen parameters through `-t` or `--threshold` option
113
109
 
114
110
  ## v0.6.1 (2024-02-18)
115
111
 
116
- ### Added
117
-
118
112
  - Allow setting of different border width through `-wt`, `-wr`, `-wb`, and `wl`
119
113
  option
120
-
121
- ### Fixed
122
-
123
114
  - Remove extra lines in help message in README.md
124
115
 
125
116
  ## v0.6.0 (2024-02-18)
126
117
 
127
- ### Added
128
-
129
118
  - Add `resize` subcommand to resize image
130
119
 
131
120
  ## v0.5.0 (2024-02-11)
132
121
 
133
- ### Added
134
-
135
122
  - Add `-od` or `--output-dir` global option to set default output directory
136
123
  - Add missing types in doc
137
124
  - Log when saving image
138
125
 
139
126
  ## v0.4.0 (2024-02-04)
140
127
 
141
- ### Added
142
-
143
128
  - Add `-o` or `--overwrite` global flag to overwrite modified image
144
129
 
145
130
  ## v0.3.1 (2024-01-28)
146
131
 
147
- ### Added
148
-
149
132
  - Add `-w` or `--width` option to `fotolab border` subcommand
150
133
  - Add `-c` or `--color` option to `fotolab border` subcommand
151
-
152
- ### Fixed
153
-
154
134
  - Fix border not added to image
155
135
 
156
136
  ## v0.3.0 (2024-01-21)
157
137
 
158
- ### Fixed
159
-
138
+ - Add `fotolab border` subcommand to add border for an image
160
139
  - Fix incorrect subcommand wording
161
-
162
- ### Changed
163
-
164
140
  - Ignore `__repr__` in code coverage
165
141
  - Ignore duplicate code linting rule
166
-
167
- ### Added
168
-
169
- - Add `fotolab border` subcommand to add border for an image
170
142
  - Test `quiet` flag
171
143
 
172
144
  ## v0.2.0 (2024-01-14)
173
145
 
174
- ### Added
175
-
176
146
  - Add `fotolab env` subcommand for debugging and bug reporting purpose
177
-
178
- ### Fixed
179
-
180
147
  - Fix incorrect metavar for `--font-color`
181
148
 
182
149
  ## v0.1.1 (2024-01-07)
183
150
 
184
- ### Added
185
-
151
+ - Bump project and `pre-commit` hooks deps
186
152
  - Generate project documentation using `sphinx`
187
153
 
188
- ### Changes
189
-
190
- - Bump project and pre-commit hooks deps
191
-
192
154
  ## v0.1.0 (2024-01-01)
193
155
 
194
- ### Added
195
-
196
156
  - Initial public release
@@ -41,38 +41,23 @@ Spawn a shell in virtual environment for your development:
41
41
  pipenv shell
42
42
  ```
43
43
 
44
- Show all available tox tasks:
44
+ Show all available `nox` sessions:
45
45
 
46
46
  ```console
47
- tox -av
47
+ nox -l
48
48
  ```
49
49
 
50
50
  ```console
51
51
  ...
52
- default environments:
53
- py38 -> testing against python3.8
54
- py39 -> testing against python3.9
55
- py310 -> testing against python3.10
56
- py311 -> testing against python3.11
57
- py312 -> testing against python3.12
58
-
59
- additional environments:
60
- cov -> generate code coverage report in html
61
- doc -> generate sphinx documentation in html
62
- ```
63
-
64
- For code linting, we're using `pre-commit`:
65
-
66
- ```console
67
- pre-commit install # run once
68
- pre-commit clean
69
- pre-commit run --all-files
70
- ```
71
-
72
- Or specific hook:
73
-
74
- ```console
75
- pre-commit run pylint -a
52
+ * deps -> Update pre-commit hooks and deps.
53
+ * lint -> Runs pre-commit linter.
54
+ * test-3.8 -> Runs test.
55
+ * test-3.9 -> Runs test.
56
+ * test-3.10 -> Runs test.
57
+ * test-3.11 -> Runs test.
58
+ * test-3.12 -> Runs test.
59
+ * cov -> Runs test coverage.
60
+ * doc -> Build doc with sphinx.
76
61
  ```
77
62
 
78
63
  ## Create a Pull Request
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fotolab
3
- Version: 0.14.0
3
+ Version: 0.16.4
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,8 @@ fotolab -h
57
57
  ```
58
58
 
59
59
  ```console
60
-
61
- usage: fotolab [-h] [-o] [-op] [-od OUTPUT_DIR] [-q] [-d] [-V]
62
- {animate,auto,border,contrast,info,resize,montage,sharpen,watermark,env}
60
+ usage: fotolab [-h] [-o] [-op] [-od OUTPUT_DIR] [-q] [-v] [-d] [-V]
61
+ {animate,auto,border,contrast,info,resize,rotate,montage,sharpen,watermark,env}
63
62
  ...
64
63
 
65
64
  A console program to manipulate photos.
@@ -69,7 +68,7 @@ A console program to manipulate photos.
69
68
  issues: https://github.com/kianmeng/fotolab/issues
70
69
 
71
70
  positional arguments:
72
- {animate,auto,border,contrast,info,resize,montage,sharpen,watermark,env}
71
+ {animate,auto,border,contrast,info,resize,rotate,montage,sharpen,watermark,env}
73
72
  sub-command help
74
73
  animate animate an image
75
74
  auto auto adjust (resize, contrast, and watermark) a photo
@@ -77,6 +76,7 @@ positional arguments:
77
76
  contrast contrast an image
78
77
  info info an image
79
78
  resize resize an image
79
+ rotate rotate an image
80
80
  montage montage a list of image
81
81
  sharpen sharpen an image
82
82
  watermark watermark an image
@@ -89,6 +89,7 @@ optional arguments:
89
89
  -od OUTPUT_DIR, --output-dir OUTPUT_DIR
90
90
  set default output folder (default: 'output')
91
91
  -q, --quiet suppress all logging
92
+ -v, --verbose show verbosity of debugging log, use -vv, -vvv for more details
92
93
  -d, --debug show debugging log and stacktrace
93
94
  -V, --version show program's version number and exit
94
95
  ```
@@ -100,7 +101,6 @@ fotolab animate -h
100
101
  ```
101
102
 
102
103
  ```console
103
-
104
104
  usage: fotolab animate [-h] [-f FORMAT] [-d DURATION] [-l LOOP]
105
105
  IMAGE_FILENAMES [IMAGE_FILENAMES ...]
106
106
 
@@ -197,6 +197,22 @@ optional arguments:
197
197
  -h, --help show this help message and exit
198
198
  ```
199
199
 
200
+ ### fotolab rotate
201
+
202
+ ```console
203
+ fotolab rotate -h
204
+ ```
205
+
206
+ ```console
207
+ usage: fotolab rotate [-h] IMAGE_FILENAMES [IMAGE_FILENAMES ...]
208
+
209
+ positional arguments:
210
+ IMAGE_FILENAMES set the image filenames
211
+
212
+ optional arguments:
213
+ -h, --help show this help message and exit
214
+ ```
215
+
200
216
  ### fotolab montage
201
217
 
202
218
  ```console
@@ -204,7 +220,6 @@ fotolab montage -h
204
220
  ```
205
221
 
206
222
  ```console
207
-
208
223
  usage: fotolab montage [-h] IMAGE_FILENAMES [IMAGE_FILENAMES ...]
209
224
 
210
225
  positional arguments:
@@ -221,7 +236,7 @@ fotolab resize -h
221
236
  ```
222
237
 
223
238
  ```console
224
- usage: fotolab resize [-h] [-wh WIDTH] [-ht HEIGHT]
239
+ usage: fotolab resize [-h] [-wh WIDTH | -ht HEIGHT]
225
240
  IMAGE_FILENAMES [IMAGE_FILENAMES ...]
226
241
 
227
242
  positional arguments:
@@ -21,14 +21,12 @@ pytest-randomly = "*"
21
21
  pytest-xdist = "*"
22
22
  scripttest = "*"
23
23
  tomli = "*"
24
- tox = "<4"
25
24
  tox-pyenv = "*"
26
-
27
- [requires]
28
- python_version = "3.8"
29
-
30
- [doc]
25
+ nox = "*"
31
26
  sphinx = "*"
32
27
  myst-parser = "*"
33
28
  sphinx-autodoc-typehints = "*"
34
29
  sphinx-copybutton = "*"
30
+
31
+ [requires]
32
+ python_version = "3.8"