Skip to content

Commit

Permalink
add usage and install section
Browse files Browse the repository at this point in the history
  • Loading branch information
gasolin committed Aug 5, 2016
1 parent 59b40c5 commit 5487e42
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ Check [Online Demo](https://gasolin.github.io/huohubot/)

## Features

* Tiny size (80 lines that contain the core with 3 plugins in init version) that suit for embed in any web site
* Tiny size (80 lines that contain the core with 3 plugins in init version) that easy to understand and suit for embed in any web site
* Structure is inspired by [hubot](https://github.com/github/hubot/), which is a server side chatbot framework
* Provide plugin architecture that able to expand functions
* Regex based message matching
* Plugin callbacks are extremely flexible, you can control in-page elements, execute local command, fetch remote data, trigger remote actions...

[Imgur](http://i.imgur.com/Ljjf0Fw.png)

## How to Install

Expand All @@ -22,3 +21,34 @@ Clone the project then include the huohubot.js in your html file with 2 extra ta
<input id="message"><button id="send">Send</button>
<script defer src="huohubot.js"></script>
```

## Usage

Huohubot provide 3 build-in plugins `ping`, `time`, `echo`:

### Ping plugin

```
me: ping
bot: PONG
```

### Time plugin:

```
me: time
bot: Device time is Fri Aug 05 2016 21:22:11 GMT+0800 (CST)
```

### Echo plugin:

```
me: echo Hello World!
bot: Hello World!
```

![Imgur](http://i.imgur.com/Ljjf0Fw.png)

## License

Huohubot use MIT License
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
<body>
<div id="history"></div>
<input id="message"><button id="send">Send</button>

<p>
>> <a href="https://github.com/gasolin/huohubot/">Download Huohubot</a>
</p>

<script defer src="huohubot.js"></script>
</body>
</html>

0 comments on commit 5487e42

Please sign in to comment.