Skip to content

Instantly share code, notes, and snippets.

@sorah
Last active August 29, 2015 14:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorah/8eba3a2ad8e9fad64b60 to your computer and use it in GitHub Desktop.
Save sorah/8eba3a2ad8e9fad64b60 to your computer and use it in GitHub Desktop.
d = '2014-12-15'
h = {};
open("/var/db/akane/timeline/#{d}.deleted.txt", "r") do |io|
io.each_line do |l|
_,u,t = l.chomp.split(",")
(h[u] ||= {})[t] = true
end
end
h.each do |u, ts|
#files = Dir["/var/db/akane/users/#{u}/tweets.*.txt"]
files = ["/var/db/akane/users/#{u}/tweets.#{d[0,7]}.txt"]
system "grep", ts.keys.join("\\|"), *files
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment