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