From 1f773d11a0c1b307b01504f45362545677a31b8e Mon Sep 17 00:00:00 2001 From: LittleCoder Date: Thu, 26 May 2016 15:00:50 +0800 Subject: [PATCH] Add py3 version --- README.md | 9 ++++++++- README_EN.md | 8 ++++++++ itchat/__init__.py | 2 +- setup.cfg | 2 -- setup.py | 6 +----- 5 files changed, 18 insertions(+), 9 deletions(-) delete mode 100644 setup.cfg diff --git a/README.md b/README.md index 114adcc2..7098cce6 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,13 @@ itchat是一个开源的微信个人号接口,使用他你可以轻松的通过命令行使用个人微信号。 -微信机器人的实现及命令行版微信见[robot分支](https://github.com/littlecodersh/ItChat/tree/robot)。 +微信机器人的实现及命令行版微信见[robot分支](https://github.com/littlecodersh/ItChat/tree/robot),Python 3.5.1 的版本可见这里:[here](https://github.com/littlecodersh/ItChat/tree/py3-dev)。 使用不到三十行的代码,你就可以完成一个能够处理所有信息的微信机器人。 如今微信已经成为了个人社交的很大一部分,希望这个项目能够帮助你扩展你的个人的微信号、方便自己的生活。 + ## Documents 你可以在[这里](https://itchat.readthedocs.org/zh/latest/)获取api的使用帮助。 @@ -71,6 +72,12 @@ Q: 为什么中文的文件没有办法上传? A: 这是由于`requests`的编码问题导致的。若需要支持中文文件传输,将[fields.py](https://github.com/littlecodersh/ItChat/blob/robot/plugin/config/fields.py)文件放入requests包的packages/urllib3下即可 +## Author + +[LittleCoder](https://github.com/littlecodersh): 整体构架及完成Python2版本。 + +[Chyroc](https://github.com/Chyroc): 完成Python3版本。 + ## See also [liuwons/wxBot](https://github.com/liuwons/wxBot): 类似的基于Python的微信机器人 diff --git a/README_EN.md b/README_EN.md index 009c2f79..4de4a1bb 100644 --- a/README_EN.md +++ b/README_EN.md @@ -10,6 +10,8 @@ Consisted of less than 30 lines of codes, a wechat robot can deal with all the o Now Wechat is an important part of personal sociality, hope that this repo can help you extend your personal wechat account and make your life easier. +Python 2.7.11 version is also available [here](https://github.com/littlecodersh/ItChat/tree/py3-dev). + ## Documents You may get the document of this api from [here](https://itchat.readthedocs.org/zh/latest/). @@ -70,6 +72,12 @@ Q: Why I can't upload files whose name is not purely english? A: This is caused because of the encoding of `requests`, you may fix it by placing [fields.py](https://github.com/littlecodersh/ItChat/blob/robot/plugin/config/fields.py) in packages/urllib of requests. +## Author + +[LittleCoder](https://github.com/littlecodersh): Structure and py2 version + +[Chyroc](https://github.com/Chyroc): py3 version + ## See also [liuwons/wxBot](https://github.com/liuwons/wxBot): A wechat robot similiar to the robot branch diff --git a/itchat/__init__.py b/itchat/__init__.py index d4860a95..5993e557 100644 --- a/itchat/__init__.py +++ b/itchat/__init__.py @@ -21,7 +21,7 @@ def start_receiving(): return __client.start_receiving() # if toUserName is set to None, msg will be sent to yourself def send_msg(msg = 'Test Message', toUserName = None): return __client.send_msg(msg, toUserName) def send_file(fileDir, toUserName): return __client.send_file(fileDir, toUserName) -def send_img(fileDir, toUserName): return __client.send_img(fileDir, toUserName) +def send_image(fileDir, toUserName): return __client.send_image(fileDir, toUserName) def add_friend(Status, UserName, Ticket): return __client.add_friend(Status, UserName, Ticket) def create_chatroom(memberList, topic = ''): return __client.create_chatroom(memberList, topic) def delete_member_from_chatroom(chatRoomUserName, memberList): return __client.delete_member_from_chatroom(chatRoomUserName, memberList) diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5eab4120..00000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/setup.py b/setup.py index dda6879f..11c875d8 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name='itchat', - version='1.0.7', + version='1.0.8', description='A complete wechat personal account api', long_description=long_description, @@ -39,10 +39,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', - # 'Programming Language :: Python :: 3', - # 'Programming Language :: Python :: 3.3', - # 'Programming Language :: Python :: 3.4', - # 'Programming Language :: Python :: 3.5', ], keywords='wechat itchat api robot weixin personal extend',