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/tut.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,7 +341,9 @@
|
|
363
341
|
|
364
342
|
<div class=row-fluid>
|
365
343
|
<div id=footer class=span12>
|
366
|
-
|
344
|
+
<!--
|
345
|
+
Documentation for <a href="https://github.com/muffinista/chatterbot">chatterbot</a>
|
346
|
+
-->
|
367
347
|
|
368
348
|
</div>
|
369
349
|
</div>
|
@@ -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/walkthrough.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,39 +341,43 @@
|
|
363
341
|
|
364
342
|
<h2 id="make-a-twitter-account">Make a Twitter account</h2>
|
365
343
|
|
366
|
-
<p>First thing you
|
367
|
-
Twitter. That
|
344
|
+
<p>First thing you’ll need to do is create an account for your bot on
|
345
|
+
Twitter. That’s the easy part.</p>
|
368
346
|
|
369
347
|
<h2 id="run-the-generator">Run the generator</h2>
|
370
348
|
|
371
349
|
<p>Chatterbot comes with a script named <code>chatterbot-register</code> which will
|
372
|
-
handle two tasks
|
350
|
+
handle two tasks – it will authorize your bot with Twitter and it
|
373
351
|
will generate a skeleton script, which you use to implement your
|
374
352
|
actual bot.</p>
|
375
353
|
|
376
354
|
<p>When you run <code>chatterbot-register</code> it will walk you through the
|
377
355
|
authorization process. If you prefer, you can do this manually. If
|
378
|
-
you
|
379
|
-
<a href="
|
356
|
+
you’d like to learn more about it, you can read the
|
357
|
+
<a href="setup.html">Authorizing your Bot</a> section.</p>
|
380
358
|
|
381
359
|
<h2 id="write-your-bot">Write your bot</h2>
|
382
360
|
|
383
361
|
<p>Chatterbot is written in ruby, but it accepts some very simple
|
384
362
|
scripting commands which can handle almost everything you might need
|
385
363
|
to do on Twitter. You can get some ideas of things you can do on the
|
386
|
-
<a href="
|
387
|
-
|
388
|
-
|
389
|
-
|
364
|
+
<a href="examples.html">Examples</a> page.</p>
|
365
|
+
|
366
|
+
<pre><code>require 'chatterbot/dsl'
|
367
|
+
search("'surely you must be joking'") do |tweet|
|
368
|
+
reply "@#{tweet_user(tweet)} I am serious, and don't call me Shirley!", tweet
|
390
369
|
end
|
391
|
-
</code></pre
|
370
|
+
</code></pre>
|
371
|
+
|
392
372
|
<p>Or, you can create a bot object yourself, extend it if needed, and use it like so:</p>
|
393
|
-
|
394
|
-
bot
|
395
|
-
|
373
|
+
|
374
|
+
<pre><code>bot = Chatterbot::Bot.new
|
375
|
+
bot.search("'surely you must be joking'") do |tweet|
|
376
|
+
bot.reply "@#{tweet_user(tweet)} I am serious, and don't call me Shirley!", tweet
|
396
377
|
end
|
397
|
-
</code></pre
|
398
|
-
|
378
|
+
</code></pre>
|
379
|
+
|
380
|
+
<p>That’s it!</p>
|
399
381
|
|
400
382
|
|
401
383
|
</div>
|
@@ -404,7 +386,9 @@ end
|
|
404
386
|
|
405
387
|
<div class=row-fluid>
|
406
388
|
<div id=footer class=span12>
|
407
|
-
|
389
|
+
<!--
|
390
|
+
Documentation for <a href="https://github.com/muffinista/chatterbot">chatterbot</a>
|
391
|
+
-->
|
408
392
|
|
409
393
|
</div>
|
410
394
|
</div>
|