From 447dec78c91cb18d75e694c9d5c24b77a136bc48 Mon Sep 17 00:00:00 2001 From: xaoyo Date: Wed, 15 Nov 2023 16:17:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=88=E6=9C=AC=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- pywxdump/command.py | 8 +++++--- setup.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 665fb4da..b7b08612 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@
更新日志(点击展开): -* 2023.11.15 添加test文件,添加自动构建可执行文件的脚本 +* 2023.11.15 添加test文件,添加自动构建可执行文件的脚本,添加版本描述 * 2023.11.15 [v2.2.5变化较大]重构解密脚本的返回值,重构命令行参数 * 2023.11.15 修复无法获取wxid的bug * 2023.11.14 修复部分bug diff --git a/pywxdump/command.py b/pywxdump/command.py index e69789c1..c5ac581c 100644 --- a/pywxdump/command.py +++ b/pywxdump/command.py @@ -5,9 +5,8 @@ # Author: xaoyaoo # Date: 2023/10/14 # ------------------------------------------------------------------------------- -import json import argparse -import os +import importlib.metadata from . import * @@ -152,7 +151,6 @@ def run(self, args): print("[-] 输入数据库路径不存在") return - app = Flask(__name__, template_folder='./show_chat/templates') app.logger.setLevel(logging.ERROR) @@ -263,6 +261,10 @@ def console_run(): # 创建命令行参数解析器 parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter) + version = importlib.metadata.version('pywxdump') + version = f"PyWxDump {version}" + parser.add_argument('-V', '--version', action='version', version=version) + # 添加子命令解析器 subparsers = parser.add_subparsers(dest="mode", help="""运行模式:""", required=True, metavar="mode") diff --git a/setup.py b/setup.py index 81294f20..939f1efe 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() -version = "2.2.5" +version = "2.2.6" setup( name="pywxdump", author="xaoyaoo",