Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

twitter-top

twitter-top is a simple script that can tell you which people add the most tweets to your Twitter timeline.

Usage

Install required gems first:

gem install bundler
bundle

Then run the script to print your timeline stats:

./twitter-top.rb your_username

On the first run you will need to authorize the app in the browser to get access keys. After that they will be saved in a config file. You can have more than one account configured in the same config file by calling the script with different usernames passed as the first argument.

Here's how it looks for my bot @rails_bot that retweets popular tweets from the Ruby community (showing first 10 results):

SUM                  ====>  793 (137.5)

name                 share  all     /d   own     /d   RTs     /d  rpls     /d
------------------------------------------------------------------------------
@rails_bot                    1   (0.2)    0   (0.0)    1   (0.2)    0   (0.0)
------------------------------------------------------------------------------
@steveklabnik        10.1%   80  (13.9)   48   (8.3)    0   (0.0)   32   (5.5)
@headius              9.7%   77  (13.4)   52   (9.0)   24   (4.2)    1   (0.2)
@coreyhaines          9.1%   72  (12.5)   32   (5.5)   30   (5.2)   10   (1.7)
@ruby_news            6.4%   51   (8.8)   51   (8.8)    0   (0.0)    0   (0.0)
@dhh                  5.8%   46   (8.0)   28   (4.9)   18   (3.1)    0   (0.0)
@avdi                 5.3%   42   (7.3)   33   (5.7)    6   (1.0)    3   (0.5)
@mperham              5.2%   41   (7.1)   23   (4.0)   16   (2.8)    2   (0.3)
@_zzak                4.4%   35   (6.1)   23   (4.0)   11   (1.9)    1   (0.2)
@lrz                  4.3%   34   (5.9)   20   (3.5)   12   (2.1)    2   (0.3)
@drnic                3.7%   29   (5.0)    4   (0.7)   23   (4.0)    2   (0.3)

The numbers in the parentheses are averages per day, which is what you're mostly interested about (the available period will change depending on how many people you follow). Your own tweets don't count towards the total sum.

You can also print the stats for specific people you don't follow yet to see how much impact on your timeline they would have:

./twitter-top.rb your_username tim_cook gruber marcoarment siracusa
name                     feed/d   own/d   RTs/d  rpls/d
-------------------------------------------------------
@siracusa                   7.9     1.6     6.3    15.5
@marcoarment                6.9     3.5     3.4     9.9
@gruber                     4.3     2.5     1.8    16.3
@tim_cook                   0.3     0.2     0.0     0.0

In this case the "all" column is replaced by "feed", which is only their own tweets and RTs but without replies, since it's not possible to say how many of the replies you'd actually see in your timeline (probably much less than what you see in the last column).

You can also just load the script in irb and play with the methods directly (start at the bottom of the file):

irb
require './twitter-top'

Yes, I know the code isn't very DRY or well organized, deal with it (or send me a PR).

Credits

Created by Kuba Suder (@kuba_suder), licensed under Very Simple Public License.

About

A small thingie that shows which people you follow add the most tweets to your Twitter feed.

Resources

License

Releases

No releases published

Packages

No packages published

Languages