From 5b7d293b0652dd6e0eae315cbafa5bb701edf6b3 Mon Sep 17 00:00:00 2001 From: Yuxin Wu Date: Tue, 2 Feb 2021 11:00:48 -0800 Subject: [PATCH] update docs about sfs/avatar.index --- dump-html.py | 2 +- wechat/res.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dump-html.py b/dump-html.py index bb947df..dbdea83 100755 --- a/dump-html.py +++ b/dump-html.py @@ -17,7 +17,7 @@ def get_args(): parser.add_argument('name', help='name of contact') parser.add_argument('--output', help='output html file', default='output.html') parser.add_argument('--db', default='decoded.db', help='path to decoded database') - parser.add_argument('--avt', default='avatar.index', help='path to avatar.index file') + parser.add_argument('--avt', default='avatar.index', help='path to avatar.index file that only exists in old version of wechat') parser.add_argument('--res', default='resource', help='reseource directory') args = parser.parse_args() return args diff --git a/wechat/res.py b/wechat/res.py index d70c486..6c2fc12 100644 --- a/wechat/res.py +++ b/wechat/res.py @@ -30,6 +30,11 @@ JPEG_QUALITY = 50 class Resource(object): """ multimedia resources in chat""" def __init__(self, parser, res_dir, avt_db): + """ + Args: + res_dir: path to the resource directory + avt_db: "avatar.index" file that only exists in old versions of wechat + """ def check(subdir): dir_to_check = os.path.join(res_dir, subdir) assert os.path.isdir(dir_to_check), f"No such directory: {dir_to_check}"