From 52a37b36b5c2724d7a57a6e724cdb098295a3ee2 Mon Sep 17 00:00:00 2001 From: Ying Cong Date: Thu, 10 Oct 2024 14:05:19 +0800 Subject: [PATCH] Added a version command --- .../__pycache__/__init__.cpython-38.pyc | Bin 309 -> 309 bytes src/ocbc_dbs_statement_parser/cli.py | 2 ++ 2 files changed, 2 insertions(+) diff --git a/src/ocbc_dbs_statement_parser/__pycache__/__init__.cpython-38.pyc b/src/ocbc_dbs_statement_parser/__pycache__/__init__.cpython-38.pyc index 61817547ba27914043601e708fb8a5910e4f6d6e..3771532486087a73111871c326e1e6b77460c3c3 100644 GIT binary patch delta 26 gcmdnWw3UfFl$V!_0SF9tewxVb$!w%&Ffsfd08)4d4FCWD delta 26 gcmdnWw3UfFl$V!_0SNZAznaMH$!w@+J~8|r09Ne>WB>pF diff --git a/src/ocbc_dbs_statement_parser/cli.py b/src/ocbc_dbs_statement_parser/cli.py index 1e59a02..5169419 100644 --- a/src/ocbc_dbs_statement_parser/cli.py +++ b/src/ocbc_dbs_statement_parser/cli.py @@ -2,6 +2,7 @@ import json from decimal import Decimal from .main import parse_bank_statement +from . import __version__ # Import the version from your package def decimal_default(obj): if isinstance(obj, Decimal): @@ -13,6 +14,7 @@ def cli(): parser.add_argument("pdf_path", help="Path to the PDF file") parser.add_argument("--debug", action="store_true", help="Enable debug output") parser.add_argument("--verify", action="store_true", help="Verify transaction totals") + parser.add_argument("--version", action="version", version=f"%(prog)s {__version__}") args = parser.parse_args() result = parse_bank_statement(args.pdf_path, args.debug, args.verify)