From e5338aa1a71cb93e4cc183cffcb3dea6feab2dda Mon Sep 17 00:00:00 2001 From: xaoyaoo Date: Fri, 21 Jun 2024 18:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E7=B1=BB=E5=9E=8B=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pywxdump/dbpreprocess/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pywxdump/dbpreprocess/utils.py b/pywxdump/dbpreprocess/utils.py index 766173f..860980f 100644 --- a/pywxdump/dbpreprocess/utils.py +++ b/pywxdump/dbpreprocess/utils.py @@ -19,6 +19,13 @@ from collections import defaultdict def type_converter(type_id_or_name: [str,tuple]): + """ + 消息类型ID与名称转换 + 名称(str)=>ID(tuple) + ID(tuple)=>名称(str) + :param type_id_or_name: 消息类型ID或名称 + :return: 消息类型ID或名称 + """ type_name_dict = defaultdict(lambda: "未知", { (1, 0): "文本", (3, 0): "图片",