BernieBot - Makes your mac speak a random Bernie Sanders response from a recent town hall. Sequel to the Random Donald Trump Word Salad Bot - https://gist.github.com/nilsjesper/bae589c5e4cfba38e69e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -N --location http://cnnpressroom.blogs.cnn.com/2016/03/13/full-rush-transcript-senator-bernie-sanders-cnn-tv-one-democratic-presidential-town-hall/ \ | |
| perl -MHTML::Entities -0ne '$_ =~ s/\n//gi; push @list, $1 while $_ =~ m/SANDERS: (.*?)(ANNOUNCER|CLINTON|QUESTION|TAPPER|MARTIN)/smg; $out = decode_entities($list[rand @list]); $out =~ s/(<.*?>|[A-Z]{6,})//g; print $out' \ | |
| say -i -r 300 -v Alex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment