message_group config_file
Where config_file is a YAML file containing account and message info. Note that this should be readable only by you (i.e. chmod 600 config_file).
This script is a command-line front end for the WWW::Myspace::Message module that lets you message all the members of a specific MySpace group. This is handy if, say, your band sounds like another band and you want to send a message to the members of that group saying that they might like your music because they like that band.
Sample config file: --- account: myaccount@myspace.com password: mypassword subject: Hi there! cache_file: /path/to/mycache message: | This is a message. It is, and must be, indented by two spaces. - Me group: 1255555 # You can also do this to specify multiple groups (notice the indent again): group: - 1255555 - 1244444 - 1345553
This script will read the config file and start messaging. If it hits the max_count value or a CAPTCHA response, it will sleep for 24 hours, then continue. If the script is stopped or interrupted, re-run it using the same config file and it will pick up where it left off. The script invokes the send_all method in WWW::Myspace::Message. Use perldoc WWW::Myspace::Message to read the docs on that module.
Note: To run this as a cron job, set delay_time to 0 in the config file. This will make it exit instead of pausing when it hits max_count or CAPTCHA. This is good because it'll re-read the friends list on the next run, so it'll pick up any changes.
delay_time: 0
Be careful when specifying multiple groups. The script will read all the friends from all the groups each time it's run. Since you're only going to message about 300 per day, that can be a big waste of resources. Try to do one group at a time.