Created
July 5, 2014 08:54
-
-
Save sh4869/effe7aa3c40947f8355b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Coding: UTF-8 | |
require 'csv' | |
csv = CSV.table('tweets.csv') | |
tweets = csv[:text] | |
tweets.each do |txt| | |
text = txt.to_s | |
if text.start_with?("RT","@") == false | |
file = File.open("tweet.txt","a") | |
file.write("#{text}\n") | |
file.close | |
puts text | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment