Created
April 26, 2017 21:48
Revisions
-
atog created this gist
Apr 26, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ # install the 't' gem: httjp://sferik.github.io/t/ # set the path to the executable t_cmd = '~/.rbenv/shims/t' followings = `#{t_cmd} followings`.split /\s/ whois_cmd = "#{t_cmd} whois " activity = {} followings.each do |f| info = `#{whois_cmd} #{f}` last_active = {f => info.match(/Last update.*\((.*)\)/).captures.first} activity.merge! last_active end years = activity.select {|k,v| v =~ /years/} months = activity.select {|k,v| v =~ /months/} months = months.select {|k,v| v[0,2].to_i > 3} all_inactive = years.merge(months) # run t unfollow {output from the command below} puts all_inactive.keys.join(' ')