twitter_ebooks 2.1.4 → 2.1.5
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.
- data/README.md +2 -2
- data/bin/ebooks +5 -5
- data/lib/twitter_ebooks/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# twitter\_ebooks 2.1.
|
1
|
+
# twitter\_ebooks 2.1.5
|
2
2
|
|
3
3
|
Rewrite of my twitter\_ebooks code. While the original was solely a tweeting Markov generator, this framework helps you build any kind of interactive twitterbot which responds to mentions/DMs.
|
4
4
|
|
@@ -16,7 +16,7 @@ Run `ebooks new <reponame>` to generate a new repository containing a sample bot
|
|
16
16
|
# This is an example bot definition with event handlers commented out
|
17
17
|
# You can define as many of these as you like; they will run simultaneously
|
18
18
|
|
19
|
-
Ebooks::Bot.new("
|
19
|
+
Ebooks::Bot.new("abby_ebooks") do |bot|
|
20
20
|
# Consumer details come from registering an app at https://dev.twitter.com/
|
21
21
|
# OAuth details can be fetched with https://github.com/marcel/twurl
|
22
22
|
bot.consumer_key = "" # Your app consumer key
|
data/bin/ebooks
CHANGED
@@ -15,16 +15,16 @@ module Ebooks
|
|
15
15
|
exit
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
path = "./#{reponame}"
|
19
19
|
|
20
|
-
if File.exists?(
|
21
|
-
log "#{
|
20
|
+
if File.exists?(path)
|
21
|
+
log "#{path} already exists. Please remove if you want to recreate."
|
22
22
|
exit
|
23
23
|
end
|
24
24
|
|
25
|
-
FileUtils.cp_r(SKELETON_PATH,
|
25
|
+
FileUtils.cp_r(SKELETON_PATH, path)
|
26
26
|
|
27
|
-
File.open(File.join(
|
27
|
+
File.open(File.join(path, 'bots.rb'), 'w') do |f|
|
28
28
|
template = File.read(File.join(SKELETON_PATH, 'bots.rb'))
|
29
29
|
f.write(template.gsub("{{BOT_NAME}}", reponame))
|
30
30
|
end
|