提交 58e11df7 编写于 作者: L LittleCoder

Fix missing attachment of docs & add docs

上级 5ddb4b32
......@@ -188,7 +188,9 @@ A: 有些账号是天生无法给自己的账号发送信息的,建议使用`f
## 作者
[LittleCoder][littlecodersh]: 整体构架及完成Python2 Python3版本。
[LittleCoder][littlecodersh]: 构架及维护Python2 Python3版本。
[tempdban][tempdban]: 协议、构架及日常维护。
[Chyroc][Chyroc]: 完成第一版本的Python3构架。
......@@ -220,6 +222,7 @@ A: 有些账号是天生无法给自己的账号发送信息的,建议使用`f
[fields.py-2]: https://gist.github.com/littlecodersh/9a0c5466f442d67d910f877744011705
[fields.py-3]: https://gist.github.com/littlecodersh/e93532d5e7ddf0ec56c336499165c4dc
[littlecodersh]: https://github.com/littlecodersh
[tempdban]: https://github.com/tempdban
[Chyroc]: https://github.com/Chyroc
[liuwons-wxBot]: https://github.com/liuwons/wxBot
[zixia-wechaty]: https://github.com/zixia/wechaty
......
......@@ -19,7 +19,17 @@ Now Wechat is an important part of personal life, hopefully this repo can help y
**Simple uses**
With itchat, you only need to write this to reply personal text messages.
With itchat, if you want to send a message to filehelper, this is how:
.. code:: python
import itchat
itchat.auto_login()
itchat.send('Hello, filehelper', toUserName='filehelper')
And you only need to write this to reply personal text messages.
.. code:: python
......
......@@ -20,14 +20,24 @@ pip install itchat
## Simple uses
With itchat, you only need to write this to reply personal text messages.
With itchat, if you want to send a message to filehelper, this is how:
```python
import itchat
itchat.auto_login()
itchat.send('Hello, filehelper', toUserName='filehelper')
```
And you only need to write this to reply personal text messages.
```python
import itchat
@itchat.msg_register(itchat.content.TEXT)
def text_reply(msg):
itchat.send(msg['Text'], msg['FromUserName'])
return msg['Text']
itchat.auto_login()
itchat.run()
......@@ -180,6 +190,8 @@ A: Some account simply can't send messages to yourself, so use `filehelper` inst
[LittleCoder][littlecodersh]: Structure and py2 py3 version
[tempdban][tempdban]: Structure and daily maintainance
[Chyroc][Chyroc]: first py3 version
## See also
......@@ -207,6 +219,7 @@ Or you may also use [![Gitter][gitter-picture]][gitter]
[fields.py-2]: https://gist.github.com/littlecodersh/9a0c5466f442d67d910f877744011705
[fields.py-3]: https://gist.github.com/littlecodersh/e93532d5e7ddf0ec56c336499165c4dc
[littlecodersh]: https://github.com/littlecodersh
[tempdban]: https://github.com/tempdban
[Chyroc]: https://github.com/Chyroc
[liuwons-wxBot]: https://github.com/liuwons/wxBot
[zixia-wechaty]: https://github.com/zixia/wechaty
......
......@@ -12,7 +12,7 @@ send(msg='Text Message', toUserName=None)
* '@fil@文件地址'将会被识别为传送文件,'@img@图片地址'将会被识别为传送图片,'@vid@视频地址'将会被识别为小视频
* toUserName:发送对象,如果留空将会发送给自己
* 返回值:发送成功->True, 失败->False
* 程序示例:使用的素材可以在[这里](https://yunpan.cn/OcqZm3RJ9fxWdz)(提取码:6bc0)下载
* 程序示例:使用的素材可以在[这里][attachment]下载
```python
#coding=utf8
......@@ -53,7 +53,7 @@ send_file(fileDir, toUserName=None)
* fileDir:文件路径(不存在该文件时将打印无此文件的提醒)
* toUserName:发送对象,如果留空将会发送给自己
* 返回值:发送成功->True, 失败->False
* 程序示例:使用的素材可以在[这里](https://yunpan.cn/OcqZm3RJ9fxWdz)(提取码:eaee)下载
* 程序示例:使用的素材可以在[这里][attachment](提取码:eaee)下载
```python
#coding=utf8
......@@ -73,7 +73,7 @@ send_img(fileDir, toUserName=None)
* fileDir:文件路径(不存在该文件时将打印无此文件的提醒)
* toUserName:发送对象,如果留空将会发送给自己
* 返回值:发送成功->True, 失败->False
* 程序示例:使用的素材可以在[这里](https://yunpan.cn/OcqZm3RJ9fxWdz)(提取码:eaee)下载
* 程序示例:使用的素材可以在[这里][attachment](提取码:eaee)下载
```python
#coding=utf8
......@@ -103,3 +103,5 @@ itchat.auto_login()
# 请确保该程序目录下存在:demo.mp4
itchat.send_file('demo.mp4')
```
[attachment]: http://7xrip4.com1.z0.glb.clouddn.com/ItChat/%E4%B8%8A%E4%BC%A0%E7%B4%A0%E6%9D%90.zip
import time, Queue
import time
try:
import Queue
except ImportError:
import queue as Queue
from .client import client
from . import content # this is for creating pyc
__version__ = '1.1.19'
__version__ = '1.1.21'
__client = client()
HOT_RELOAD = False
......@@ -87,7 +91,7 @@ def configured_reply():
The main problem I'm worrying about is the mismatching of new friends added on phone
If you have any good idea, pleeeease report an issue. I will be more than grateful. '''
try:
msg = __client.msgList.get(timeout=1000)
msg = __client.msgList.get(timeout=1)
except Queue.Empty:
pass
else:
......
......@@ -3,8 +3,11 @@ import os, sys, time, re, io
import threading, subprocess
import json, xml.dom.minidom, mimetypes
import copy, pickle, random
import Queue
import traceback
try:
import Queue
except ImportError:
import queue as Queue
import requests
......
import os, time, copy, Queue
import os, time, copy
try:
import Queue
except ImportError:
import queue as Queue
class Storage:
def __init__(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册