My ongoing Twitter-Cut-up, http://twitter.com/michaelmaurer, has been updated to version 0.2.

rapidwien.jpg

This time, a very simple python script is responsible for extracting random sentences from five years of writing. Diary-entries, short stories, scribbles, essays - basically everything I wrote becomes subject to some random tombola.

This is what it looks like:

#!/usr/bin/env python

import random
import sys

input_file = open(sys.argv[1])
print(random.choice(input_file.read().split('. ')) + '.')

All that’s left for me to do is to pipe the “hand-picked” sentence to TTYtter, and thus forward it to my Twitter-Account. For managing the updates, I’ve set up a simple cron entry.

0 0-15/3 * * * /bin/cutup.sh

That’s all there is to it. Now I can watch my twitter getting populated with stuff I’d already forgotten about. It’s nice for a brainstorm now and then. Just give it a try.