Skip to content

Commit

Permalink
Add flag to show version
Browse files Browse the repository at this point in the history
  • Loading branch information
n8henrie committed Oct 31, 2024
2 parents 7a120d6 + 54822c8 commit de55ff1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pycookiecheat/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import logging

from importlib.metadata import version
from .chrome import chrome_cookies
from .common import BrowserType
from .firefox import firefox_cookies
Expand All @@ -25,15 +26,21 @@ def main() -> None:
help="Output to this file in netscape cookie file format",
)
parser.add_argument(
"--verbose",
"-v",
"--verbose",
action="count",
default=0,
help=(
"Increase logging verbosity (may repeat), default is "
"`logging.ERROR`"
),
)
parser.add_argument(
"-V",
"--version",
action='version',
version=version(parser.prog),
)
args = parser.parse_args()

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

0 comments on commit de55ff1

Please sign in to comment.