Skip to content

Commit ab6f3f5

Browse files
committed
update readme
1 parent 1571a35 commit ab6f3f5

File tree

1 file changed

+12
-197
lines changed

1 file changed

+12
-197
lines changed

README.md

Lines changed: 12 additions & 197 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,25 @@
1414

1515
[📄 Chinese Document](https://wechaty.readthedocs.io/zh_CN/latest/) [python-wechaty-template](https://github.com/wechaty/python-wechaty-template)
1616

17-
## Getting Started
17+
## What's Python Wechaty
1818

19-
* [Python Wechaty Quick Start Project Template](https://github.com/wechaty/python-wechaty-template)
20-
* [Padlocal机器人](https://wechaty.readthedocs.io/zh_CN/latest/introduction/use-padlocal-protocol/)
21-
* 钉钉机器人
22-
* 微信公众号机器人
23-
* 飞书机器人
24-
* ...
19+
Python Wechaty is an Open Source software application for building chatbots. It is a modern Conversational RPA SDK which Chatbot makers can use to create a bot in a few lines of code.
20+
21+
You can use Wechaty to build a chatbot which automates conversations and interact with people through instant messaging platforms such as WhatsApp, WeChat, WeCom, Gitter and Lark among others.
2522

26-
## Connecting Chatbots
23+
## Features
2724

28-
[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-brightgreen.svg)](https://github.com/Wechaty/wechaty)
25+
* **Message Processing**: You can use the simple code, similar to natural language, to process the message receving & sending.
26+
* **Plugin System**: You can use the community-contributed plugins to handle your scenario.
27+
* **Write onece, run multi IM platform**: python wechaty support many IM platforms with one code, all of you need to do is switch the token token type.
28+
* **Wechaty UI**: you can use the powerful wechaty-ui to create interactive chatbot
29+
* ...
2930

30-
Wechaty is a Conversational SDK for Chatbot Makers that can help you create a bot in 9 lines of Python.
3131

32-
## Voice of the Developers
32+
## Getting Started
3333

34-
> "Wechaty is a great solution, I believe there would be much more users recognize it." [link](https://github.com/Wechaty/wechaty/pull/310#issuecomment-285574472)
35-
> &mdash; <cite>@Gcaufy, Tencent Engineer, Author of [WePY](https://github.com/Tencent/wepy)</cite>
36-
>
37-
> "太好用,好用的想哭"
38-
> &mdash; <cite>@xinbenlv, Google Engineer, Founder of HaoShiYou.org</cite>
39-
>
40-
> "最好的微信开发库" [link](http://weibo.com/3296245513/Ec4iNp9Ld?type=comment)
41-
> &mdash; <cite>@Jarvis, Baidu Engineer</cite>
42-
>
43-
> "Wechaty让运营人员更多的时间思考如何进行活动策划、留存用户,商业变现" [link](http://mp.weixin.qq.com/s/dWHAj8XtiKG-1fIS5Og79g)
44-
> &mdash; <cite>@lijiarui, Founder & CEO of Juzi.BOT.</cite>
45-
>
46-
> "If you know js ... try Wechaty, it's easy to use."
47-
> &mdash; <cite>@Urinx Uri Lee, Author of [WeixinBot(Python)](https://github.com/Urinx/WeixinBot)</cite>
34+
There are few steps to start your bot, and we give a [bot-template](https://github.com/wechaty/python-wechaty-template) for you to getting started quickly.
4835

49-
See more at [Wiki:Voice Of Developer](https://github.com/Wechaty/wechaty/wiki/Voice%20Of%20Developer)
5036

5137
## Join Us
5238

@@ -56,177 +42,6 @@ Wechaty is used in many ChatBot projects by thousands of developers. If you want
5642

5743
Scan now, because other Wechaty Python developers want to talk with you too! (secret code: _python wechaty_)
5844

59-
## The World's Shortest Python ChatBot: 9 lines of Code
60-
61-
```python
62-
from wechaty import Wechaty
63-
64-
import asyncio
65-
async def main():
66-
bot = Wechaty()
67-
bot.on('scan', lambda status, qrcode, data: print('Scan QR Code to login: {}\nhttps://wechaty.js.org/qrcode/{}'.format(status, qrcode)))
68-
bot.on('login', lambda user: print('User {} logged in'.format(user)))
69-
bot.on('message', lambda message: print('Message: {}'.format(message)))
70-
await bot.start()
71-
72-
asyncio.run(main())
73-
```
74-
75-
## Python Wechaty Developing Plan
76-
77-
We already have Wechaty in TypeScript, It will be not too hard to translate the TypeScript(TS) to Python(PY) because [wechaty](https://github.com/wechaty/wechaty) has only 3,000 lines of the TS code, they are well designed and de-coupled by the [wechaty-puppet](https://github.com/wechaty/wechaty-puppet/) abstraction. So after we have translated those 3,000 lines of TypeScript code, we will almost be done.
78-
79-
As we have already a ecosystem of Wechaty in TypeScript, so we will not have to implement everything in Python, especially, in the Feb 2020, we have finished the [wechaty-grpc](https://github.com/wechaty/grpc) service abstracting module with the [wechaty-puppet-service](https://github.com/wechaty/wechaty-puppet-service) implmentation.
80-
81-
The following diagram shows out that we can reuse almost everything in TypeScript, and what we need to do is only the block located at the top right of the diagram: `Wechaty (Python)`.
82-
83-
```ascii
84-
+--------------------------+ +--------------------------+
85-
| | | |
86-
| Wechaty (TypeScript) | | Wechaty (Python) |
87-
| | | |
88-
+--------------------------+ +--------------------------+
89-
90-
+-------------------------------------------------------+
91-
| Wechaty Puppet Service |
92-
| |
93-
| (wechaty-puppet-service) |
94-
+-------------------------------------------------------+
95-
96-
+--------------------- wechaty-grpc ----------------------+
97-
98-
+-------------------------------------------------------+
99-
| Wechaty Puppet Abstract |
100-
| |
101-
| (wechaty-puppet) |
102-
+-------------------------------------------------------+
103-
104-
+--------------------------+ +--------------------------+
105-
| Pad Protocol | | Web Protocol |
106-
| | | |
107-
| wechaty-puppet-padplus | |(wechaty-puppet-puppeteer)|
108-
+--------------------------+ +--------------------------+
109-
+--------------------------+ +--------------------------+
110-
| Windows Protocol | | Mac Protocol |
111-
| | | |
112-
| (wechaty-puppet-windows) | | (wechaty-puppet-macpro) |
113-
+--------------------------+ +--------------------------+
114-
```
115-
116-
## Example: How to Translate TypeScript to Python
117-
118-
There's a 100 lines class named `Image` in charge of downloading the WeChat image to different sizes.
119-
120-
It is a great example for demonstrating how do we translate the TypeScript to Python in Wechaty Way:
121-
122-
### Image Class Source Code
123-
124-
- TypeScript: <https://github.com/wechaty/wechaty/blob/master/src/user/image.ts>
125-
- Python: <https://github.com/wechaty/python-wechaty/blob/master/src/wechaty/user/image.py>
126-
127-
If you are interested in the translation and want to look at how it works, it will be a good start from reading and comparing those two `Image` class files in TypeScript and Python at the same time.
128-
129-
## To-do List
130-
131-
- TS: TypeScript
132-
- SLOC: Source Lines Of Code
133-
134-
### Wechaty Internal Modules
135-
136-
1. [ ] Class Wechaty @wj-mCat
137-
- TS SLOC(1160): <https://github.com/wechaty/wechaty/blob/master/src/wechaty.ts>
138-
- [ ] Code
139-
- [ ] Unit Tests
140-
- [ ] Documentation
141-
1. [ ] Class Contact
142-
- TS SLOC(804): <https://github.com/wechaty/wechaty/blob/master/src/user/contact.ts>
143-
- [ ] Code
144-
- [ ] Unit Tests
145-
- [ ] Documentation
146-
1. [ ] Class ContactSelf
147-
- TS SLOC(199): <https://github.com/wechaty/wechaty/blob/master/src/user/contact-self.ts>
148-
- [ ] Code
149-
- [ ] Unit Tests
150-
- [ ] Documentation
151-
1. [ ] Class Message
152-
- TS SLOC(1054): <https://github.com/wechaty/wechaty/blob/master/src/user/message.ts>
153-
- [ ] Code
154-
- [ ] Unit Tests
155-
- [ ] Documentation
156-
1. [ ] Class Room
157-
- TS SLOC(1194): <https://github.com/wechaty/wechaty/blob/master/src/user/room.ts>
158-
- [ ] Code
159-
- [ ] Unit Tests
160-
- [ ] Documentation
161-
1. [ ] Class Image @wj-mCat
162-
- TS SLOC(60): <https://github.com/wechaty/wechaty/blob/master/src/user/image.ts>
163-
- [ ] Code
164-
- [ ] Unit Tests
165-
- [ ] Documentation
166-
1. [x] Class Accessory @huan
167-
- TS SLOC(179): <https://github.com/wechaty/wechaty/blob/master/src/accessory.ts>
168-
- [x] Code
169-
- [x] Unit Tests
170-
- [ ] Documentation
171-
1. [ ] Class Config @wj-mCat
172-
- TS SLOC(187): <https://github.com/wechaty/wechaty/blob/master/src/config.ts>
173-
- [ ] Code
174-
- [ ] Unit Tests
175-
- [ ] Documentation
176-
1. [ ] Class Favorite
177-
- TS SLOC(52): <https://github.com/wechaty/wechaty/blob/master/src/user/favorite.ts>
178-
- [ ] Code
179-
- [ ] Unit Tests
180-
- [ ] Documentation
181-
1. [ ] Class Friendship
182-
- TS SLOC(417): <https://github.com/wechaty/wechaty/blob/master/src/user/friendship.ts>
183-
- [ ] Code
184-
- [ ] Unit Tests
185-
- [ ] Documentation
186-
1. [ ] Class MiniProgram
187-
- TS SLOC(70): <https://github.com/wechaty/wechaty/blob/master/src/user/mini-program.ts>
188-
- [ ] Code
189-
- [ ] Unit Tests
190-
- [ ] Documentation
191-
1. [ ] Class RoomInvitation
192-
- TS SLOC(317): <https://github.com/wechaty/wechaty/blob/master/src/user/room-invitation.ts>
193-
- [ ] Code
194-
- [ ] Unit Tests
195-
- [ ] Documentation
196-
1. [ ] Class Tag
197-
- TS SLOC(190): <https://github.com/wechaty/wechaty/blob/master/src/user/tag.ts>
198-
- [ ] Code
199-
- [ ] Unit Tests
200-
- [ ] Documentation
201-
1. [ ] Class UrlLink
202-
- TS SLOC(107): <https://github.com/wechaty/wechaty/blob/master/src/user/url-link.ts>
203-
- [ ] Code
204-
- [ ] Unit Tests
205-
- [ ] Documentation
206-
207-
### Wechaty External Modules
208-
209-
1. [ ] Class FileBox
210-
- TS SLOC(638): <https://github.com/huan/file-box/blob/master/src/file-box.ts>
211-
- [ ] Code
212-
- [ ] Unit Tests
213-
- [ ] Documentation
214-
1. [ ] Class MemoryCard
215-
- TS SLOC(376): <https://github.com/huan/memory-card/blob/master/src/memory-card.ts>
216-
- [ ] Code
217-
- [ ] Unit Tests
218-
- [ ] Documentation
219-
1. [ ] Class WechatyPuppet
220-
- TS SLOC(1115): <https://github.com/wechaty/wechaty-puppet/blob/master/src/puppet.ts>
221-
- [ ] Code
222-
- [ ] Unit Tests
223-
- [ ] Documentation
224-
1. [ ] Class WechatyPuppetHostie
225-
- TS SLOC(909): <https://github.com/wechaty/wechaty-puppet-service/blob/master/src/client/puppet-service.ts>
226-
227-
## Usage
228-
229-
WIP...
23045

23146
## Requirements
23247

0 commit comments

Comments
 (0)