chatterbot 2.0.5 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +19 -0
- data/Gemfile +2 -2
- data/README.markdown +7 -21
- data/chatterbot.gemspec +3 -3
- data/docs/_site/advanced.html +43 -54
- data/docs/_site/configuration.html +23 -43
- data/docs/_site/contributing.html +18 -37
- data/docs/_site/deploying.html +44 -61
- data/docs/_site/examples.html +108 -123
- data/docs/_site/features.html +70 -71
- data/docs/_site/index.html +43 -64
- data/docs/_site/other-tools.html +22 -41
- data/docs/_site/rdoc.html +17 -36
- data/docs/_site/setup.html +62 -71
- data/docs/_site/tut.html +16 -36
- data/docs/_site/twitter-docs.html +17 -36
- data/docs/_site/walkthrough.html +35 -51
- data/docs/advanced.md +0 -5
- data/docs/deploying.md +0 -6
- data/docs/examples.md +0 -48
- data/docs/index.md +2 -3
- data/lib/chatterbot.rb +0 -1
- data/lib/chatterbot/bot.rb +5 -68
- data/lib/chatterbot/client.rb +2 -9
- data/lib/chatterbot/config.rb +0 -1
- data/lib/chatterbot/dsl.rb +0 -43
- data/lib/chatterbot/skeleton.rb +0 -2
- data/lib/chatterbot/version.rb +1 -1
- data/spec/bot_spec.rb +1 -76
- data/spec/client_spec.rb +0 -3
- data/spec/config_manager_spec.rb +6 -5
- data/spec/config_spec.rb +4 -1
- data/spec/dsl_spec.rb +1 -33
- data/templates/skeleton.txt +0 -47
- metadata +13 -21
- data/.document +0 -5
- data/.travis.yml +0 -9
- data/docs/_site/streaming.html +0 -506
- data/docs/streaming.md +0 -98
- data/examples/streaming_bot.rb +0 -49
- data/lib/chatterbot/streaming.rb +0 -72
- data/spec/streaming_spec.rb +0 -172
data/docs/_site/other-tools.html
CHANGED
@@ -9,15 +9,15 @@
|
|
9
9
|
<meta name="description" content="twitter bots in ruby">
|
10
10
|
|
11
11
|
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
12
|
-
<link rel="stylesheet" href="/css/syntax.css">
|
13
|
-
<link rel="stylesheet" href="/css/main.css">
|
12
|
+
<link rel="stylesheet" href="/chatterbot/css/syntax.css">
|
13
|
+
<link rel="stylesheet" href="/chatterbot/css/main.css">
|
14
14
|
</head>
|
15
15
|
<body>
|
16
16
|
|
17
17
|
<div class="container">
|
18
18
|
<div class=row-fluid>
|
19
19
|
<div id=header class=span12>
|
20
|
-
<h4><a class=brand href="/">chatterbot</a>
|
20
|
+
<h4><a class=brand href="/chatterbot/">chatterbot</a>
|
21
21
|
<small>twitter bots in ruby</small>
|
22
22
|
</h4>
|
23
23
|
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
<div id=navigation class=span2>
|
32
32
|
<ul class="nav nav-list">
|
33
|
-
<li><a href="/">Home</a></li>
|
33
|
+
<li><a href="/chatterbot/">Home</a></li>
|
34
34
|
|
35
35
|
|
36
36
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
<li data-order="">
|
58
58
|
|
59
|
-
<a href="/examples.html">Examples</a>
|
59
|
+
<a href="/chatterbot/examples.html">Examples</a>
|
60
60
|
|
61
61
|
</li>
|
62
62
|
|
@@ -82,7 +82,7 @@
|
|
82
82
|
|
83
83
|
<li data-order="">
|
84
84
|
|
85
|
-
<a href="/setup.html">Authorizing Your Bot</a>
|
85
|
+
<a href="/chatterbot/setup.html">Authorizing Your Bot</a>
|
86
86
|
|
87
87
|
</li>
|
88
88
|
|
@@ -97,14 +97,10 @@
|
|
97
97
|
|
98
98
|
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
100
|
|
105
101
|
<li data-order="">
|
106
102
|
|
107
|
-
<a href="/walkthrough.html">Walkthrough</a>
|
103
|
+
<a href="/chatterbot/walkthrough.html">Walkthrough</a>
|
108
104
|
|
109
105
|
</li>
|
110
106
|
|
@@ -119,7 +115,7 @@
|
|
119
115
|
|
120
116
|
<li data-order="">
|
121
117
|
|
122
|
-
<a href="/advanced.html">Advanced Features</a>
|
118
|
+
<a href="/chatterbot/advanced.html">Advanced Features</a>
|
123
119
|
|
124
120
|
</li>
|
125
121
|
|
@@ -129,7 +125,7 @@
|
|
129
125
|
|
130
126
|
<li data-order="">
|
131
127
|
|
132
|
-
<a href="/configuration.html">Configuration</a>
|
128
|
+
<a href="/chatterbot/configuration.html">Configuration</a>
|
133
129
|
|
134
130
|
</li>
|
135
131
|
|
@@ -143,7 +139,7 @@
|
|
143
139
|
|
144
140
|
<li data-order="">
|
145
141
|
|
146
|
-
<a href="/deploying.html">Running your Bot</a>
|
142
|
+
<a href="/chatterbot/deploying.html">Running your Bot</a>
|
147
143
|
|
148
144
|
</li>
|
149
145
|
|
@@ -157,7 +153,7 @@
|
|
157
153
|
|
158
154
|
<li data-order="">
|
159
155
|
|
160
|
-
<a href="/features.html">Basic Features</a>
|
156
|
+
<a href="/chatterbot/features.html">Basic Features</a>
|
161
157
|
|
162
158
|
</li>
|
163
159
|
|
@@ -180,16 +176,6 @@
|
|
180
176
|
|
181
177
|
|
182
178
|
|
183
|
-
|
184
|
-
<li data-order="">
|
185
|
-
|
186
|
-
<a href="/streaming.html">Streaming API</a>
|
187
|
-
|
188
|
-
</li>
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
179
|
|
194
180
|
|
195
181
|
|
@@ -218,7 +204,7 @@
|
|
218
204
|
|
219
205
|
<li data-order="">
|
220
206
|
|
221
|
-
<a href="/contributing.html">Contributing</a>
|
207
|
+
<a href="/chatterbot/contributing.html">Contributing</a>
|
222
208
|
|
223
209
|
</li>
|
224
210
|
|
@@ -259,10 +245,6 @@
|
|
259
245
|
|
260
246
|
|
261
247
|
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
248
|
|
267
249
|
|
268
250
|
|
@@ -305,7 +287,7 @@
|
|
305
287
|
|
306
288
|
<li data-order="">
|
307
289
|
|
308
|
-
<a href="/other-tools.html">Other Tools</a>
|
290
|
+
<a href="/chatterbot/other-tools.html">Other Tools</a>
|
309
291
|
|
310
292
|
</li>
|
311
293
|
|
@@ -330,10 +312,6 @@
|
|
330
312
|
|
331
313
|
|
332
314
|
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
315
|
|
338
316
|
<li data-order="">
|
339
317
|
|
@@ -362,24 +340,27 @@
|
|
362
340
|
</div>
|
363
341
|
|
364
342
|
<ul>
|
365
|
-
<li><a href="https://github.com/mispy/twitter_ebooks">twitter_ebooks</a> from mispy
|
343
|
+
<li><a href="https://github.com/mispy/twitter_ebooks">twitter_ebooks</a> from mispy
|
366
344
|
is powering a bunch of ebooks-ish accounts, and other things too.</li>
|
367
|
-
<li>The <a href="https://github.com/sferik/twitter">twitter gem</a> from sferik is
|
345
|
+
<li>The <a href="https://github.com/sferik/twitter">twitter gem</a> from sferik is
|
368
346
|
great, and is what sits beneath Chatterbot.</li>
|
369
|
-
<li><a href="https://github.com/sferik/t">t</a>, also by sferik, is a handy
|
347
|
+
<li><a href="https://github.com/sferik/t">t</a>, also by sferik, is a handy
|
370
348
|
command-line interface to Twitter.</li>
|
371
|
-
<li><a href="https://github.com/thricedotted/twitterbot">twitterbot</a> from thricedotted.</li>
|
372
|
-
<li><a href="https://github.com/tweepy/tweepy">tweepy</a>.</li>
|
349
|
+
<li><a href="https://github.com/thricedotted/twitterbot">twitterbot</a> from thricedotted.</li>
|
350
|
+
<li><a href="https://github.com/tweepy/tweepy">tweepy</a>.</li>
|
373
351
|
</ul>
|
374
352
|
|
375
353
|
|
354
|
+
|
376
355
|
</div>
|
377
356
|
|
378
357
|
</div>
|
379
358
|
|
380
359
|
<div class=row-fluid>
|
381
360
|
<div id=footer class=span12>
|
382
|
-
|
361
|
+
<!--
|
362
|
+
Documentation for <a href="https://github.com/muffinista/chatterbot">chatterbot</a>
|
363
|
+
-->
|
383
364
|
|
384
365
|
</div>
|
385
366
|
</div>
|
data/docs/_site/rdoc.html
CHANGED
@@ -9,15 +9,15 @@
|
|
9
9
|
<meta name="description" content="twitter bots in ruby">
|
10
10
|
|
11
11
|
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
12
|
-
<link rel="stylesheet" href="/css/syntax.css">
|
13
|
-
<link rel="stylesheet" href="/css/main.css">
|
12
|
+
<link rel="stylesheet" href="/chatterbot/css/syntax.css">
|
13
|
+
<link rel="stylesheet" href="/chatterbot/css/main.css">
|
14
14
|
</head>
|
15
15
|
<body>
|
16
16
|
|
17
17
|
<div class="container">
|
18
18
|
<div class=row-fluid>
|
19
19
|
<div id=header class=span12>
|
20
|
-
<h4><a class=brand href="/">chatterbot</a>
|
20
|
+
<h4><a class=brand href="/chatterbot/">chatterbot</a>
|
21
21
|
<small>twitter bots in ruby</small>
|
22
22
|
</h4>
|
23
23
|
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
<div id=navigation class=span2>
|
32
32
|
<ul class="nav nav-list">
|
33
|
-
<li><a href="/">Home</a></li>
|
33
|
+
<li><a href="/chatterbot/">Home</a></li>
|
34
34
|
|
35
35
|
|
36
36
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
<li data-order="">
|
58
58
|
|
59
|
-
<a href="/examples.html">Examples</a>
|
59
|
+
<a href="/chatterbot/examples.html">Examples</a>
|
60
60
|
|
61
61
|
</li>
|
62
62
|
|
@@ -82,7 +82,7 @@
|
|
82
82
|
|
83
83
|
<li data-order="">
|
84
84
|
|
85
|
-
<a href="/setup.html">Authorizing Your Bot</a>
|
85
|
+
<a href="/chatterbot/setup.html">Authorizing Your Bot</a>
|
86
86
|
|
87
87
|
</li>
|
88
88
|
|
@@ -97,14 +97,10 @@
|
|
97
97
|
|
98
98
|
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
100
|
|
105
101
|
<li data-order="">
|
106
102
|
|
107
|
-
<a href="/walkthrough.html">Walkthrough</a>
|
103
|
+
<a href="/chatterbot/walkthrough.html">Walkthrough</a>
|
108
104
|
|
109
105
|
</li>
|
110
106
|
|
@@ -119,7 +115,7 @@
|
|
119
115
|
|
120
116
|
<li data-order="">
|
121
117
|
|
122
|
-
<a href="/advanced.html">Advanced Features</a>
|
118
|
+
<a href="/chatterbot/advanced.html">Advanced Features</a>
|
123
119
|
|
124
120
|
</li>
|
125
121
|
|
@@ -129,7 +125,7 @@
|
|
129
125
|
|
130
126
|
<li data-order="">
|
131
127
|
|
132
|
-
<a href="/configuration.html">Configuration</a>
|
128
|
+
<a href="/chatterbot/configuration.html">Configuration</a>
|
133
129
|
|
134
130
|
</li>
|
135
131
|
|
@@ -143,7 +139,7 @@
|
|
143
139
|
|
144
140
|
<li data-order="">
|
145
141
|
|
146
|
-
<a href="/deploying.html">Running your Bot</a>
|
142
|
+
<a href="/chatterbot/deploying.html">Running your Bot</a>
|
147
143
|
|
148
144
|
</li>
|
149
145
|
|
@@ -157,7 +153,7 @@
|
|
157
153
|
|
158
154
|
<li data-order="">
|
159
155
|
|
160
|
-
<a href="/features.html">Basic Features</a>
|
156
|
+
<a href="/chatterbot/features.html">Basic Features</a>
|
161
157
|
|
162
158
|
</li>
|
163
159
|
|
@@ -180,16 +176,6 @@
|
|
180
176
|
|
181
177
|
|
182
178
|
|
183
|
-
|
184
|
-
<li data-order="">
|
185
|
-
|
186
|
-
<a href="/streaming.html">Streaming API</a>
|
187
|
-
|
188
|
-
</li>
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
179
|
|
194
180
|
|
195
181
|
|
@@ -218,7 +204,7 @@
|
|
218
204
|
|
219
205
|
<li data-order="">
|
220
206
|
|
221
|
-
<a href="/contributing.html">Contributing</a>
|
207
|
+
<a href="/chatterbot/contributing.html">Contributing</a>
|
222
208
|
|
223
209
|
</li>
|
224
210
|
|
@@ -259,10 +245,6 @@
|
|
259
245
|
|
260
246
|
|
261
247
|
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
248
|
|
267
249
|
|
268
250
|
|
@@ -305,7 +287,7 @@
|
|
305
287
|
|
306
288
|
<li data-order="">
|
307
289
|
|
308
|
-
<a href="/other-tools.html">Other Tools</a>
|
290
|
+
<a href="/chatterbot/other-tools.html">Other Tools</a>
|
309
291
|
|
310
292
|
</li>
|
311
293
|
|
@@ -330,10 +312,6 @@
|
|
330
312
|
|
331
313
|
|
332
314
|
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
315
|
|
338
316
|
<li data-order="">
|
339
317
|
|
@@ -363,13 +341,16 @@
|
|
363
341
|
|
364
342
|
|
365
343
|
|
344
|
+
|
366
345
|
</div>
|
367
346
|
|
368
347
|
</div>
|
369
348
|
|
370
349
|
<div class=row-fluid>
|
371
350
|
<div id=footer class=span12>
|
372
|
-
|
351
|
+
<!--
|
352
|
+
Documentation for <a href="https://github.com/muffinista/chatterbot">chatterbot</a>
|
353
|
+
-->
|
373
354
|
|
374
355
|
</div>
|
375
356
|
</div>
|
data/docs/_site/setup.html
CHANGED
@@ -9,15 +9,15 @@
|
|
9
9
|
<meta name="description" content="twitter bots in ruby">
|
10
10
|
|
11
11
|
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
12
|
-
<link rel="stylesheet" href="/css/syntax.css">
|
13
|
-
<link rel="stylesheet" href="/css/main.css">
|
12
|
+
<link rel="stylesheet" href="/chatterbot/css/syntax.css">
|
13
|
+
<link rel="stylesheet" href="/chatterbot/css/main.css">
|
14
14
|
</head>
|
15
15
|
<body>
|
16
16
|
|
17
17
|
<div class="container">
|
18
18
|
<div class=row-fluid>
|
19
19
|
<div id=header class=span12>
|
20
|
-
<h4><a class=brand href="/">chatterbot</a>
|
20
|
+
<h4><a class=brand href="/chatterbot/">chatterbot</a>
|
21
21
|
<small>twitter bots in ruby</small>
|
22
22
|
</h4>
|
23
23
|
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
<div id=navigation class=span2>
|
32
32
|
<ul class="nav nav-list">
|
33
|
-
<li><a href="/">Home</a></li>
|
33
|
+
<li><a href="/chatterbot/">Home</a></li>
|
34
34
|
|
35
35
|
|
36
36
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
<li data-order="">
|
58
58
|
|
59
|
-
<a href="/examples.html">Examples</a>
|
59
|
+
<a href="/chatterbot/examples.html">Examples</a>
|
60
60
|
|
61
61
|
</li>
|
62
62
|
|
@@ -82,7 +82,7 @@
|
|
82
82
|
|
83
83
|
<li data-order="">
|
84
84
|
|
85
|
-
<a href="/setup.html">Authorizing Your Bot</a>
|
85
|
+
<a href="/chatterbot/setup.html">Authorizing Your Bot</a>
|
86
86
|
|
87
87
|
</li>
|
88
88
|
|
@@ -97,14 +97,10 @@
|
|
97
97
|
|
98
98
|
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
100
|
|
105
101
|
<li data-order="">
|
106
102
|
|
107
|
-
<a href="/walkthrough.html">Walkthrough</a>
|
103
|
+
<a href="/chatterbot/walkthrough.html">Walkthrough</a>
|
108
104
|
|
109
105
|
</li>
|
110
106
|
|
@@ -119,7 +115,7 @@
|
|
119
115
|
|
120
116
|
<li data-order="">
|
121
117
|
|
122
|
-
<a href="/advanced.html">Advanced Features</a>
|
118
|
+
<a href="/chatterbot/advanced.html">Advanced Features</a>
|
123
119
|
|
124
120
|
</li>
|
125
121
|
|
@@ -129,7 +125,7 @@
|
|
129
125
|
|
130
126
|
<li data-order="">
|
131
127
|
|
132
|
-
<a href="/configuration.html">Configuration</a>
|
128
|
+
<a href="/chatterbot/configuration.html">Configuration</a>
|
133
129
|
|
134
130
|
</li>
|
135
131
|
|
@@ -143,7 +139,7 @@
|
|
143
139
|
|
144
140
|
<li data-order="">
|
145
141
|
|
146
|
-
<a href="/deploying.html">Running your Bot</a>
|
142
|
+
<a href="/chatterbot/deploying.html">Running your Bot</a>
|
147
143
|
|
148
144
|
</li>
|
149
145
|
|
@@ -157,7 +153,7 @@
|
|
157
153
|
|
158
154
|
<li data-order="">
|
159
155
|
|
160
|
-
<a href="/features.html">Basic Features</a>
|
156
|
+
<a href="/chatterbot/features.html">Basic Features</a>
|
161
157
|
|
162
158
|
</li>
|
163
159
|
|
@@ -180,16 +176,6 @@
|
|
180
176
|
|
181
177
|
|
182
178
|
|
183
|
-
|
184
|
-
<li data-order="">
|
185
|
-
|
186
|
-
<a href="/streaming.html">Streaming API</a>
|
187
|
-
|
188
|
-
</li>
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
179
|
|
194
180
|
|
195
181
|
|
@@ -218,7 +204,7 @@
|
|
218
204
|
|
219
205
|
<li data-order="">
|
220
206
|
|
221
|
-
<a href="/contributing.html">Contributing</a>
|
207
|
+
<a href="/chatterbot/contributing.html">Contributing</a>
|
222
208
|
|
223
209
|
</li>
|
224
210
|
|
@@ -259,10 +245,6 @@
|
|
259
245
|
|
260
246
|
|
261
247
|
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
248
|
|
267
249
|
|
268
250
|
|
@@ -305,7 +287,7 @@
|
|
305
287
|
|
306
288
|
<li data-order="">
|
307
289
|
|
308
|
-
<a href="/other-tools.html">Other Tools</a>
|
290
|
+
<a href="/chatterbot/other-tools.html">Other Tools</a>
|
309
291
|
|
310
292
|
</li>
|
311
293
|
|
@@ -330,10 +312,6 @@
|
|
330
312
|
|
331
313
|
|
332
314
|
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
315
|
|
338
316
|
<li data-order="">
|
339
317
|
|
@@ -363,76 +341,87 @@
|
|
363
341
|
|
364
342
|
<p>Getting a bot running on Twitter can be a little tricky. Twitter uses
|
365
343
|
a something called <a href="https://dev.twitter.com/oauth">OAuth</a> to validate
|
366
|
-
requests, but it
|
344
|
+
requests, but it’s a little more complicated than just specifying a
|
367
345
|
username/password.</p>
|
368
346
|
|
369
347
|
<ul>
|
370
|
-
<li
|
371
|
-
<
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
348
|
+
<li>
|
349
|
+
<p>Login to Twitter with your bot account</p>
|
350
|
+
</li>
|
351
|
+
<li>
|
352
|
+
<p>Go to https://apps.twitter.com/app/new</p>
|
353
|
+
</li>
|
354
|
+
<li>
|
355
|
+
<p>Fill out the form. You need to put a name, description, and Website
|
356
|
+
URL, although the URL doesn’t need to exist. <img src="./images/01-create-application.png" /></p>
|
357
|
+
</li>
|
358
|
+
<li>
|
359
|
+
<p>Save the form, and then click on the Permissions tab. You will need
|
360
|
+
to specify what level of access is needed for your bot. <img src="./images/02-application-permissions.png" /> You have three
|
378
361
|
choices here: Read only, Read and Write, and Read and Write and
|
379
|
-
access DMs. If your bot isn
|
380
|
-
(for example, if you
|
362
|
+
access DMs. If your bot isn’t actually ever going to post to Twitter
|
363
|
+
(for example, if you’re just running a search to find interesting
|
381
364
|
tweets), you can choose read-only. Otherwise, you should pick
|
382
365
|
read/write, or read/write/DMs. Chatterbot has limited support for
|
383
366
|
handling Direct Messages, but if you can imagine a situation where
|
384
|
-
you might want to handle them, you should pick this option.</p
|
385
|
-
|
367
|
+
you might want to handle them, you should pick this option.</p>
|
368
|
+
</li>
|
369
|
+
<li>
|
370
|
+
<p><em>NOTE:</em> When you try and save this form, there’s a good chance that
|
386
371
|
you will get an error that tells you to add a mobile phone to your Twitter
|
387
|
-
profile. It will look a lot like this: <img src="
|
388
|
-
</ul>
|
372
|
+
profile. It will look a lot like this: <img src="./images/03-mobile-number.png" /></p>
|
389
373
|
|
390
|
-
<p>You can add your number here:
|
374
|
+
<p>You can add your number here: https://twitter.com/settings/devices</p>
|
391
375
|
|
392
|
-
<p>After you add the number, Twitter will ask you to send them a text
|
393
|
-
|
394
|
-
|
376
|
+
<p>After you add the number, Twitter will ask you to send them a text
|
377
|
+
message. Once you do this, you can finish updating the settings for
|
378
|
+
your application. Later, we’ll remove the mobile number.</p>
|
379
|
+
</li>
|
380
|
+
</ul>
|
395
381
|
|
396
|
-
<p>Once you
|
382
|
+
<p>Once you’ve registered your application, you have two options. You can
|
397
383
|
create access tokens for your bot via Twitter, or you can run the
|
398
384
|
<code>chatterbot-register</code> script. Running the script will take care of
|
399
|
-
creating a template file for your bot, but if you don
|
385
|
+
creating a template file for your bot, but if you don’t want to do
|
400
386
|
that, here are the steps for doing this manually:</p>
|
401
387
|
|
402
388
|
<ul>
|
403
|
-
<li>
|
404
|
-
<li>click the
|
405
|
-
<li>It might take a few minutes for Twitter to actually generate the
|
389
|
+
<li>click the ‘Keys and Access Tokens’ link. You should see this: <img src="./images/04-access-token.png" /></li>
|
390
|
+
<li>click the ‘Create my access token’ link. </li>
|
391
|
+
<li>It might take a few minutes for Twitter to actually generate the
|
406
392
|
token. You can refresh the page a couple times until they are there,
|
407
|
-
then you can copy the keys into your application. There
|
393
|
+
then you can copy the keys into your application. There’s four keys
|
408
394
|
you will need for your bot, and a couple different ways to save
|
409
395
|
them:</li>
|
410
396
|
</ul>
|
411
397
|
|
412
398
|
<p><strong>In a separate YAML config file</strong>. Create a file named botname.yaml
|
413
|
-
|
399
|
+
– the botname part must match your bot’s username EXACTLY. Put the
|
414
400
|
following contents, pasting the credential values that you just
|
415
401
|
generated:</p>
|
416
|
-
|
402
|
+
|
403
|
+
<p><code>
|
404
|
+
---
|
417
405
|
:consumer_secret: Consumer Secret (API Secret) GOES HERE
|
418
406
|
:consumer_key: Consumer Key (API Key) GOES HERE
|
419
407
|
:token: Access Token GOES HERE
|
420
408
|
:secret: Access Token Secret GOES HERE
|
421
|
-
</code></
|
409
|
+
</code></p>
|
410
|
+
|
422
411
|
<p><strong>in the script</strong>. Add some lines to your bot script like this:
|
423
412
|
<code>
|
424
|
-
consumer_key
|
425
|
-
consumer_secret
|
426
|
-
secret
|
427
|
-
token
|
413
|
+
consumer_key 'Consumer Secret (API Secret)'
|
414
|
+
consumer_secret 'Consumer Key (API Key)'
|
415
|
+
secret 'Access Token Secret'
|
416
|
+
token 'Access Token'
|
428
417
|
</code></p>
|
429
418
|
|
430
|
-
<p><strong>in a database</strong>. If you
|
419
|
+
<p><strong>in a database</strong>. If you’ve setup chatterbot to use a database, you
|
431
420
|
can store your configuration info in the <strong>config</strong> table.</p>
|
432
421
|
|
433
422
|
<p><strong>NOTE</strong> At this point, you can remove the phone number from the bot
|
434
|
-
account if you like. From your bot
|
435
|
-
|
423
|
+
account if you like. From your bot’s account, click ‘Settings’ ->
|
424
|
+
‘Mobile’ -> ‘Delete my phone’.</p>
|
436
425
|
|
437
426
|
|
438
427
|
</div>
|
@@ -441,7 +430,9 @@ token 'Access Token'
|
|
441
430
|
|
442
431
|
<div class=row-fluid>
|
443
432
|
<div id=footer class=span12>
|
444
|
-
|
433
|
+
<!--
|
434
|
+
Documentation for <a href="https://github.com/muffinista/chatterbot">chatterbot</a>
|
435
|
+
-->
|
445
436
|
|
446
437
|
</div>
|
447
438
|
</div>
|