This script watches a Slack channel and posts the most recent message to a scrolling Betabrite LED sign until terminated. If the most recent message contains a Hashtag, it searches Twitter and posts the most recent Twitter post matching that Hashtag on a specified interval or until another message in the Slack channel is posted. Run it in a Cron job on a Raspberry Pi for zero maintenance and place it anywhere! Big thanks to Abraham Williams for the twitteroauth scripts!
-
Obtain Slack API Information (https://api.slack.com/)
-
Obtain Twitter API Information (https://apps.twitter.com/)
-
Edit "run.php" to include Slack Token and Channel
-
Edit "twitter.php" to include API Tokens and Keys
-
Modify "led.pl" near the bottom to customize LED colors and scrolling styles
-
Execute "run.php" and ptionally set it up in a keep-alive Cron job (* * * * * ps aux |grep slack |grep -v "grep"; if [ $? -eq 1 ]; then php /home/pi/SlackAndTwitterToLED/run.php; fi")
Enjoy! :)