Hubot在Mac平台的安装摸索

最近和龙泉寺的贤二聊了很多,觉得在不摸索一下hubot就实在说不过去了。Mac的安装其实很简单。但是有个巨坑。我还真TM掉进去了。

流程原文: https://hubot.github.com/docs/#scripts/

0. 安装node.js and npm 

去官方(https://nodejs.org/en/)下载个pkg,安装文件。

进入terminal输入 “sudo npm install npm -g”

1. 下载安装hubot生成器

进入terminal输入 “sudo npm install -g yo generator-hubot”

(输入密码)

2. 创建文件夹(重点!)

这里的myhubot可以改成其他名字

% mkdir myhubot

% cd myhubot

% yo hubot

3. 填写基本信息

(巨坑)Bot name 一定不能使用“hubot”,请选用其他名字。

其他资料懒的话一路回车就行了。也可以按自己喜好写点介绍。

adapter 有好多选择,甚至包括QQ。 https://hubot.github.com/docs/adapters/

4. git (不必要)

生成器在myhubot中会自动生成一个“.gitignore”隐藏文件夹。所以你可以初始化和添加所有文件:

% git init

% git add .

% git commit -m "Initial commit"

5. Run 运行

bin/hubot


好了开始调戏吧。

纪念那个拉我出坑我的帖子。

https://github.com/github/hubot/issues/1061

唉,之前不知道,各种查版本,差错,重装。


Google图片搜索引擎还要些其他操作

https://github.com/hubot-scripts/hubot-google-images/issues/10

Create a CSE via theseinstructions. I had to set a search criteria but then I removed it later.

Turn on images in Edit Search Engine > Setup > Basic > Image Search

Get ID in Edit Search Engine > Setup > Basic > Details (viathese instructions)

Get key herehttps://code.google.com/apis/console

Update your conf (and your modules if necessary)

Testhubot animate me gravy

你可能感兴趣的:(Hubot在Mac平台的安装摸索)