Skip to content

Instantly share code, notes, and snippets.

@sh4869
Created July 5, 2014 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sh4869/effe7aa3c40947f8355b to your computer and use it in GitHub Desktop.
Save sh4869/effe7aa3c40947f8355b to your computer and use it in GitHub Desktop.
# 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