CyberPrefixer scrapes news headlines from the Google News RSS feed, and attempts to find headlines that are complete, short enough to use in a tweet, and relatively inoffensive. It then uses topia.termextract to tag the parts-of-speech in the headline, and prefixes any nouns with "cyber". Although the idea came from Darius Kazemi's Cyberpunk Fiction Machine, I found it created some wonderful, if not alarming, headlines.
'Heartbleed' cyberthreat puts cyberpasswords, cybercredit cards and other cyberdata at cyberrisk
— CyberPrefixer (@cyberprefixer) April 9, 2014
Bitcoin virtual cybercurrency is on cyberverge of cybercollapse
— CyberPrefixer (@cyberprefixer) February 26, 2014
Wintry cyberstorm lashes eastern US, threatens Thanksgiving cybertravel
— CyberPrefixer (@cyberprefixer) November 27, 2013
SubstitutionBot was suggested to me by Jonathan Goodwin, who messaged me to say "Please make a twitter bot for xkcd #1288 I would be so happy." I suggested that maybe it should be combined with xkcd #1322, and set to work.
SubstitutionBot reuses much of the same code as CyberPrefixer. It has the same morbid regular expression, and performs the same checks on the length and format of the headline itself. However, because SubstitutionBot needs a larger volume of headlines than CyberPrefixer (because relatively few headlines contain words that will be substituted), I use The Guardian's API to retrieve headlines. Once a suitable headline is found, appropriate words are substituted using a simple dictionary lookup.
kinda probably Islamic plot to take over Birmingham schools may be hoax
— SubstitutionBot (@SubstitutionBot) March 13, 2014
Boris Johnson gets Flappy flappy plane tribute with Flappy Mayor game
— SubstitutionBot (@SubstitutionBot) April 13, 2014
EU parliament votes for tougher cat emissions limits
— SubstitutionBot (@SubstitutionBot) February 25, 2014
misheardly uses the last.fm API to find popular songs, then scrapes the lyrics from a lyrics website. It attempts to find the chorus of the song by finding the most frequently-repeated block of lyrics, then takes a snippet of those that's short enough to tweet. Using the RhymeBrain API, it finds the least frequently-used word in the snippet (to avoid rhyming words like "the"). It then hits the RhymeBrain API again to find a rhyming word that's not terribly unusual and that has a similar number of syllables, and replaces the original word with the rhyme.
"Well you cured my Dysentery blues / Yeah you made it all alright" - "Knee Socks", Arctic Monkeys
— Misheardly (@misheardly) March 14, 2014
"When I open the window / I iguana hug you / Cause you remind me of the air / I said yeah" - "Gust of Wind", Pharrell Williams
— Misheardly (@misheardly) March 12, 2014
"But I'm a creep, I'm a dildo / What the hell am I doing here? / I don't belong here" - "Creep", Radiohead
— Misheardly (@misheardly) March 19, 2014
you're valued searches Twitter for sad tweets, such as tweets saying "nobody likes me". It then responds to the user by replying to the tweet with a response like "You're valued." It avoids retweets and replies to other tweets, and attempts to avoid responding to tweets that contain song lyrics.
BostonSnowbot uses the Forecast.io API to find predicted snowfall in Boston, MA, then tweet when the predictions change.
#boston #snow: Tue, 2/17: 1–3 in. Wed, 2/18: <1 in. Sat, 2/21: <1 in. Sun, 2/22: 2–4 in. Mon, 2/23: <1 in.
— BostonSnowbot (@BostonSnowbot) February 17, 2015