From 202dbc7f96a080c183f45addad23a7e248132957 Mon Sep 17 00:00:00 2001 From: gasolin Date: Sat, 26 Sep 2020 00:36:01 +0800 Subject: [PATCH] rename plugins to skills --- CHANGELOG.md | 2 ++ README.md | 32 ++++++++++----------- docs/README.md | 10 +++---- index.html | 6 ++-- plugins/README.md | 1 - samples/addon.html | 4 +-- samples/brain.html | 2 +- samples/index.html | 4 +-- samples/search-react.html | 4 +-- samples/search.html | 4 +-- samples/{plugin.html => skill.html} | 2 +- skills/README.md | 1 + {plugins => skills}/saihubot-diagnostics.js | 0 {plugins => skills}/saihubot-help.js | 0 {plugins => skills}/saihubot-search.js | 0 15 files changed, 37 insertions(+), 35 deletions(-) delete mode 100644 plugins/README.md rename samples/{plugin.html => skill.html} (95%) create mode 100644 skills/README.md rename {plugins => skills}/saihubot-diagnostics.js (100%) rename {plugins => skills}/saihubot-help.js (100%) rename {plugins => skills}/saihubot-search.js (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3ba5d1..e7e35f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ * use es6 syntax and clean up saihubot.js * deprecated `sendHTML`, prefer call from `adapter.sendHTML` +* now call `plugins` as `skills` +* add readme to explain the `skills` and `addons` ## 0.9 2017/2/18 diff --git a/README.md b/README.md index 1f9788e..59b8ef2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Saihubot [![NPM version][npm-image]][npm-url] :robot: Framework to build :speech_balloon: message/chat bots in the :globe_with_meridians: **Browser**. -You can add new skills to bot via plugins and extend its ability via addons. All with plain javascript. :clap: +You can add new skills to bot via `skills` and extend its ability via `addons`. All with plain javascript. :clap: -Saihubot's API is very similar to [hubot](https://github.com/github/hubot/)'s API, so a developer who has learned hubot-plugins could learn saihu-plugins very quickly. :zap: +Saihubot's API is inspired by [hubot](https://github.com/github/hubot/)'s API, so a developer who has learned `hubot-plugins` could learn `saihu-skills` very quickly. :zap: Check [Online Demo](https://gasolin.github.io/saihubot/) @@ -10,13 +10,13 @@ Check [Online Demo](https://gasolin.github.io/saihubot/) * Chatbot works in your browser, without server setup. * Written in plain Javascript, compatible with most browsers -* Structure is inspired by [hubot](https://github.com/github/hubot/) +* Structure was inspired by [hubot](https://github.com/github/hubot/) * Regex based message matching * Could write adapter to fully cooperate with your web UI * Could swap brain to support different backends - * Provide plugin architecture that able to expand functions + * Provide skills(pluginn) architecture that able to expand functions * Can extend bot functionality by import addons -* Tiny size, easy to learn (the init version has just 80 lines that bundle with three plugins) +* Tiny size, easy to learn (the init version has just 80 lines that bundle with three skills) * Each message can be customized with any HTML elements * Reference chat UI style is included * Plugin callbacks are extremely flexible; You can control in-page elements, execute the local command, fetch remote data, trigger remote actions... @@ -82,33 +82,33 @@ And don't forget to include related libraries in the header - + ``` ## Usage -Saihubot provide 3 default plugins `ping`, `time`, `echo` that you can include via: +Saihubot provide 3 default skills `ping`, `time`, `echo` that you can include via: ```html - + ``` -### Ping plugin +### Ping skill ``` me: ping bot: PONG ``` -### :clock2: Time plugin: +### :clock2: Time skill: ``` me: time bot: Device time is Fri Aug 05 2016 21:22:11 GMT+0800 (CST) ``` -### :loudspeaker: Echo plugin: +### :loudspeaker: Echo skill: ``` me: echo Hello World! @@ -118,15 +118,15 @@ bot: Hello World! ![Imgur](http://i.imgur.com/Ljjf0Fwl.png) -Saihubot also provide Search plugins, you can include it via: +Saihubot also provide Search skills, you can include it via: ```html - + ``` Check the [Search Demo](https://gasolin.github.io/saihubot/samples/search). -### :mag_right: Google Search plugin: +### :mag_right: Google Search skill: ``` me: g saihubot @@ -137,7 +137,7 @@ me: search saihubot bot: Search saihubot via Google ``` -### Wikipedia plugin: +### Wikipedia skill: ``` me: wiki saihubot @@ -146,7 +146,7 @@ me: wikipedia saihubot bot: Search saihubot via Wikipedia ``` -### Google Translate plugin +### Google Translate skill ``` me: translate hello diff --git a/docs/README.md b/docs/README.md index c476c3b..d89e26a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,14 +8,14 @@ layout: docs ## Developer -### Make a plugin +### Make a skill -Plugin denotes rules and responses that the bot use to match and respond to the user. +Skill denotes rules and responses that the bot use to match and respond to the user. Open browser's devtool and you can start to manipulate `Saihubot` object. -Plugins are located in `Saihubot.responses`, and that is the place all you need to deal with. +Skills are located in `Saihubot.responses`, and that is the place all you need to deal with. -Check [Plugin Demo](https://gasolin.github.io/saihubot/samples/plugin) for example. +Check [Skills Demo](https://gasolin.github.io/saihubot/samples/skill) for example. ![Imgur](http://i.imgur.com/mbhTwf6l.png) @@ -55,7 +55,7 @@ This adapter is cooperate with [index.html](https://github.com/gasolin/saihubot/ ### Make a brain -The brain is used to store something generated when user talks with the bot. Plugins and addons can store states into the brain and use it later. +The brain is used to store something generated when user talks with the bot. Skills and addons can store states into the brain and use it later. [saihubot-brain-localforage.js](https://github.com/gasolin/saihubot/tree/gh-pages/addons/saihubot-brain-localforage.js) is created to store brain content with browser storage. You can find [sample](http://gasolin.idv.tw/saihubot/samples/brain.html) here. diff --git a/index.html b/index.html index 2c2e3da..916a94e 100644 --- a/index.html +++ b/index.html @@ -12,9 +12,9 @@ - - - + + + diff --git a/plugins/README.md b/plugins/README.md deleted file mode 100644 index 2eee351..0000000 --- a/plugins/README.md +++ /dev/null @@ -1 +0,0 @@ -Plugins means new abilities that saihubot can use to respond to the user. diff --git a/samples/addon.html b/samples/addon.html index e09c148..77257b6 100644 --- a/samples/addon.html +++ b/samples/addon.html @@ -9,7 +9,7 @@ - +
@@ -29,7 +29,7 @@ - + diff --git a/samples/index.html b/samples/index.html index eb1fb0a..1737a6e 100644 --- a/samples/index.html +++ b/samples/index.html @@ -9,8 +9,8 @@ - - + + diff --git a/samples/search-react.html b/samples/search-react.html index f9cd48f..fccdf7e 100644 --- a/samples/search-react.html +++ b/samples/search-react.html @@ -11,8 +11,8 @@ - - + + diff --git a/samples/search.html b/samples/search.html index 3467586..b35d448 100644 --- a/samples/search.html +++ b/samples/search.html @@ -9,8 +9,8 @@ - - + + diff --git a/samples/plugin.html b/samples/skill.html similarity index 95% rename from samples/plugin.html rename to samples/skill.html index dd9b5f7..cc1456b 100644 --- a/samples/plugin.html +++ b/samples/skill.html @@ -9,7 +9,7 @@ - + diff --git a/skills/README.md b/skills/README.md new file mode 100644 index 0000000..e3b1d27 --- /dev/null +++ b/skills/README.md @@ -0,0 +1 @@ +Skills means new abilities that saihubot can use to respond to the user. diff --git a/plugins/saihubot-diagnostics.js b/skills/saihubot-diagnostics.js similarity index 100% rename from plugins/saihubot-diagnostics.js rename to skills/saihubot-diagnostics.js diff --git a/plugins/saihubot-help.js b/skills/saihubot-help.js similarity index 100% rename from plugins/saihubot-help.js rename to skills/saihubot-help.js diff --git a/plugins/saihubot-search.js b/skills/saihubot-search.js similarity index 100% rename from plugins/saihubot-search.js rename to skills/saihubot-search.js