fotolab 0.1.1__py2.py3-none-any.whl → 0.2.0__py2.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
@@ -16,4 +16,4 @@
16
16
  """A console program that manipulate images."""
17
17
 
18
18
 
19
- __version__ = "0.1.1"
19
+ __version__ = "0.2.0"
fotolab/cli.py CHANGED
@@ -25,6 +25,7 @@ import logging
25
25
  import sys
26
26
  from typing import Dict, Optional, Sequence
27
27
 
28
+ import fotolab.env
28
29
  import fotolab.watermark
29
30
  from fotolab import __version__
30
31
 
@@ -88,6 +89,7 @@ def build_parser() -> argparse.ArgumentParser:
88
89
 
89
90
  subparsers = parser.add_subparsers(help="sub-command help")
90
91
  fotolab.watermark.build_subparser(subparsers)
92
+ fotolab.env.build_subparser(subparsers)
91
93
 
92
94
  return parser
93
95
 
fotolab/env.py ADDED
@@ -0,0 +1,43 @@
1
+ # Copyright (C) 2024 Kian-Meng Ang
2
+ #
3
+ # This program is free software: you can redistribute it and/or modify it under
4
+ # the terms of the GNU Affero General Public License as published by the Free
5
+ # Software Foundation, either version 3 of the License, or (at your option) any
6
+ # later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful, but WITHOUT
9
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
+ # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
11
+ # details.
12
+ #
13
+ # You should have received a copy of the GNU Affero General Public License
14
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
15
+
16
+ """Env subcommand."""
17
+
18
+ import argparse
19
+ import logging
20
+ import platform
21
+ import sys
22
+
23
+ from fotolab import __version__
24
+
25
+ log = logging.getLogger(__name__)
26
+
27
+
28
+ def build_subparser(subparsers) -> None:
29
+ """Build the subparser."""
30
+ env_parser = subparsers.add_parser(
31
+ "env", help="print environment information for bug reporting"
32
+ )
33
+
34
+ env_parser.set_defaults(func=run)
35
+
36
+
37
+ def run(args: argparse.Namespace) -> None:
38
+ """Run env sub-command."""
39
+ log.debug(args)
40
+
41
+ print(f"fotolab: {__version__}")
42
+ print(f"python: {sys.version}")
43
+ print(f"platform: {platform.platform()}")
fotolab/watermark.py CHANGED
@@ -78,7 +78,7 @@ def build_subparser(subparsers) -> None:
78
78
  type=str,
79
79
  default="white",
80
80
  help="set the font color of watermark text (default: '%(default)s')",
81
- metavar="FONT_SIZE",
81
+ metavar="FONT_COLOR",
82
82
  )
83
83
 
84
84
  watermark_parser.add_argument(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fotolab
3
- Version: 0.1.1
3
+ Version: 0.2.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>
@@ -51,7 +51,7 @@ fotolab -h
51
51
  ```
52
52
 
53
53
  ```console
54
- usage: fotolab [-h] [-q] [-d] [-V] {watermark} ...
54
+ usage: fotolab [-h] [-q] [-d] [-V] {env,watermark} ...
55
55
 
56
56
  A console program to manipulate photos.
57
57
 
@@ -60,14 +60,16 @@ A console program to manipulate photos.
60
60
  issues: https://github.com/kianmeng/fotolab/issues
61
61
 
62
62
  positional arguments:
63
- {watermark} sub-command help
64
- watermark watermark an image
63
+ {env,watermark}
64
+ sub-command help
65
+ env print environment information for bug reporting
66
+ watermark watermark an image
65
67
 
66
68
  options:
67
- -h, --help show this help message and exit
68
- -q, --quiet suppress all logging
69
- -d, --debug show debugging log and stacktrace
70
- -V, --version show program's version number and exit
69
+ -h, --help show this help message and exit
70
+ -q, --quiet suppress all logging
71
+ -d, --debug show debugging log and stacktrace
72
+ -V, --version show program's version number and exit
71
73
  ```
72
74
 
73
75
  ### fotolab watermark
@@ -106,6 +108,19 @@ options:
106
108
  'black')
107
109
  ```
108
110
 
111
+ ### fotolab env
112
+
113
+ ```console
114
+ fotolab env -h
115
+ ```
116
+
117
+ ```console
118
+ usage: fotolab env [-h]
119
+
120
+ options:
121
+ -h, --help show this help message and exit
122
+ ```
123
+
109
124
  ## Copyright and License
110
125
 
111
126
  Copyright (C) 2024 Kian-Meng Ang
@@ -0,0 +1,10 @@
1
+ fotolab/__init__.py,sha256=moOMEp9P2vNlAKT8V30Vit_OndDmQHNmeFpYJuzNj5M,764
2
+ fotolab/__main__.py,sha256=aboOURPs_snOXTEWYR0q8oq1UTY9e-NxCd1j33V0wHI,833
3
+ fotolab/cli.py,sha256=OvXn4w4HQ77-H0wRqbDCssRbxfNu5LE-OE82xLc1284,3492
4
+ fotolab/env.py,sha256=LDY3uQwF6MwBc1uxBZBDPgn2TqQu-Zz7lQAwwvToHxM,1286
5
+ fotolab/watermark.py,sha256=RGUEHFI-V1k3rv2wQES1ohIKs0rqns2AhDda1E0JkSE,4643
6
+ fotolab-0.2.0.dist-info/entry_points.txt,sha256=mvw7AY_yZkIyjAxPtHNed9X99NZeLnMxEeAfEJUbrCM,44
7
+ fotolab-0.2.0.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
8
+ fotolab-0.2.0.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
9
+ fotolab-0.2.0.dist-info/METADATA,sha256=zZclokAyTqjF2KsJmWDYd4RAAN_1XTNCfWxGGnVTYME,4558
10
+ fotolab-0.2.0.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- fotolab/__init__.py,sha256=57QsTLueleEa0GTREbf9O-GihfDlKKvWOGZ78M0hYuY,764
2
- fotolab/__main__.py,sha256=aboOURPs_snOXTEWYR0q8oq1UTY9e-NxCd1j33V0wHI,833
3
- fotolab/cli.py,sha256=xVVd82kj83RrQoc6sFbM6Re2btG8ONWsLs5XrqsE27o,3429
4
- fotolab/watermark.py,sha256=feC6daf3MdFNq9H1IlADy1KfM3LrbW_IReNMgtCWPKg,4642
5
- fotolab-0.1.1.dist-info/entry_points.txt,sha256=mvw7AY_yZkIyjAxPtHNed9X99NZeLnMxEeAfEJUbrCM,44
6
- fotolab-0.1.1.dist-info/LICENSE.md,sha256=tGtFDwxWTjuR9syrJoSv1Hiffd2u8Tu8cYClfrXS_YU,31956
7
- fotolab-0.1.1.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
8
- fotolab-0.1.1.dist-info/METADATA,sha256=a-xlY3aRkJ6eJQD_iBgsOh0GQEscbdB4Q4KQMOasMj0,4320
9
- fotolab-0.1.1.dist-info/RECORD,,