Analog thoughts in a digital world

Main menu

Monthly Archives: January 2012

As I mentioned in my last post, I was working on a more generic version of the generator which was driven by XML. This version is written in Python. I wrote in for Python 2.7 using the py-dom-xpath library. I have included the python code here as well as three example XML files: Cave Johnson’s Lemon rant, a quote from model Caprice, and my take on the old Steve Jackson Games “Message form the Illuminated Master” generator.

Here is the code and the XML. Enjoy and let me know what you thing. (I am working on a Powershell version and I am looking at creating a widget for WordPress, by the way.)

Original Quote:
“Alright, I’ve been thinking. When life gives you lemons, don’t make lemonade – make life take the lemons back! Get mad! I don’t want your damn lemons, what am I supposed to do with these? Demand to see life’s manager. Make life rue the day it thought it could give Cave Johnson lemons. Do you know who I am? I’m the man who’s gonna burn your house down! With the lemons. I’m going to to get my engineers to invent a combustible lemon that burns your house down!”

Like this:

I have been trying to come up with the best way to start this blog. I have debated writing a post about why I am doing this blog, what it will be about, Resistentialism, me, etc. In the end I decided to share a share a stupid little scripting project I have been playing around with to help set the serious tone I believe this blog deserves.

I’ve been getting back into scripting lately since changing jobs. I have not needed todo all that much scripting in the past few years because I was in more of leadership role. Now I get to write scripts again, I am remember how much fun it is.

Back in the day, I stumbled upon a little script/program called the “Illuminator” that Steve Jackson Games was using to generate random, er, I mean coded, message from the “illuminated masters” of the Illuminati. I build something like it use a data file back then using VB 6.0 that I gave to SJG. (It was more or less useless to them considering that they are a Mac/Linux shop or at least were.) And now I use it as a way to learn various parts of new scripting languages when I need to. (I learn best “hands on”, and having a nice repeatable and expandable project to use for that makes things easier.) The project itself general requires using arrays, random numbers, files (writing to and reading from), and user input. (This example does not read from any files, but I am working on an expanded version that will. I will share that when it is complete. I also plan to write a Python version and possibly a Lua version as well.)

In the past, I would just generate random silly messages, but with the viral nature of Cave Johnson’s “Rue the day” speech from Portal 2, I decided to use that is the base message framework. If you have not played Portal 2 or hear of Cave Johnson, watch is video, thing will make a little more sense afterward:

Okay, with all that being said here is my silly little PowerShell “Rue the day” speech/message generator: (It has been testing with PowerShell 2 on Windows 7 64-bit)

Alright, I’ve been thinking. When Russia gives you undercooked pizza, don’t send it back. Make Russia take the undercooked pizza back! Get mad! I don’t want your damn undercooked pizza! What am I supposed to do with these?! Demand to see Russia manager! Make Russia rue the day it though it could give Merlin undercooked pizza! Do you know who I am? I’m the wizard who’s gonna burn your capitol building down! With undercooked pizza! I’m going to get my mages to invent a combustible undercooked pizza that burns your house down!