mirror of
https://github.com/thewesker/iron_ebooks.git
synced 2025-12-20 12:21:14 -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
|
tweet.gsub(/\s\w+.$/, '') # randomly losing the last word sometimes like horse_ebooks
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if tweet.length < 40 && rand(5) == 0
|
||||||
|
puts "Short tweet. Adding another sentence randomly"
|
||||||
|
tweet += " #{markov.generate_sentence}"
|
||||||
|
end
|
||||||
|
|
||||||
if !params["tweet"]
|
if !params["tweet"]
|
||||||
puts "MARKOV: #{tweet}"
|
puts "MARKOV: #{tweet}"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user