Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is a quick bash script to make your Mac speak a random line from Donald Trump's Washington Post Editorial Interview. Because it sounds even crazier spoken by your computer. Just copy and paste into your terminal and hit return.
curl -s -N --location https://www.washingtonpost.com/blogs/post-partisan/wp/2016/03/21/a-transcript-of-donald-trumps-meeting-with-the-washington-post-editorial-board/ \
| perl -0ne 'my @list = $_ =~ m/<p>TRUMP:(.*?)<\/p>/smg; print $list[rand @list]' \
| say --progress -i -r 300 -v Alex
@nilsjesper
Copy link
Author

nilsjesper commented Mar 30, 2016

If you've used up all of THOSE Trump quotes, here's his latest town hall:

curl -s -N --location https://www.washingtonpost.com/news/the-fix/wp/2016/03/30/donald-trump-did-a-cnn-townhall-last-night-and-it-was-a-classic/ \
| perl -0ne 'my @list = $_ =~ m/<span class="s1">TRUMP:(.*?)<\/span>/smg; print $list[rand @list]' \
| say -i -r 300 -v Alex

@nilsjesper
Copy link
Author

nilsjesper commented Aug 5, 2016

Updated w/ his latest interview...

curl -s -N --location https://www.washingtonpost.com/politics/donald-trump-transcript-the-republican-nominee-in-his-own-words/2016/08/02/77e9fa68-58eb-11e6-831d-0324760ca856_story.html \ | perl -0ne 'my @list = $_ =~ m/<p>TRUMP:(.*?)<\/p>/smg; print $list[rand @list]' \ | say -i -r 300 -v Alex

@nilsjesper
Copy link
Author

nilsjesper commented Nov 23, 2016

Updated with now president-elect Trump's NYTimes editorial round table

curl -s -b -N --location http://www.nytimes.com/2016/11/23/us/politics/trump-new-york-times-interview-transcript.html \
| perl -0ne 'my @list = $_ =~ m/>TRUMP:(.*?)<\/p>/smg; print $list[rand @list]' \
| say  -i -r 300 -v Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment