mirror of
https://github.com/thewesker/iron_ebooks.git
synced 2025-12-20 04:11:12 -05:00
Reject tweets if they match source text at all
This commit is contained in:
6
ebook.rb
6
ebook.rb
@@ -72,7 +72,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
|
||||||
|
|
||||||
break if !tweet.nil? && tweet.length < 110 && !source_tweets.any? {|t| t =~ /^#{tweet}/ || t =~ /#{tweet}$/ }
|
if !params["tweet"]
|
||||||
|
puts "MARKOV: #{tweet}"
|
||||||
|
end
|
||||||
|
|
||||||
|
break if !tweet.nil? && tweet.length < 110 && !source_tweets.any? {|t| t =~ /#{tweet}/ }
|
||||||
end
|
end
|
||||||
|
|
||||||
if params["tweet"]
|
if params["tweet"]
|
||||||
|
|||||||
Reference in New Issue
Block a user