diff --git a/.gitignore b/.gitignore index 3ba85a2..a3dd945 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ wheels/ pnpm-lock.yaml /tools/tmp_isaac64_compare.js /.claude/settings.local.json +.env +.env.* # Local dev repos and data /WxDatDecrypt/ @@ -44,3 +46,6 @@ pnpm-lock.yaml /desktop/resources/backend/*.exe !/desktop/resources/backend/.gitkeep /desktop/resources/icon.ico + +# Local scratch file accidentally generated during development +/bento-summary.html diff --git a/tools/debug_message_types.py b/tools/debug_message_types.py index 5002a57..c426f29 100644 --- a/tools/debug_message_types.py +++ b/tools/debug_message_types.py @@ -1,9 +1,11 @@ #!/usr/bin/env python3 """调试消息类型返回值""" +import os import requests -resp = requests.get('http://localhost:8000/api/chat/messages', params={ +PORT = os.environ.get("WECHAT_TOOL_PORT", "10392") +resp = requests.get(f'http://localhost:{PORT}/api/chat/messages', params={ 'account': 'wxid_v4mbduwqtzpt22', 'username': 'wxid_qmzc7q0xfm0j22', 'limit': 100 diff --git a/tools/test_image_api.py b/tools/test_image_api.py index cac32d9..bdd6e72 100644 --- a/tools/test_image_api.py +++ b/tools/test_image_api.py @@ -1,9 +1,10 @@ #!/usr/bin/env python3 """测试图片 API""" +import os import requests r = requests.get( - 'http://localhost:8000/api/chat/media/image', + f'http://localhost:{os.environ.get("WECHAT_TOOL_PORT", "10392")}/api/chat/media/image', params={ 'account': 'wxid_v4mbduwqtzpt22', 'md5': '8753fcd3b1f8c4470b53551e13c5fbc1',