Twitter‎ > ‎

Haikus

Using Parse-Twitter-Archive and haikufinder and my Twitter archive and some good old-fashioned yak shaving, here are my unintentional haikus over the years. Manually removed the RTs and link posts, replies programmatically removed beforehand. 

Code

(I hacked parse_twitter_archive.py to remove the main() call at the bottom)

import haikufinder, parse_twitter_archive
tweets = parse_twitter_archive.load_json_data_from_files('./tweets/data/js/tweets/')
for tweet in tweets:
  if 'in_reply_to_user_id_str' in tweet:
    pass
  else:
    haikus = haikufinder.HaikuFinder(tweet['text']).find_haikus()
    for haiku in haikus:
      print '<a href="https://twitter.com/sillygwailo/status/' + tweet['id_str'] + '">' + 'https://twitter.com/sillygwailo/status/' + tweet['id_str'] + '</a>: ' + haiku[0] + ' / ' + haiku[1] + ' / ' + haiku[2] + '<br>'

Unintentional Haikus