You can do extend this in a bunch of other ways:
- Instead of printing to screen, send to twilio or OSX popups
- Extend the keyword checking to the content or their comments
- Restrict the catchall subreddit /r/all to something more specific like /r/netsec
- Pump the submission through sentiment analysis and graph over time to figure out if people hate you
Below is the code for the script:
Once you run that with your specific OAUTH details, you'll get streaming submissions outputted to your screen:
Currently the script is only triggering if the word " I " is in the post (for testing), obviously change to your specific keyword.