Skip to content

Commit de55ff1

Browse files
committed
Add flag to show version
2 parents 7a120d6 + 54822c8 commit de55ff1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/pycookiecheat/__main__.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import json
55
import logging
66

7+
from importlib.metadata import version
78
from .chrome import chrome_cookies
89
from .common import BrowserType
910
from .firefox import firefox_cookies
@@ -25,15 +26,21 @@ def main() -> None:
2526
help="Output to this file in netscape cookie file format",
2627
)
2728
parser.add_argument(
28-
"--verbose",
2929
"-v",
30+
"--verbose",
3031
action="count",
3132
default=0,
3233
help=(
3334
"Increase logging verbosity (may repeat), default is "
3435
"`logging.ERROR`"
3536
),
3637
)
38+
parser.add_argument(
39+
"-V",
40+
"--version",
41+
action='version',
42+
version=version(parser.prog),
43+
)
3744
args = parser.parse_args()
3845

3946
logging.basicConfig(level=max(logging.ERROR - 10 * args.verbose, 0))

0 commit comments

Comments
 (0)