<commit_before>![Wechaty](https://raw.githubusercontent.com/zixia/wechaty/master/image/wechaty-logo-en.png)

# Wechaty [![Linux Circle CI](https://circleci.com/gh/zixia/wechaty.svg?style=svg)](https://circleci.com/gh/zixia/wechaty) [![Linux Build Status](https://travis-ci.org/zixia/wechaty.svg?branch=master)](https://travis-ci.org/zixia/wechaty) [![Win32 Build status](https://ci.appveyor.com/api/projects/status/60fgkemki7e6upb9?svg=true)](https://ci.appveyor.com/project/zixia/wechaty)

Connecting ChatBots.

Wechaty is a Bot Framework for Wechat **Personal** Account.

> Easy creating personal wechat bot in 9 lines of code.

It supports [linux](https://travis-ci.org/zixia/wechaty), [win32](https://ci.appveyor.com/project/zixia/wechaty) and [darwin(OSX/Mac)](https://travis-ci.org/zixia/wechaty).

[![Join the chat at https://gitter.im/zixia/wechaty](https://badges.gitter.im/zixia/wechaty.svg)](https://gitter.im/zixia/wechaty?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![node](https://img.shields.io/node/v/wechaty.svg?maxAge=2592000)](https://nodejs.org/)
[![Coverage Status](https://coveralls.io/repos/github/zixia/wechaty/badge.svg?branch=master)](https://coveralls.io/github/zixia/wechaty?branch=master)
[![npm version](https://badge.fury.io/js/wechaty.svg)](https://badge.fury.io/js/wechaty)
[![dependency status][dependency-image]][dependency-url]
[![dev dependency status][dev-dependency-image]][dev-dependency-url]
[![Repo Size](https://reposs.herokuapp.com/?path=zixia/wechaty)]()
[![Downloads][downloads-image]][downloads-url]


# Voice of the Developer

> @GasLin : it may be the best wecaht sdk i have seen in github! [link](https://github.com/zixia/wechaty/issues/8#issuecomment-228971491)

> @ak5 : Thanks for this it's quite cool! [link](https://github.com/zixia/wechaty/issues/4)

> @ccaapton : wechaty library looks fantastic! [link](https://github.com/zixia/wechaty/issues/9)

> @kinhunt : very cool project. [link](https://github.com/zixia/wechaty/issues/6)

# Examples
Wechaty is dead easy to use: 7 lines javascript for your 1st wechat bot.

## 1. Basic: 7 lines
The following 7 lines of code implement a bot log all message to console:

```javascript
const Wechaty = require('wechaty')
const bot = new Wechaty()

bot
.on('scan', ({url, code}) => console.log(`Scan QrCode to login: ${code}\n${url}`))
.on('login',         user => console.log(`User ${user} logined`))
.on('message',    message => console.log(`Message: ${message}`))
.init()
```

Notice that you need to wait a moment while bot trys to get the login QRCode from Wechat. As soon as the bot gets login QRCode url, he will print url out. You need to scan the qrcode on wechat, and confirm login.

After that, bot will be on duty. (roger-bot source can be found at [here](https://github.com/zixia/wechaty/blob/master/example/roger-bot.js))

## 2. Advanced: dozens of lines
Here's an chatbot [ding-dong-bot](https://github.com/zixia/wechaty/blob/master/example/ding-dong-bot.js) who can reply _dong_ when receives a message _ding_.

## 3. Hardcore: hundreds of lines
Here's a chatbot [api-ai-bot](https://github.com/zixia/wechaty/blob/master/example/api-ai-bot.js), who can slightly understand NLP.

Natual Language Understanding enabled by [api.AI](https://api.ai), you can get your module on api.AI by it's free plan.

# Deploy

## Deploy with Heroku

TBD

~~Follow [these instructions](https://wechaty.readme.io/docs). Then, [![Deploy to Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)~~

## Deploy with Docker

TBD


# Installation
<commit_msg>add docker badges<commit_after>![Wechaty](https://raw.githubusercontent.com/zixia/wechaty/master/image/wechaty-logo-en.png)
# Wechaty [![Linux Circle CI](https://circleci.com/gh/zixia/wechaty.svg?style=svg)](https://circleci.com/gh/zixia/wechaty) [![Linux Build Status](https://travis-ci.org/zixia/wechaty.svg?branch=master)](https://travis-ci.org/zixia/wechaty) [![Win32 Build status](https://ci.appveyor.com/api/projects/status/60fgkemki7e6upb9?svg=true)](https://ci.appveyor.com/project/zixia/wechaty)

Connecting ChatBots.

Wechaty is a Bot Framework for Wechat **Personal** Account.

> Easy creating personal wechat bot in 9 lines of code.

It supports [linux](https://travis-ci.org/zixia/wechaty), [win32](https://ci.appveyor.com/project/zixia/wechaty) and [darwin(OSX/Mac)](https://travis-ci.org/zixia/wechaty).

[![Join the chat at https://gitter.im/zixia/wechaty](https://badges.gitter.im/zixia/wechaty.svg)](https://gitter.im/zixia/wechaty?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Coverage Status](https://coveralls.io/repos/github/zixia/wechaty/badge.svg?branch=master)](https://coveralls.io/github/zixia/wechaty?branch=master)
[![Repo Size](https://reposs.herokuapp.com/?path=zixia/wechaty)]()

[![node](https://img.shields.io/node/v/wechaty.svg?maxAge=2592000)](https://nodejs.org/)
[![npm version](https://badge.fury.io/js/wechaty.svg)](https://badge.fury.io/js/wechaty)
[![dependency status][dependency-image]][dependency-url]
[![dev dependency status][dev-dependency-image]][dev-dependency-url]
[![Downloads][downloads-image]][downloads-url]

[![Image Layers](https://badge.imagelayers.io/zixia/wechaty:latest.svg)](https://imagelayers.io/?images=zixia/wechaty:latest 'Get your own badge on imagelayers.io')
[![Docker Pulls](https://img.shields.io/docker/pulls/zixia/wechaty.svg)](https://hub.docker.com/r/zixia/wechaty/)
![Docker Stars](https://img.shields.io/docker/stars/zixia/wechaty.svg?maxAge=2592000)
[![Docker Repository on Quay.io](https://quay.io/repository/zixia/wechaty/status "Docker Repository on Quay.io")](https://quay.io/repository/zixia/wechaty)

# Voice of the Developer

> @GasLin : it may be the best wecaht sdk i have seen in github! [link](https://github.com/zixia/wechaty/issues/8#issuecomment-228971491)

> @ak5 : Thanks for this it's quite cool! [link](https://github.com/zixia/wechaty/issues/4)

> @ccaapton : wechaty library looks fantastic! [link](https://github.com/zixia/wechaty/issues/9)


# Examples
Wechaty is dead easy to use: 7 lines javascript for your 1st wechat bot.

## 1. Basic: 7 lines
The following 7 lines of code implement a bot log all message to console:

```javascript
const Wechaty = require('wechaty')
const bot = new Wechaty()
bot
.on('scan', ({url, code}) => console.log(`Scan QrCode to login: ${code}\n${url}`))
.on('login',         user => console.log(`User ${user} logined`))
.on('message',          m => console.log(`Message: ${m}`))
.init()
```

Notice that you need to wait a moment while bot trys to get the login QRCode from Wechat. As soon as the bot gets login QRCode url, he will print url out. You need to scan the qrcode on wechat, and confirm login.

After that, bot will be on duty. (roger-bot source can be found at [here](https://github.com/zixia/wechaty/blob/master/example/roger-bot.js))

## 2. Advanced: dozens of lines
Here's an chatbot [ding-dong-bot](https://github.com/zixia/wechaty/blob/master/example/ding-dong-bot.js) who can reply _dong_ when receives a message _ding_.

## 3. Hardcore: hundreds of lines
Here's a chatbot [api-ai-bot](https://github.com/zixia/wechaty/blob/master/example/api-ai-bot.js), who can slightly understand NLP.

Natual Language Understanding enabled by [api.AI](https://api.ai), you can get your module on api.AI by it's free plan.

# Deploy

## Deploy with Heroku

TBD

~~Follow [these instructions](https://wechaty.readme.io/docs). Then, [![Deploy to Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)~~

## Deploy with Docker

TBD


# Installation

{'fraction_non_alphanumeric': 0.16967556253270538, 'fraction_numerical': 0.010727367870225013, 'mean_word_length': 5.024428684003152, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, 'https://': 68, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6656387', 'n_tokens_mistral': 2935, 'n_tokens_neox': 2789, 'n_words': 569}