Skip to content

Instantly share code, notes, and snippets.

Last active March 24, 2016 19:51
What would you like to do?
BernieBot - Makes your mac speak a random Bernie Sanders response from a recent town hall. Sequel to the Random Donald Trump Word Salad Bot -
curl -s -N --location \
| 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