Create a gist now

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby -wU
#
# This script uses the command line twitter client https://github.com/twitter/twurl
# You have to authorize Twurl one time before you can use ist, please read the
# README for Twurl which describes how to do it.
# What it basically does is it sets the flag that you don't want to see
# any retweets of any users at all.
require 'json'
friends = JSON.parse(`twurl "/1.1/friends/ids.json"`)["ids"]
no_retweets = JSON.parse(`twurl "/1.1/friendships/no_retweets/ids.json"`)
(friends - no_retweets).each do |id|
puts `twurl -X POST "/1.1/friendships/update.json" -d "user_id=#{id}&retweets=false"`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment