mirror of
https://github.com/thewesker/iron_ebooks.git
synced 2025-12-20 04:11:12 -05:00
Will randomly add another sentence for short tweets
This commit is contained in:
5
ebook.rb
5
ebook.rb
@@ -77,6 +77,11 @@ else
|
||||
tweet.gsub(/\s\w+.$/, '') # randomly losing the last word sometimes like horse_ebooks
|
||||
end
|
||||
|
||||
if tweet.length < 40 && rand(5) == 0
|
||||
puts "Short tweet. Adding another sentence randomly"
|
||||
tweet += " #{markov.generate_sentence}"
|
||||
end
|
||||
|
||||
if !params["tweet"]
|
||||
puts "MARKOV: #{tweet}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user