Granting bonuses from command line

Author : Alex Sorokin, sorokin2@uiuc.edu
Copyright - University of Illinois at Urbana-Champaign.

Here's a simple and painfully slow method to grant bonuses from command line (linux):

1. Make a tab-separated text file with 4 columns:
assignmentIdForBonusworkerIdForBonus bonusAmount bonusComment
7W3YXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXY8FZ1Z A1XXXXXXXXXIGQ 0.06 "payment for extra sentences"

An example is here: workload.demo.bonus_file.

2. Download MT_grantBonus.py and make it executable
wget http://vision.cs.uiuc.edu/annotation/examples/bonus/MT_grantBonus.py
chmod 755 MT_grantBonus.py

3. Run MT_grantBonus.py against your bonus file. The output is the script to send bonuses:
MT_grantBonus.py workload.bonus_file >grand_all_bonuses.sh
chomd 700 grand_all_bonuses.sh

An example output is here: grant_bonus.demo.sh.

4. Set MTURK_CMD_HOME environment variable to where you installed mturk command line tools.
export MTURK_CMD_HOME=/my_path_to_mturk_tools
./grant_all_bonuses.sh

Watch bonus awarded messages appear one by one.