Compare commits

...

3 Commits

Author SHA1 Message Date
evilbeast
da155c82e3 更新readme 2022-10-28 15:51:35 +08:00
evilbeast
92364c1e65 支持python3.11 2022-10-26 01:22:17 +08:00
evilbeast
90c824d0b0 去除sql_query例子 2022-10-09 12:46:55 +08:00
6 changed files with 10 additions and 44 deletions

View File

@ -1,6 +1,6 @@
<h1 align="center">NtChat</h1>
<p align="center">
<a href="https://github.com/smallevilbeast/ntchat/releases"><img src="https://img.shields.io/badge/release-0.1.16-blue.svg?" alt="release"></a>
<a href="https://github.com/smallevilbeast/ntchat/releases"><img src="https://img.shields.io/badge/release-0.1.17-blue.svg?" alt="release"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-brightgreen.svg?" alt="License"></a>
</p>
@ -19,8 +19,7 @@
## 帮助文档
- 查看 [常见问题](docs/FAQ.md)
- 查看 [常用示例](examples)
- 查看 [NtChatHttp接口示例](fastapi_example)
- 加入群聊 [PyXCGUI&NtChat交流群](https://jq.qq.com/?_wv=1027&k=oIXzbTbI)
- 查看 [NtChatHttp接口示例](fastapi_example)
- 查看 [PyXCGUI项目](https://github.com/smallevilbeast/pyxcgui)
## 安装
@ -202,7 +201,3 @@ if __name__ == '__main__':
app.exit()
```
帮助&支持
-------------------------
点击链接加入群聊 [PyXCGUI&NtChat交流群](https://jq.qq.com/?_wv=1027&k=oIXzbTbI)

View File

@ -1,34 +0,0 @@
# -*- coding: utf-8 -*-
import sys
import time
import ntchat
wechat = ntchat.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
wechat.open(smart=True)
# 等待登录
wechat.wait_login()
# 获取群列表并输出
room_wxid = wechat.get_rooms()[0]["wxid"]
def get_room_name(wechat: ntchat.WeChat, room_wxid: str):
sql = f"select nickname from contact where username='{room_wxid}'"
result = wechat.sql_query(sql, 1)["result"]
if result:
return result[0][0]
return None
print("群名是: ", get_room_name(wechat, room_wxid))
# 以下是为了让程序不结束如果有用于PyQt等有主循环消息的框架可以去除下面代码
try:
while True:
time.sleep(0.5)
except KeyboardInterrupt:
ntchat.exit_()
sys.exit()

View File

@ -1,4 +1,4 @@
VERSION = '0.1.16'
VERSION = '0.1.17'
LOG_LEVEL = "DEBUG"
LOG_KEY = 'NTCHAT_LOG'

View File

@ -3,6 +3,7 @@
%UserProfile%\.pyenv\pyenv-win\versions\3.8.0-win32\python.exe -m pip install --upgrade pip setuptools wheel
%UserProfile%\.pyenv\pyenv-win\versions\3.9.0-win32\python.exe -m pip install --upgrade pip setuptools wheel
%UserProfile%\.pyenv\pyenv-win\versions\3.10.0-win32\python.exe -m pip install --upgrade pip setuptools wheel
%UserProfile%\.pyenv\pyenv-win\versions\3.11.0-win32\python.exe -m pip install --upgrade pip setuptools wheel
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
pushd ..
%UserProfile%\.pyenv\pyenv-win\versions\3.6.0-win32\python.exe setup.py bdist_wheel -d wheelhouse
@ -10,4 +11,5 @@ pushd ..
%UserProfile%\.pyenv\pyenv-win\versions\3.8.0-win32\python.exe setup.py bdist_wheel -d wheelhouse
%UserProfile%\.pyenv\pyenv-win\versions\3.9.0-win32\python.exe setup.py bdist_wheel -d wheelhouse
%UserProfile%\.pyenv\pyenv-win\versions\3.10.0-win32\python.exe setup.py bdist_wheel -d wheelhouse
%UserProfile%\.pyenv\pyenv-win\versions\3.11.0-win32\python.exe setup.py bdist_wheel -d wheelhouse
popd

View File

@ -3,6 +3,7 @@
%UserProfile%\.pyenv\pyenv-win\versions\3.8.0\python.exe -m pip install --upgrade pip setuptools wheel
%UserProfile%\.pyenv\pyenv-win\versions\3.9.0\python.exe -m pip install --upgrade pip setuptools wheel
%UserProfile%\.pyenv\pyenv-win\versions\3.10.0\python.exe -m pip install --upgrade pip setuptools wheel
%UserProfile%\.pyenv\pyenv-win\versions\3.11.0\python.exe -m pip install --upgrade pip setuptools wheel
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
pushd ..
%UserProfile%\.pyenv\pyenv-win\versions\3.6.0\python.exe setup.py bdist_wheel -d wheelhouse
@ -10,4 +11,5 @@ pushd ..
%UserProfile%\.pyenv\pyenv-win\versions\3.8.0\python.exe setup.py bdist_wheel -d wheelhouse
%UserProfile%\.pyenv\pyenv-win\versions\3.9.0\python.exe setup.py bdist_wheel -d wheelhouse
%UserProfile%\.pyenv\pyenv-win\versions\3.10.0\python.exe setup.py bdist_wheel -d wheelhouse
%UserProfile%\.pyenv\pyenv-win\versions\3.11.0\python.exe setup.py bdist_wheel -d wheelhouse
popd

View File

@ -194,7 +194,7 @@ extension.extra_compile_cpp_args = extra_compile_cpp_args[target_os]
setup(
name='ntchat',
version='0.1.16',
version='0.1.17',
description='About Conversational RPA SDK for Chatbot Makers',
long_description="",
long_description_content_type='text/markdown',
@ -209,7 +209,8 @@ setup(
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10'
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11'
],
package_data={"": ["py.typed", "*.pyi", "helper*.dat"]},
include_package_data=False,