Retjilp logs into your account, scans all the tweets from your following list for a set of matching or forbidden words, and retweets the ones that match (using the native retweet API)
Prerequisites of this script are Ruby (tested with 1.9.3-p125) and the “oauth” and “json_pure” ruby gems. The preferred method of installing prerequisites is to install the bundler gem (“gem install bundler”) then execute “bundle install”.
To use this script, you will need to have registered an application with twitter.com/apps to get a consumer key and secret, and fill these values in the 'config' file. After having changed the 'config' file, edit the variables in the initialize method.
To start the script, run './retjilp.rb'. To get a list of command-line parameters, use the “–help” ok “-h” option. The first time the script is run, it will ask you to authorize the application in your twitter account. After this is done, the script will automatically log in the next time it is run.
To run it periodically add it to crontab using the provided run.sh script. Create the /etc/cron.d/retjilp file with this content:
exec su - YOUR_USERNAME -c 'PATH_TO_RUN.SH ./retjilp.rb –summary'
Adapt the line with the username you use to run the script (please don't use root) and the path to the run.sh script.
You can launch the script with the –stderr option to use STDERR to read messages. Without this option the script will create the retjilp.log file with the log messages. If you'll use crontab to run the script and want a daily report, launch it with the –stderr option (and, if you prefer, the optional –summary option)